@tscircuit/runframe 0.0.356 → 0.0.358

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -860,7 +860,7 @@ searched component ${u.getString()}, which has ports: ${u.children.filter(f=>f.c
860
860
  [zustand devtools middleware] Unsupported __setState action format.
861
861
  When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
862
862
  and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
863
- `);const M=S.state[s];if(M==null)return;JSON.stringify(i.getState())!==JSON.stringify(M)&&v(M);return}i.dispatchFromDevtools&&typeof i.dispatch=="function"&&i.dispatch(S)});case"DISPATCH":switch(w.payload.type){case"RESET":return v(y),s===void 0?u==null?void 0:u.init(i.getState()):u==null?void 0:u.init(FL(l.name));case"COMMIT":if(s===void 0){u==null||u.init(i.getState());return}return u==null?void 0:u.init(FL(l.name));case"ROLLBACK":return Bq(w.state,S=>{if(s===void 0){v(S),u==null||u.init(i.getState());return}v(S[s]),u==null||u.init(FL(l.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return Bq(w.state,S=>{if(s===void 0){v(S);return}JSON.stringify(i.getState())!==JSON.stringify(S[s])&&v(S[s])});case"IMPORT_STATE":{const{nextLiftedState:S}=w.payload,M=(b=S.computedStates.slice(-1)[0])==null?void 0:b.state;if(!M)return;v(s===void 0?M:M[s]),u==null||u.send(null,S);return}case"PAUSE_RECORDING":return d=!d}return}}),y},Bq=(n,e)=>{let t;try{t=JSON.parse(n)}catch(r){console.error("[zustand devtools middleware] Could not parse the received json",r)}t!==void 0&&e(t)},VS=window.API_BASE_URL??"/api",jq=Q_e.extend("store");async function dxe(n,e){return(await(await fetch(`${VS}/files/upsert`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file_path:n,text_content:e})})).json()).file}async function Hq(n){return(await(await fetch(`${VS}/files/get?file_path=${encodeURIComponent(n)}`)).json()).file}async function lgt(n){const e=n?`${VS}/events/list?since=${encodeURIComponent(n)}`:`${VS}/events/list`;return(await(await fetch(e)).json()).event_list}async function cgt(){const n=await fetch(`${VS}/files/list`),{file_list:e}=await n.json(),t=new Map;for(const r of e){const i=await Hq(r.file_path);t.set(r.file_path,i.text_content)}return t}const s4=uxe()(fxe((n,e)=>({fsMap:new Map,lastEventTime:new Date().toISOString(),isPolling:!1,error:null,circuitJson:null,lastManualEditsChangeSentAt:0,recentEvents:[],simulateScenarioOrder:void 0,loadInitialFiles:async()=>{const t=await cgt();jq("loaded initial files",{fsMap:t}),n({fsMap:t})},upsertFile:async(t,r)=>{try{const i=await dxe(t,r);n(a=>({fsMap:new Map(a.fsMap).set(i.file_path,i.text_content)}))}catch(i){n({error:i})}},getFile:async t=>{try{const r=await Hq(t);n(i=>({fsMap:new Map(i.fsMap).set(r.file_path,r.text_content)}))}catch(r){n({error:r})}},setCircuitJson:t=>{t!==e().circuitJson&&n({circuitJson:t})},startPolling:()=>{const t=async()=>{const r=e();if(r.isPolling){try{const i=await lgt(r.lastEventTime);if(i.length>0){n(s=>({recentEvents:[...s.recentEvents,...i].slice(0,100)}));const a=i[i.length-1].created_at,o=new Map(r.fsMap);for(const s of i)if(s.event_type==="FILE_UPDATED"){const l=await Hq(s.file_path);if(s.file_path==="manual_edits.json"&&Date.now()-r.lastManualEditsChangeSentAt<1e3)continue;o.set(l.file_path,l.text_content)}n({fsMap:o,lastEventTime:a})}}catch(i){n({error:i})}setTimeout(t,1e3)}};n({isPolling:!0}),t()},stopPolling:()=>{n({isPolling:!1})},pushEvent:async t=>{await fetch(`${window.API_BASE_URL??""}/api/events/create`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})},applyEditEventsAndUpdateManualEditsJson:async t=>{jq("applyEditEventsAndUpdateManualEditsJson",{editEvents:t});const r=e();if(!r.circuitJson)return;const i=r.fsMap.get("manual-edits.json"),a=i?JSON.parse(i):{},o=X_e({circuitJson:r.circuitJson,editEvents:t,manualEditsFile:a});jq("updatedManualEditsFileContent",o),n(s=>({lastManualEditsChangeSentAt:Date.now(),fsMap:new Map(s.fsMap).set("manual-edits.json",JSON.stringify(o))})),await dxe("manual-edits.json",JSON.stringify(o,null,2))},setSimulateScenarioOrder:t=>n({simulateScenarioOrder:t})}),{name:"run-frame-store"})),ugt=Q_e.extend("useEditEventController"),fgt=()=>{const n=s4(v=>v.applyEditEventsAndUpdateManualEditsJson),[e,t]=Qe.useState([]),[r,i]=Qe.useState(!1),a=e.filter(v=>!v._applied),o=e.filter(v=>v._applied),s=r?e:a,l=Qe.useCallback(v=>{t(y=>[...y,{...v,_applied:!1}])},[]),c=Qe.useCallback(v=>{t(y=>y.map(w=>w===v?{...w,_applied:!0}:w))},[]),u=Qe.useCallback(()=>{t(v=>v.map(y=>({...y,_applied:!0})))},[]),f=Qe.useCallback(()=>{i(!0),e.length!==0&&(ugt("removing edit events that are applied"),t(v=>v.filter(y=>!y._applied)))},[e]),d=Qe.useCallback(()=>{i(!1)},[]);return Qe.useEffect(()=>{if(e.filter(y=>!y._applied).length===0)return;const v=setTimeout(()=>{u(),n(e)},1e3);return()=>clearTimeout(v)},[e]),{unappliedEditEvents:a,appliedEditEvents:o,editEventsForRender:s,pushEditEvent:l,markEditEventApplied:c,markRenderStarted:f,markRenderComplete:d,markAllEditEventsApplied:u}};function zu(n,e,{checkForDefaultPrevented:t=!0}={}){return function(i){if(n==null||n(i),t===!1||!i.defaultPrevented)return e==null?void 0:e(i)}}function dgt(n,e){const t=Qe.createContext(e),r=a=>{const{children:o,...s}=a,l=Qe.useMemo(()=>s,Object.values(s));return Fe.jsx(t.Provider,{value:l,children:o})};r.displayName=n+"Provider";function i(a){const o=Qe.useContext(t);if(o)return o;if(e!==void 0)return e;throw new Error(`\`${a}\` must be used within \`${n}\``)}return[r,i]}function l4(n,e=[]){let t=[];function r(a,o){const s=Qe.createContext(o),l=t.length;t=[...t,o];const c=f=>{var S;const{scope:d,children:v,...y}=f,w=((S=d==null?void 0:d[n])==null?void 0:S[l])||s,b=Qe.useMemo(()=>y,Object.values(y));return Fe.jsx(w.Provider,{value:b,children:v})};c.displayName=a+"Provider";function u(f,d){var w;const v=((w=d==null?void 0:d[n])==null?void 0:w[l])||s,y=Qe.useContext(v);if(y)return y;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${a}\``)}return[c,u]}const i=()=>{const a=t.map(o=>Qe.createContext(o));return function(s){const l=(s==null?void 0:s[n])||a;return Qe.useMemo(()=>({[`__scope${n}`]:{...s,[n]:l}}),[s,l])}};return i.scopeName=n,[r,pgt(i,...e)]}function pgt(...n){const e=n[0];if(n.length===1)return e;const t=()=>{const r=n.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=r.reduce((s,{useScope:l,scopeName:c})=>{const f=l(a)[`__scope${c}`];return{...s,...f}},{});return Qe.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return t.scopeName=e.scopeName,t}function pxe(n,e){if(typeof n=="function")return n(e);n!=null&&(n.current=e)}function BL(...n){return e=>{let t=!1;const r=n.map(i=>{const a=pxe(i,e);return!t&&typeof a=="function"&&(t=!0),a});if(t)return()=>{for(let i=0;i<r.length;i++){const a=r[i];typeof a=="function"?a():pxe(n[i],null)}}}}function ly(...n){return Qe.useCallback(BL(...n),n)}function o7(n){const e=mgt(n),t=Qe.forwardRef((r,i)=>{const{children:a,...o}=r,s=Qe.Children.toArray(a),l=s.find(ygt);if(l){const c=l.props.children,u=s.map(f=>f===l?Qe.Children.count(c)>1?Qe.Children.only(null):Qe.isValidElement(c)?c.props.children:null:f);return Fe.jsx(e,{...o,ref:i,children:Qe.isValidElement(c)?Qe.cloneElement(c,void 0,u):null})}return Fe.jsx(e,{...o,ref:i,children:a})});return t.displayName=`${n}.Slot`,t}var hgt=o7("Slot");function mgt(n){const e=Qe.forwardRef((t,r)=>{const{children:i,...a}=t;if(Qe.isValidElement(i)){const o=_gt(i),s=ggt(a,i.props);return i.type!==Qe.Fragment&&(s.ref=r?BL(r,o):o),Qe.cloneElement(i,s)}return Qe.Children.count(i)>1?Qe.Children.only(null):null});return e.displayName=`${n}.SlotClone`,e}var hxe=Symbol("radix.slottable");function vgt(n){const e=({children:t})=>Fe.jsx(Fe.Fragment,{children:t});return e.displayName=`${n}.Slottable`,e.__radixId=hxe,e}function ygt(n){return Qe.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===hxe}function ggt(n,e){const t={...e};for(const r in e){const i=n[r],a=e[r];/^on[A-Z]/.test(r)?i&&a?t[r]=(...s)=>{a(...s),i(...s)}:i&&(t[r]=i):r==="style"?t[r]={...i,...a}:r==="className"&&(t[r]=[i,a].filter(Boolean).join(" "))}return{...n,...t}}function _gt(n){var r,i;let e=(r=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:r.get,t=e&&"isReactWarning"in e&&e.isReactWarning;return t?n.ref:(e=(i=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:i.get,t=e&&"isReactWarning"in e&&e.isReactWarning,t?n.props.ref:n.props.ref||n.ref)}function Vq(n){const e=n+"CollectionProvider",[t,r]=l4(e),[i,a]=t(e,{collectionRef:{current:null},itemMap:new Map}),o=w=>{const{scope:b,children:S}=w,M=gf.useRef(null),N=gf.useRef(new Map).current;return Fe.jsx(i,{scope:b,itemMap:N,collectionRef:M,children:S})};o.displayName=e;const s=n+"CollectionSlot",l=o7(s),c=gf.forwardRef((w,b)=>{const{scope:S,children:M}=w,N=a(s,S),k=ly(b,N.collectionRef);return Fe.jsx(l,{ref:k,children:M})});c.displayName=s;const u=n+"CollectionItemSlot",f="data-radix-collection-item",d=o7(u),v=gf.forwardRef((w,b)=>{const{scope:S,children:M,...N}=w,k=gf.useRef(null),G=ly(b,k),q=a(u,S);return gf.useEffect(()=>(q.itemMap.set(k,{ref:k,...N}),()=>void q.itemMap.delete(k))),Fe.jsx(d,{[f]:"",ref:G,children:M})});v.displayName=u;function y(w){const b=a(n+"CollectionConsumer",w);return gf.useCallback(()=>{const M=b.collectionRef.current;if(!M)return[];const N=Array.from(M.querySelectorAll(`[${f}]`));return Array.from(b.itemMap.values()).sort((q,X)=>N.indexOf(q.ref.current)-N.indexOf(X.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:o,Slot:c,ItemSlot:v},y,r]}var hb=globalThis!=null&&globalThis.document?Qe.useLayoutEffect:()=>{},xgt=Grt[" useId ".trim().toString()]||(()=>{}),bgt=0;function O3(n){const[e,t]=Qe.useState(xgt());return hb(()=>{t(r=>r??String(bgt++))},[n]),e?`radix-${e}`:""}var xC=Ahe();const mxe=n_(xC);var Sgt=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],kh=Sgt.reduce((n,e)=>{const t=o7(`Primitive.${e}`),r=Qe.forwardRef((i,a)=>{const{asChild:o,...s}=i,l=o?t:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),Fe.jsx(l,{...s,ref:a})});return r.displayName=`Primitive.${e}`,{...n,[e]:r}},{});function vxe(n,e){n&&xC.flushSync(()=>n.dispatchEvent(e))}function u3(n){const e=Qe.useRef(n);return Qe.useEffect(()=>{e.current=n}),Qe.useMemo(()=>(...t)=>{var r;return(r=e.current)==null?void 0:r.call(e,...t)},[])}function X8({prop:n,defaultProp:e,onChange:t=()=>{}}){const[r,i]=wgt({defaultProp:e,onChange:t}),a=n!==void 0,o=a?n:r,s=u3(t),l=Qe.useCallback(c=>{if(a){const f=typeof c=="function"?c(n):c;f!==n&&s(f)}else i(c)},[a,n,i,s]);return[o,l]}function wgt({defaultProp:n,onChange:e}){const t=Qe.useState(n),[r]=t,i=Qe.useRef(r),a=u3(e);return Qe.useEffect(()=>{i.current!==r&&(a(r),i.current=r)},[r,i,a]),t}var Egt=Qe.createContext(void 0);function jL(n){const e=Qe.useContext(Egt);return n||e||"ltr"}var $q="rovingFocusGroup.onEntryFocus",Tgt={bubbles:!1,cancelable:!0},HL="RovingFocusGroup",[Gq,yxe,Mgt]=Vq(HL),[Cgt,VL]=l4(HL,[Mgt]),[Rgt,Agt]=Cgt(HL),gxe=Qe.forwardRef((n,e)=>Fe.jsx(Gq.Provider,{scope:n.__scopeRovingFocusGroup,children:Fe.jsx(Gq.Slot,{scope:n.__scopeRovingFocusGroup,children:Fe.jsx(Pgt,{...n,ref:e})})}));gxe.displayName=HL;var Pgt=Qe.forwardRef((n,e)=>{const{__scopeRovingFocusGroup:t,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:u=!1,...f}=n,d=Qe.useRef(null),v=ly(e,d),y=jL(a),[w=null,b]=X8({prop:o,defaultProp:s,onChange:l}),[S,M]=Qe.useState(!1),N=u3(c),k=yxe(t),G=Qe.useRef(!1),[q,X]=Qe.useState(0);return Qe.useEffect(()=>{const Y=d.current;if(Y)return Y.addEventListener($q,N),()=>Y.removeEventListener($q,N)},[N]),Fe.jsx(Rgt,{scope:t,orientation:r,dir:y,loop:i,currentTabStopId:w,onItemFocus:Qe.useCallback(Y=>b(Y),[b]),onItemShiftTab:Qe.useCallback(()=>M(!0),[]),onFocusableItemAdd:Qe.useCallback(()=>X(Y=>Y+1),[]),onFocusableItemRemove:Qe.useCallback(()=>X(Y=>Y-1),[]),children:Fe.jsx(kh.div,{tabIndex:S||q===0?-1:0,"data-orientation":r,...f,ref:v,style:{outline:"none",...n.style},onMouseDown:zu(n.onMouseDown,()=>{G.current=!0}),onFocus:zu(n.onFocus,Y=>{const ee=!G.current;if(Y.target===Y.currentTarget&&ee&&!S){const W=new CustomEvent($q,Tgt);if(Y.currentTarget.dispatchEvent(W),!W.defaultPrevented){const ue=k().filter(_e=>_e.focusable),pe=ue.find(_e=>_e.active),de=ue.find(_e=>_e.id===w),he=[pe,de,...ue].filter(Boolean).map(_e=>_e.ref.current);bxe(he,u)}}G.current=!1}),onBlur:zu(n.onBlur,()=>M(!1))})})}),_xe="RovingFocusGroupItem",xxe=Qe.forwardRef((n,e)=>{const{__scopeRovingFocusGroup:t,focusable:r=!0,active:i=!1,tabStopId:a,...o}=n,s=O3(),l=a||s,c=Agt(_xe,t),u=c.currentTabStopId===l,f=yxe(t),{onFocusableItemAdd:d,onFocusableItemRemove:v}=c;return Qe.useEffect(()=>{if(r)return d(),()=>v()},[r,d,v]),Fe.jsx(Gq.ItemSlot,{scope:t,id:l,focusable:r,active:i,children:Fe.jsx(kh.span,{tabIndex:u?0:-1,"data-orientation":c.orientation,...o,ref:e,onMouseDown:zu(n.onMouseDown,y=>{r?c.onItemFocus(l):y.preventDefault()}),onFocus:zu(n.onFocus,()=>c.onItemFocus(l)),onKeyDown:zu(n.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){c.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const w=Lgt(y,c.orientation,c.dir);if(w!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let S=f().filter(M=>M.focusable).map(M=>M.ref.current);if(w==="last")S.reverse();else if(w==="prev"||w==="next"){w==="prev"&&S.reverse();const M=S.indexOf(y.currentTarget);S=c.loop?Ogt(S,M+1):S.slice(M+1)}setTimeout(()=>bxe(S))}})})})});xxe.displayName=_xe;var Ngt={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Dgt(n,e){return e!=="rtl"?n:n==="ArrowLeft"?"ArrowRight":n==="ArrowRight"?"ArrowLeft":n}function Lgt(n,e,t){const r=Dgt(n.key,t);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Ngt[r]}function bxe(n,e=!1){const t=document.activeElement;for(const r of n)if(r===t||(r.focus({preventScroll:e}),document.activeElement!==t))return}function Ogt(n,e){return n.map((t,r)=>n[(e+r)%n.length])}var Sxe=gxe,wxe=xxe;function zgt(n,e){return Qe.useReducer((t,r)=>e[t][r]??t,n)}var X4=n=>{const{present:e,children:t}=n,r=Ugt(e),i=typeof t=="function"?t({present:r.isPresent}):Qe.Children.only(t),a=ly(r.ref,kgt(i));return typeof t=="function"||r.isPresent?Qe.cloneElement(i,{ref:a}):null};X4.displayName="Presence";function Ugt(n){const[e,t]=Qe.useState(),r=Qe.useRef({}),i=Qe.useRef(n),a=Qe.useRef("none"),o=n?"mounted":"unmounted",[s,l]=zgt(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return Qe.useEffect(()=>{const c=$L(r.current);a.current=s==="mounted"?c:"none"},[s]),hb(()=>{const c=r.current,u=i.current;if(u!==n){const d=a.current,v=$L(c);n?l("MOUNT"):v==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&d!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=n}},[n,l]),hb(()=>{if(e){let c;const u=e.ownerDocument.defaultView??window,f=v=>{const w=$L(r.current).includes(v.animationName);if(v.target===e&&w&&(l("ANIMATION_END"),!i.current)){const b=e.style.animationFillMode;e.style.animationFillMode="forwards",c=u.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=b)})}},d=v=>{v.target===e&&(a.current=$L(r.current))};return e.addEventListener("animationstart",d),e.addEventListener("animationcancel",f),e.addEventListener("animationend",f),()=>{u.clearTimeout(c),e.removeEventListener("animationstart",d),e.removeEventListener("animationcancel",f),e.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:Qe.useCallback(c=>{c&&(r.current=getComputedStyle(c)),t(c)},[])}}function $L(n){return(n==null?void 0:n.animationName)||"none"}function kgt(n){var r,i;let e=(r=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:r.get,t=e&&"isReactWarning"in e&&e.isReactWarning;return t?n.ref:(e=(i=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:i.get,t=e&&"isReactWarning"in e&&e.isReactWarning,t?n.props.ref:n.props.ref||n.ref)}var qq="Tabs",[Igt,H5n]=l4(qq,[VL]),Exe=VL(),[Fgt,Yq]=Igt(qq),Txe=Qe.forwardRef((n,e)=>{const{__scopeTabs:t,value:r,onValueChange:i,defaultValue:a,orientation:o="horizontal",dir:s,activationMode:l="automatic",...c}=n,u=jL(s),[f,d]=X8({prop:r,onChange:i,defaultProp:a});return Fe.jsx(Fgt,{scope:t,baseId:O3(),value:f,onValueChange:d,orientation:o,dir:u,activationMode:l,children:Fe.jsx(kh.div,{dir:u,"data-orientation":o,...c,ref:e})})});Txe.displayName=qq;var Mxe="TabsList",Cxe=Qe.forwardRef((n,e)=>{const{__scopeTabs:t,loop:r=!0,...i}=n,a=Yq(Mxe,t),o=Exe(t);return Fe.jsx(Sxe,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:Fe.jsx(kh.div,{role:"tablist","aria-orientation":a.orientation,...i,ref:e})})});Cxe.displayName=Mxe;var Rxe="TabsTrigger",Axe=Qe.forwardRef((n,e)=>{const{__scopeTabs:t,value:r,disabled:i=!1,...a}=n,o=Yq(Rxe,t),s=Exe(t),l=Dxe(o.baseId,r),c=Lxe(o.baseId,r),u=r===o.value;return Fe.jsx(wxe,{asChild:!0,...s,focusable:!i,active:u,children:Fe.jsx(kh.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":c,"data-state":u?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:l,...a,ref:e,onMouseDown:zu(n.onMouseDown,f=>{!i&&f.button===0&&f.ctrlKey===!1?o.onValueChange(r):f.preventDefault()}),onKeyDown:zu(n.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&o.onValueChange(r)}),onFocus:zu(n.onFocus,()=>{const f=o.activationMode!=="manual";!u&&!i&&f&&o.onValueChange(r)})})})});Axe.displayName=Rxe;var Pxe="TabsContent",Nxe=Qe.forwardRef((n,e)=>{const{__scopeTabs:t,value:r,forceMount:i,children:a,...o}=n,s=Yq(Pxe,t),l=Dxe(s.baseId,r),c=Lxe(s.baseId,r),u=r===s.value,f=Qe.useRef(u);return Qe.useEffect(()=>{const d=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(d)},[]),Fe.jsx(X4,{present:i||u,children:({present:d})=>Fe.jsx(kh.div,{"data-state":u?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":l,hidden:!d,id:c,tabIndex:0,...o,ref:e,style:{...n.style,animationDuration:f.current?"0s":void 0},children:d&&a})})});Nxe.displayName=Pxe;function Dxe(n,e){return`${n}-trigger-${e}`}function Lxe(n,e){return`${n}-content-${e}`}var Bgt=Txe,Oxe=Cxe,zxe=Axe,Uxe=Nxe;function kxe(n){var e,t,r="";if(typeof n=="string"||typeof n=="number")r+=n;else if(typeof n=="object")if(Array.isArray(n)){var i=n.length;for(e=0;e<i;e++)n[e]&&(t=kxe(n[e]))&&(r&&(r+=" "),r+=t)}else for(t in n)n[t]&&(r&&(r+=" "),r+=t);return r}function W4(){for(var n,e,t=0,r="",i=arguments.length;t<i;t++)(n=arguments[t])&&(e=kxe(n))&&(r&&(r+=" "),r+=e);return r}const Xq="-",jgt=n=>{const e=Vgt(n),{conflictingClassGroups:t,conflictingClassGroupModifiers:r}=n;return{getClassGroupId:o=>{const s=o.split(Xq);return s[0]===""&&s.length!==1&&s.shift(),Ixe(s,e)||Hgt(o)},getConflictingClassGroupIds:(o,s)=>{const l=t[o]||[];return s&&r[o]?[...l,...r[o]]:l}}},Ixe=(n,e)=>{var o;if(n.length===0)return e.classGroupId;const t=n[0],r=e.nextPart.get(t),i=r?Ixe(n.slice(1),r):void 0;if(i)return i;if(e.validators.length===0)return;const a=n.join(Xq);return(o=e.validators.find(({validator:s})=>s(a)))==null?void 0:o.classGroupId},Fxe=/^\[(.+)\]$/,Hgt=n=>{if(Fxe.test(n)){const e=Fxe.exec(n)[1],t=e==null?void 0:e.substring(0,e.indexOf(":"));if(t)return"arbitrary.."+t}},Vgt=n=>{const{theme:e,prefix:t}=n,r={nextPart:new Map,validators:[]};return Ggt(Object.entries(n.classGroups),t).forEach(([a,o])=>{Wq(o,r,a,e)}),r},Wq=(n,e,t,r)=>{n.forEach(i=>{if(typeof i=="string"){const a=i===""?e:Bxe(e,i);a.classGroupId=t;return}if(typeof i=="function"){if($gt(i)){Wq(i(r),e,t,r);return}e.validators.push({validator:i,classGroupId:t});return}Object.entries(i).forEach(([a,o])=>{Wq(o,Bxe(e,a),t,r)})})},Bxe=(n,e)=>{let t=n;return e.split(Xq).forEach(r=>{t.nextPart.has(r)||t.nextPart.set(r,{nextPart:new Map,validators:[]}),t=t.nextPart.get(r)}),t},$gt=n=>n.isThemeGetter,Ggt=(n,e)=>e?n.map(([t,r])=>{const i=r.map(a=>typeof a=="string"?e+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([o,s])=>[e+o,s])):a);return[t,i]}):n,qgt=n=>{if(n<1)return{get:()=>{},set:()=>{}};let e=0,t=new Map,r=new Map;const i=(a,o)=>{t.set(a,o),e++,e>n&&(e=0,r=t,t=new Map)};return{get(a){let o=t.get(a);if(o!==void 0)return o;if((o=r.get(a))!==void 0)return i(a,o),o},set(a,o){t.has(a)?t.set(a,o):i(a,o)}}},jxe="!",Ygt=n=>{const{separator:e,experimentalParseClassName:t}=n,r=e.length===1,i=e[0],a=e.length,o=s=>{const l=[];let c=0,u=0,f;for(let b=0;b<s.length;b++){let S=s[b];if(c===0){if(S===i&&(r||s.slice(b,b+a)===e)){l.push(s.slice(u,b)),u=b+a;continue}if(S==="/"){f=b;continue}}S==="["?c++:S==="]"&&c--}const d=l.length===0?s:s.substring(u),v=d.startsWith(jxe),y=v?d.substring(1):d,w=f&&f>u?f-u:void 0;return{modifiers:l,hasImportantModifier:v,baseClassName:y,maybePostfixModifierPosition:w}};return t?s=>t({className:s,parseClassName:o}):o},Xgt=n=>{if(n.length<=1)return n;const e=[];let t=[];return n.forEach(r=>{r[0]==="["?(e.push(...t.sort(),r),t=[]):t.push(r)}),e.push(...t.sort()),e},Wgt=n=>({cache:qgt(n.cacheSize),parseClassName:Ygt(n),...jgt(n)}),Zgt=/\s+/,Qgt=(n,e)=>{const{parseClassName:t,getClassGroupId:r,getConflictingClassGroupIds:i}=e,a=[],o=n.trim().split(Zgt);let s="";for(let l=o.length-1;l>=0;l-=1){const c=o[l],{modifiers:u,hasImportantModifier:f,baseClassName:d,maybePostfixModifierPosition:v}=t(c);let y=!!v,w=r(y?d.substring(0,v):d);if(!w){if(!y){s=c+(s.length>0?" "+s:s);continue}if(w=r(d),!w){s=c+(s.length>0?" "+s:s);continue}y=!1}const b=Xgt(u).join(":"),S=f?b+jxe:b,M=S+w;if(a.includes(M))continue;a.push(M);const N=i(w,y);for(let k=0;k<N.length;++k){const G=N[k];a.push(S+G)}s=c+(s.length>0?" "+s:s)}return s};function Kgt(){let n=0,e,t,r="";for(;n<arguments.length;)(e=arguments[n++])&&(t=Hxe(e))&&(r&&(r+=" "),r+=t);return r}const Hxe=n=>{if(typeof n=="string")return n;let e,t="";for(let r=0;r<n.length;r++)n[r]&&(e=Hxe(n[r]))&&(t&&(t+=" "),t+=e);return t};function Jgt(n,...e){let t,r,i,a=o;function o(l){const c=e.reduce((u,f)=>f(u),n());return t=Wgt(c),r=t.cache.get,i=t.cache.set,a=s,s(l)}function s(l){const c=r(l);if(c)return c;const u=Qgt(l,t);return i(l,u),u}return function(){return a(Kgt.apply(null,arguments))}}const _g=n=>{const e=t=>t[n]||[];return e.isThemeGetter=!0,e},Vxe=/^\[(?:([a-z-]+):)?(.+)\]$/i,e_t=/^\d+\/\d+$/,t_t=new Set(["px","full","screen"]),n_t=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,r_t=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,i_t=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,a_t=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,o_t=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,$S=n=>pE(n)||t_t.has(n)||e_t.test(n),W8=n=>hE(n,"length",h_t),pE=n=>!!n&&!Number.isNaN(Number(n)),Zq=n=>hE(n,"number",pE),bC=n=>!!n&&Number.isInteger(Number(n)),s_t=n=>n.endsWith("%")&&pE(n.slice(0,-1)),Ih=n=>Vxe.test(n),Z8=n=>n_t.test(n),l_t=new Set(["length","size","percentage"]),c_t=n=>hE(n,l_t,$xe),u_t=n=>hE(n,"position",$xe),f_t=new Set(["image","url"]),d_t=n=>hE(n,f_t,v_t),p_t=n=>hE(n,"",m_t),SC=()=>!0,hE=(n,e,t)=>{const r=Vxe.exec(n);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):t(r[2]):!1},h_t=n=>r_t.test(n)&&!i_t.test(n),$xe=()=>!1,m_t=n=>a_t.test(n),v_t=n=>o_t.test(n),y_t=Jgt(()=>{const n=_g("colors"),e=_g("spacing"),t=_g("blur"),r=_g("brightness"),i=_g("borderColor"),a=_g("borderRadius"),o=_g("borderSpacing"),s=_g("borderWidth"),l=_g("contrast"),c=_g("grayscale"),u=_g("hueRotate"),f=_g("invert"),d=_g("gap"),v=_g("gradientColorStops"),y=_g("gradientColorStopPositions"),w=_g("inset"),b=_g("margin"),S=_g("opacity"),M=_g("padding"),N=_g("saturate"),k=_g("scale"),G=_g("sepia"),q=_g("skew"),X=_g("space"),Y=_g("translate"),ee=()=>["auto","contain","none"],W=()=>["auto","hidden","clip","visible","scroll"],ue=()=>["auto",Ih,e],pe=()=>[Ih,e],de=()=>["",$S,W8],we=()=>["auto",pE,Ih],he=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],_e=()=>["solid","dashed","dotted","double","none"],Te=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],be=()=>["start","end","center","between","around","evenly","stretch"],Oe=()=>["","0",Ih],Ne=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Ie=()=>[pE,Ih];return{cacheSize:500,separator:":",theme:{colors:[SC],spacing:[$S,W8],blur:["none","",Z8,Ih],brightness:Ie(),borderColor:[n],borderRadius:["none","","full",Z8,Ih],borderSpacing:pe(),borderWidth:de(),contrast:Ie(),grayscale:Oe(),hueRotate:Ie(),invert:Oe(),gap:pe(),gradientColorStops:[n],gradientColorStopPositions:[s_t,W8],inset:ue(),margin:ue(),opacity:Ie(),padding:pe(),saturate:Ie(),scale:Ie(),sepia:Oe(),skew:Ie(),space:pe(),translate:pe()},classGroups:{aspect:[{aspect:["auto","square","video",Ih]}],container:["container"],columns:[{columns:[Z8]}],"break-after":[{"break-after":Ne()}],"break-before":[{"break-before":Ne()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...he(),Ih]}],overflow:[{overflow:W()}],"overflow-x":[{"overflow-x":W()}],"overflow-y":[{"overflow-y":W()}],overscroll:[{overscroll:ee()}],"overscroll-x":[{"overscroll-x":ee()}],"overscroll-y":[{"overscroll-y":ee()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[w]}],"inset-x":[{"inset-x":[w]}],"inset-y":[{"inset-y":[w]}],start:[{start:[w]}],end:[{end:[w]}],top:[{top:[w]}],right:[{right:[w]}],bottom:[{bottom:[w]}],left:[{left:[w]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",bC,Ih]}],basis:[{basis:ue()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ih]}],grow:[{grow:Oe()}],shrink:[{shrink:Oe()}],order:[{order:["first","last","none",bC,Ih]}],"grid-cols":[{"grid-cols":[SC]}],"col-start-end":[{col:["auto",{span:["full",bC,Ih]},Ih]}],"col-start":[{"col-start":we()}],"col-end":[{"col-end":we()}],"grid-rows":[{"grid-rows":[SC]}],"row-start-end":[{row:["auto",{span:[bC,Ih]},Ih]}],"row-start":[{"row-start":we()}],"row-end":[{"row-end":we()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ih]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ih]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal",...be()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...be(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...be(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[M]}],px:[{px:[M]}],py:[{py:[M]}],ps:[{ps:[M]}],pe:[{pe:[M]}],pt:[{pt:[M]}],pr:[{pr:[M]}],pb:[{pb:[M]}],pl:[{pl:[M]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[X]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[X]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ih,e]}],"min-w":[{"min-w":[Ih,e,"min","max","fit"]}],"max-w":[{"max-w":[Ih,e,"none","full","min","max","fit","prose",{screen:[Z8]},Z8]}],h:[{h:[Ih,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ih,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ih,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ih,e,"auto","min","max","fit"]}],"font-size":[{text:["base",Z8,W8]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Zq]}],"font-family":[{font:[SC]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Ih]}],"line-clamp":[{"line-clamp":["none",pE,Zq]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",$S,Ih]}],"list-image":[{"list-image":["none",Ih]}],"list-style-type":[{list:["none","disc","decimal",Ih]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[n]}],"placeholder-opacity":[{"placeholder-opacity":[S]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[n]}],"text-opacity":[{"text-opacity":[S]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[..._e(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",$S,W8]}],"underline-offset":[{"underline-offset":["auto",$S,Ih]}],"text-decoration-color":[{decoration:[n]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:pe()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ih]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ih]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[S]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...he(),u_t]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",c_t]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},d_t]}],"bg-color":[{bg:[n]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[v]}],"gradient-via":[{via:[v]}],"gradient-to":[{to:[v]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[S]}],"border-style":[{border:[..._e(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[S]}],"divide-style":[{divide:_e()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",..._e()]}],"outline-offset":[{"outline-offset":[$S,Ih]}],"outline-w":[{outline:[$S,W8]}],"outline-color":[{outline:[n]}],"ring-w":[{ring:de()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[n]}],"ring-opacity":[{"ring-opacity":[S]}],"ring-offset-w":[{"ring-offset":[$S,W8]}],"ring-offset-color":[{"ring-offset":[n]}],shadow:[{shadow:["","inner","none",Z8,p_t]}],"shadow-color":[{shadow:[SC]}],opacity:[{opacity:[S]}],"mix-blend":[{"mix-blend":[...Te(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Te()}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Z8,Ih]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[f]}],saturate:[{saturate:[N]}],sepia:[{sepia:[G]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[S]}],"backdrop-saturate":[{"backdrop-saturate":[N]}],"backdrop-sepia":[{"backdrop-sepia":[G]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ih]}],duration:[{duration:Ie()}],ease:[{ease:["linear","in","out","in-out",Ih]}],delay:[{delay:Ie()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ih]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[k]}],"scale-x":[{"scale-x":[k]}],"scale-y":[{"scale-y":[k]}],rotate:[{rotate:[bC,Ih]}],"translate-x":[{"translate-x":[Y]}],"translate-y":[{"translate-y":[Y]}],"skew-x":[{"skew-x":[q]}],"skew-y":[{"skew-y":[q]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ih]}],accent:[{accent:["auto",n]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ih]}],"caret-color":[{caret:[n]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":pe()}],"scroll-mx":[{"scroll-mx":pe()}],"scroll-my":[{"scroll-my":pe()}],"scroll-ms":[{"scroll-ms":pe()}],"scroll-me":[{"scroll-me":pe()}],"scroll-mt":[{"scroll-mt":pe()}],"scroll-mr":[{"scroll-mr":pe()}],"scroll-mb":[{"scroll-mb":pe()}],"scroll-ml":[{"scroll-ml":pe()}],"scroll-p":[{"scroll-p":pe()}],"scroll-px":[{"scroll-px":pe()}],"scroll-py":[{"scroll-py":pe()}],"scroll-ps":[{"scroll-ps":pe()}],"scroll-pe":[{"scroll-pe":pe()}],"scroll-pt":[{"scroll-pt":pe()}],"scroll-pr":[{"scroll-pr":pe()}],"scroll-pb":[{"scroll-pb":pe()}],"scroll-pl":[{"scroll-pl":pe()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ih]}],fill:[{fill:[n,"none"]}],"stroke-w":[{stroke:[$S,W8,Zq]}],stroke:[{stroke:[n,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function O0(...n){return y_t(W4(n))}const Gxe=n=>n.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase()),qxe=Bgt,Qq=Qe.forwardRef(({className:n,...e},t)=>Fe.jsx(Oxe,{ref:t,className:O0("rf-inline-flex rf-h-9 rf-items-center rf-justify-center rf-rounded-lg rf-bg-zinc-100 rf-p-1 rf-text-zinc-500 dark:rf-bg-zinc-800 dark:rf-text-zinc-400",n),...e}));Qq.displayName=Oxe.displayName;const Q8=Qe.forwardRef(({className:n,...e},t)=>Fe.jsx(zxe,{ref:t,className:O0("rf-inline-flex rf-items-center rf-justify-center rf-whitespace-nowrap rf-rounded-md rf-px-3 rf-py-1 rf-text-sm rf-font-medium rf-ring-offset-white rf-transition-all focus-visible:rf-outline-none focus-visible:rf-ring-2 focus-visible:rf-ring-zinc-950 focus-visible:rf-ring-offset-2 disabled:rf-pointer-events-none disabled:rf-opacity-50 data-[state=active]:rf-bg-white data-[state=active]:rf-text-zinc-950 data-[state=active]:rf-shadow dark:rf-ring-offset-zinc-950 dark:focus-visible:rf-ring-zinc-300 dark:data-[state=active]:rf-bg-zinc-950 dark:data-[state=active]:rf-text-zinc-50",n),...e}));Q8.displayName=zxe.displayName;const Z4=Qe.forwardRef(({className:n,...e},t)=>Fe.jsx(Uxe,{ref:t,className:O0("rf-mt-2 rf-ring-offset-white focus-visible:rf-outline-none focus-visible:rf-ring-2 focus-visible:rf-ring-zinc-950 focus-visible:rf-ring-offset-2 dark:rf-ring-offset-zinc-950 dark:focus-visible:rf-ring-zinc-300",n),...e}));Z4.displayName=Uxe.displayName;var Yxe={Hz:{baseUnit:"Hz",variants:{MHz:1e6,kHz:1e3,Hz:1}},g:{baseUnit:"g",variants:{kg:1e3,g:1}},Ω:{baseUnit:"Ω",variants:{mΩ:.001,Ω:1,kΩ:1e3,KΩ:1e3,kohm:1e3,MΩ:1e6,GΩ:1e9,TΩ:1e12}},V:{baseUnit:"V",variants:{mV:.001,V:1,kV:1e3,KV:1e3,MV:1e6,GV:1e9,TV:1e12}},A:{baseUnit:"A",variants:{µA:1e-6,mA:.001,ma:.001,A:1,kA:1e3,MA:1e6}},F:{baseUnit:"F",variants:{pF:1e-12,nF:1e-9,µF:1e-6,uF:1e-6,mF:.001,F:1}},ml:{baseUnit:"ml",variants:{ml:1,mL:1,l:1e3,L:1e3}},deg:{baseUnit:"deg",variants:{rad:180/Math.PI}},ms:{baseUnit:"ms",variants:{s:1e3}},mm:{baseUnit:"mm",variants:{nm:1e-6,µm:.001,um:.001,mm:1,cm:10,dm:100,m:1e3,km:1e6,in:25.4,ft:304.8,IN:25.4,FT:304.8,yd:914.4,mi:1609344,mil:.0254}}},Kq=new Set;for(const[n,e]of Object.entries(Yxe)){Kq.add(n);for(const t of Object.keys(e.variants))Kq.add(t)}function g_t(n){for(const[e,t]of Object.entries(Yxe))if(n in t.variants)return{baseUnit:t.baseUnit,conversionFactor:t.variants[n]};return{baseUnit:n,conversionFactor:1}}var Xxe={tera:1e12,T:1e12,giga:1e9,G:1e9,mega:1e6,M:1e6,kilo:1e3,k:1e3,deci:.1,d:.1,centi:.01,c:.01,milli:.001,m:.001,micro:1e-6,u:1e-6,µ:1e-6,nano:1e-9,n:1e-9,pico:1e-12,p:1e-12},c4=n=>{var s;if(typeof n>"u")return{parsedUnit:null,unitOfValue:null,value:null};if(typeof n=="string"&&n.match(/^-?[\d\.]+$/))return{value:Number.parseFloat(n),parsedUnit:null,unitOfValue:null};if(typeof n=="number")return{value:n,parsedUnit:null,unitOfValue:null};if(typeof n=="object"&&"x"in n&&"y"in n){const{parsedUnit:l,unitOfValue:c}=c4(n.x);return{parsedUnit:l,unitOfValue:c,value:{x:c4(n.x).value,y:c4(n.y).value}}}const t=(s=n.toString().split("").reverse().join("").match(/[^\d\s]+/))==null?void 0:s[0];if(!t)throw new Error(`Could not determine unit: "${n}"`);const r=t.split("").reverse().join(""),i=n.slice(0,-r.length);if(r in Xxe&&!Kq.has(r)){const l=Xxe[r];return{parsedUnit:null,unitOfValue:null,value:Number.parseFloat(i)*l}}const{baseUnit:a,conversionFactor:o}=g_t(r);return{parsedUnit:r,unitOfValue:a,value:o*Number.parseFloat(i)}},GL=E.string().or(E.number()).transform(n=>c4(n).value),Jq=E.string().or(E.number()).transform(n=>c4(n).value).transform(n=>Number.parseFloat(n.toPrecision(12))),Wxe=E.string().or(E.number()).transform(n=>c4(n).value),qL=E.string().or(E.number()).transform(n=>c4(n).value),kg=E.string().or(E.number()).transform(n=>c4(n).value),Zxe=E.string().or(E.number()).transform(n=>c4(n).value),ac=kg,__t=E.string().or(E.number()).transform(n=>c4(n).value),x_t=E.string().or(E.number()).transform(n=>c4(n).value),mE=E.string().or(E.number()).transform(n=>typeof n=="number"?n:n.endsWith("deg")?Number.parseFloat(n.split("deg")[0]):n.endsWith("rad")?Number.parseFloat(n.split("rad")[0])*180/Math.PI:Number.parseFloat(n)),Qxe=E.number().or(E.string().endsWith("mAh")).transform(n=>{if(typeof n=="string"){const e=n.replace("mAh",""),t=Number.parseFloat(e);if(Number.isNaN(t))throw new Error("Invalid capacity");return t}return n}).describe("Battery capacity in mAh"),M9=E.object({x:ac,y:ac}),b_t=M9,vE=E.object({x:ac,y:ac,z:ac}),S_t=vE,eY=E.object({width:E.number(),height:E.number()}),r1=n=>E.string().optional().default(()=>`${n}_${WM(10)}`),Kxe=E.enum(["jlcpcb","macrofab","pcbway","digikey","mouser","lcsc"]),Y2=E.object({type:E.literal("source_component"),ftype:E.string().optional(),source_component_id:E.string(),name:E.string(),manufacturer_part_number:E.string().optional(),supplier_part_numbers:E.record(Kxe,E.array(E.string())).optional(),display_value:E.string().optional()}),tY=Y2.extend({ftype:E.literal("simple_capacitor"),capacitance:Jq,max_voltage_rating:qL.optional(),display_capacitance:E.string().optional(),max_decoupling_trace_length:ac.optional()}),nY=Y2.extend({ftype:E.literal("simple_resistor"),resistance:GL,display_resistance:E.string().optional()}),YL=Y2.extend({ftype:E.literal("simple_diode")}),Jxe=Y2.extend({ftype:E.literal("simple_ground")}),rY=Y2.extend({ftype:E.literal("simple_bug")}).describe("@deprecated"),iY=Y2.extend({ftype:E.literal("simple_chip")}),aY=YL.extend({ftype:E.literal("led")}),oY=Y2.extend({ftype:E.literal("simple_power_source"),voltage:qL}),sY=Y2.extend({ftype:E.literal("simple_battery"),capacity:Qxe}),lY=Y2.extend({ftype:E.literal("simple_inductor"),inductance:Wxe}),cY=Y2.extend({ftype:E.literal("simple_push_button")}),uY=Y2.extend({ftype:E.literal("simple_potentiometer"),max_resistance:GL}),e2e=Y2.extend({ftype:E.literal("simple_crystal"),frequency:E.number().describe("Frequency in Hz"),load_capacitance:E.number().optional().describe("Load capacitance in pF")}),fY=Y2.extend({ftype:E.literal("simple_pin_header"),pin_count:E.number(),gender:E.enum(["male","female"]).optional().default("male")}),dY=Y2.extend({ftype:E.literal("simple_resonator"),load_capacitance:Jq,equivalent_series_resistance:GL.optional(),frequency:Zxe}),pY=Y2.extend({ftype:E.literal("simple_transistor"),transistor_type:E.enum(["npn","pnp"])}),hY=Y2.extend({ftype:E.literal("simple_mosfet"),channel_type:E.enum(["n","p"]),mosfet_mode:E.enum(["enhancement","depletion"])}),mY=Y2.extend({ftype:E.literal("simple_switch")}),vY=E.object({type:E.literal("source_project_metadata"),name:E.string().optional(),software_used_string:E.string().optional(),created_at:E.string().datetime().optional()}),t2e=E.union([nY,tY,YL,Jxe,iY,rY,aY,oY,sY,lY,cY,uY,e2e,fY,dY,mY,pY,hY,vY]),n2e=E.object({type:E.literal("source_port"),pin_number:E.number().optional(),port_hints:E.array(E.string()).optional(),name:E.string(),source_port_id:E.string(),source_component_id:E.string(),subcircuit_id:E.string().optional()}),r2e=E.object({type:E.literal("source_trace"),source_trace_id:E.string(),connected_source_port_ids:E.array(E.string()),connected_source_net_ids:E.array(E.string()),subcircuit_id:E.string().optional(),subcircuit_connectivity_map_key:E.string().optional(),max_length:E.number().optional(),min_trace_thickness:E.number().optional(),display_name:E.string().optional()}),i2e=E.object({type:E.literal("source_group"),source_group_id:E.string(),subcircuit_id:E.string().optional(),parent_subcircuit_id:E.string().optional(),is_subcircuit:E.boolean().optional(),name:E.string().optional()}),a2e=E.object({type:E.literal("source_net"),source_net_id:E.string(),name:E.string(),member_source_group_ids:E.array(E.string()),is_power:E.boolean().optional(),is_ground:E.boolean().optional(),is_digital_signal:E.boolean().optional(),is_analog_signal:E.boolean().optional(),trace_width:E.number().optional(),subcircuit_id:E.string().optional()}),o2e=E.object({type:E.literal("schematic_box"),schematic_component_id:E.string(),width:ac,height:ac,x:ac,y:ac}).describe("Draws a box on the schematic"),s2e=E.object({type:E.literal("schematic_path"),schematic_component_id:E.string(),fill_color:E.enum(["red","blue"]).optional(),is_filled:E.boolean().optional(),points:E.array(M9)}),l2e=E.record(E.object({left_margin:kg.optional(),right_margin:kg.optional(),top_margin:kg.optional(),bottom_margin:kg.optional()})),c2e=E.object({left_size:E.number(),right_size:E.number(),top_size:E.number().optional(),bottom_size:E.number().optional()}),u2e=E.object({left_side:E.object({pins:E.array(E.number()),direction:E.enum(["top-to-bottom","bottom-to-top"]).optional()}).optional(),right_side:E.object({pins:E.array(E.number()),direction:E.enum(["top-to-bottom","bottom-to-top"]).optional()}).optional(),top_side:E.object({pins:E.array(E.number()),direction:E.enum(["left-to-right","right-to-left"]).optional()}).optional(),bottom_side:E.object({pins:E.array(E.number()),direction:E.enum(["left-to-right","right-to-left"]).optional()}).optional()}),f2e=E.union([c2e,u2e]),d2e=E.object({type:E.literal("schematic_component"),size:eY,center:M9,source_component_id:E.string(),schematic_component_id:E.string(),pin_spacing:kg.optional(),pin_styles:l2e.optional(),box_width:kg.optional(),symbol_name:E.string().optional(),port_arrangement:f2e.optional(),port_labels:E.record(E.string()).optional(),symbol_display_value:E.string().optional()}),p2e=E.object({type:E.literal("schematic_line"),schematic_component_id:E.string(),x1:ac,x2:ac,y1:ac,y2:ac}),h2e=E.object({type:E.literal("schematic_trace"),schematic_trace_id:E.string(),source_trace_id:E.string(),junctions:E.array(E.object({x:E.number(),y:E.number()})),edges:E.array(E.object({from:E.object({x:E.number(),y:E.number()}),to:E.object({x:E.number(),y:E.number()}),is_crossing:E.boolean().optional(),from_schematic_port_id:E.string().optional(),to_schematic_port_id:E.string().optional()}))}),m2e=E.object({type:E.literal("schematic_text"),schematic_component_id:E.string(),schematic_text_id:E.string(),text:E.string(),position:E.object({x:ac,y:ac}),rotation:E.number().default(0),anchor:E.enum(["center","left","right","top","bottom"]).default("center"),color:E.string().default("#000000")}),v2e=E.object({type:E.literal("schematic_port"),schematic_port_id:E.string(),source_port_id:E.string(),schematic_component_id:E.string().optional(),center:M9,facing_direction:E.enum(["up","down","left","right"]).optional(),distance_from_component_edge:E.number().optional(),side_of_component:E.enum(["top","bottom","left","right"]).optional(),true_ccw_index:E.number().optional(),pin_number:E.number().optional(),display_pin_label:E.string().optional()}).describe("Defines a port on a schematic component"),y2e=E.object({type:E.literal("schematic_net_label"),source_net_id:E.string(),center:M9,anchor_position:M9.optional(),anchor_side:E.enum(["top","bottom","left","right"]),text:E.string(),symbol_name:E.string().optional()}),g2e=E.object({type:E.literal("schematic_error"),schematic_error_id:E.string(),error_type:E.literal("schematic_port_not_found"),message:E.string()}).describe("Defines a schematic error on the schematic"),XL=E.object({type:E.literal("schematic_debug_object"),label:E.string().optional()}),_2e=XL.extend({shape:E.literal("rect"),center:M9,size:eY}),x2e=XL.extend({shape:E.literal("line"),start:M9,end:M9}),b2e=XL.extend({shape:E.literal("point"),center:M9}),S2e=E.discriminatedUnion("shape",[_2e,x2e,b2e]),w2e=E.object({type:E.literal("schematic_voltage_probe"),schematic_voltage_probe_id:E.string(),position:M9,schematic_trace_id:E.string(),voltage:qL.optional()}).describe("Defines a voltage probe measurement point on a schematic trace"),yY=E.object({type:E.literal("schematic_manual_edit_conflict_warning"),schematic_manual_edit_conflict_warning_id:r1("schematic_manual_edit_conflict_warning"),message:E.string(),schematic_component_id:E.string(),schematic_group_id:E.string().optional(),subcircuit_id:E.string().optional(),source_component_id:E.string()}).describe("Warning emitted when a component has both manual placement and explicit schX/schY coordinates"),wC=["top","bottom","inner1","inner2","inner3","inner4","inner5","inner6"],gY=E.enum(wC),xg=gY.or(E.object({name:gY})).transform(n=>typeof n=="string"?n:n.name),yE=E.enum(["top","bottom"]),E2e=E.object({x:ac,y:ac,via:E.boolean().optional(),via_to_layer:xg.optional()}),w_t=E.array(E2e),T2e=E.object({x:ac,y:ac,via:E.boolean().optional(),to_layer:xg.optional(),trace_width:ac.optional()}),M2e=E.object({type:E.literal("pcb_component"),pcb_component_id:r1("pcb_component"),source_component_id:E.string(),center:M9,layer:xg,rotation:mE,width:kg,height:kg,subcircuit_id:E.string().optional()}).describe("Defines a component on the PCB"),C2e=E.object({type:E.literal("pcb_hole"),pcb_hole_id:r1("pcb_hole"),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),hole_shape:E.enum(["circle","square"]),hole_diameter:E.number(),x:ac,y:ac}),E_t=C2e.describe("Defines a circular or square hole on the PCB"),R2e=E.object({type:E.literal("pcb_hole"),pcb_hole_id:r1("pcb_hole"),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),hole_shape:E.literal("oval"),hole_width:E.number(),hole_height:E.number(),x:ac,y:ac}),T_t=R2e.describe("Defines an oval hole on the PCB"),A2e=C2e.or(R2e),M_t=E.object({type:E.literal("pcb_plated_hole"),shape:E.literal("circle"),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),outer_diameter:E.number(),hole_diameter:E.number(),x:ac,y:ac,layers:E.array(xg),port_hints:E.array(E.string()).optional(),pcb_component_id:E.string().optional(),pcb_port_id:E.string().optional(),pcb_plated_hole_id:r1("pcb_plated_hole")}),C_t=E.object({type:E.literal("pcb_plated_hole"),shape:E.enum(["oval","pill"]),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),outer_width:E.number(),outer_height:E.number(),hole_width:E.number(),hole_height:E.number(),x:ac,y:ac,layers:E.array(xg),port_hints:E.array(E.string()).optional(),pcb_component_id:E.string().optional(),pcb_port_id:E.string().optional(),pcb_plated_hole_id:r1("pcb_plated_hole")}),R_t=E.object({type:E.literal("pcb_plated_hole"),shape:E.literal("circular_hole_with_rect_pad"),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),hole_shape:E.literal("circle"),pad_shape:E.literal("rect"),hole_diameter:E.number(),rect_pad_width:E.number(),rect_pad_height:E.number(),x:ac,y:ac,layers:E.array(xg),port_hints:E.array(E.string()).optional(),pcb_component_id:E.string().optional(),pcb_port_id:E.string().optional(),pcb_plated_hole_id:r1("pcb_plated_hole")});E.object({type:E.literal("pcb_plated_hole"),shape:E.literal("pill_hole_with_rect_pad"),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),hole_shape:E.literal("pill"),pad_shape:E.literal("rect"),hole_width:E.number(),hole_height:E.number(),rect_pad_width:E.number(),rect_pad_height:E.number(),x:ac,y:ac,layers:E.array(xg),port_hints:E.array(E.string()).optional(),pcb_component_id:E.string().optional(),pcb_port_id:E.string().optional(),pcb_plated_hole_id:r1("pcb_plated_hole")});var P2e=E.union([M_t,C_t,R_t]),N2e=E.object({type:E.literal("pcb_port"),pcb_port_id:r1("pcb_port"),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),source_port_id:E.string(),pcb_component_id:E.string(),x:ac,y:ac,layers:E.array(xg)}).describe("Defines a port on the PCB"),A_t=E.object({type:E.literal("pcb_smtpad"),shape:E.literal("circle"),pcb_smtpad_id:r1("pcb_smtpad"),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),x:ac,y:ac,radius:E.number(),layer:xg,port_hints:E.array(E.string()).optional(),pcb_component_id:E.string().optional(),pcb_port_id:E.string().optional()}),P_t=E.object({type:E.literal("pcb_smtpad"),shape:E.literal("rect"),pcb_smtpad_id:r1("pcb_smtpad"),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),x:ac,y:ac,width:E.number(),height:E.number(),layer:xg,port_hints:E.array(E.string()).optional(),pcb_component_id:E.string().optional(),pcb_port_id:E.string().optional()}),N_t=E.object({type:E.literal("pcb_smtpad"),shape:E.literal("rotated_rect"),pcb_smtpad_id:r1("pcb_smtpad"),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),x:ac,y:ac,width:E.number(),height:E.number(),ccw_rotation:mE,layer:xg,port_hints:E.array(E.string()).optional(),pcb_component_id:E.string().optional(),pcb_port_id:E.string().optional()}),D2e=E.object({type:E.literal("pcb_smtpad"),shape:E.literal("pill"),pcb_smtpad_id:r1("pcb_smtpad"),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),x:ac,y:ac,width:E.number(),height:E.number(),radius:E.number(),layer:xg,port_hints:E.array(E.string()).optional(),pcb_component_id:E.string().optional(),pcb_port_id:E.string().optional()}),L2e=E.union([A_t,P_t,N_t,D2e]).describe("Defines an SMT pad on the PCB"),D_t=E.object({type:E.literal("pcb_solder_paste"),shape:E.literal("circle"),pcb_solder_paste_id:r1("pcb_solder_paste"),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),x:ac,y:ac,radius:E.number(),layer:xg,pcb_component_id:E.string().optional(),pcb_smtpad_id:E.string().optional()}),L_t=E.object({type:E.literal("pcb_solder_paste"),shape:E.literal("rect"),pcb_solder_paste_id:r1("pcb_solder_paste"),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),x:ac,y:ac,width:E.number(),height:E.number(),layer:xg,pcb_component_id:E.string().optional(),pcb_smtpad_id:E.string().optional()}),O2e=E.union([D_t,L_t]).describe("Defines solderpaste on the PCB"),z2e=E.object({type:E.literal("pcb_text"),pcb_text_id:r1("pcb_text"),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),text:E.string(),center:M9,layer:xg,width:kg,height:kg,lines:E.number(),align:E.enum(["bottom-left"])}).describe("Defines text on the PCB"),U2e=E.object({route_type:E.literal("wire"),x:ac,y:ac,width:ac,start_pcb_port_id:E.string().optional(),end_pcb_port_id:E.string().optional(),layer:xg}),k2e=E.object({route_type:E.literal("via"),x:ac,y:ac,from_layer:E.string(),to_layer:E.string()}),O_t=E.union([U2e,k2e]),I2e=E.object({type:E.literal("pcb_trace"),source_trace_id:E.string().optional(),pcb_component_id:E.string().optional(),pcb_trace_id:r1("pcb_trace"),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),route_thickness_mode:E.enum(["constant","interpolated"]).default("constant").optional(),route_order_index:E.number().optional(),should_round_corners:E.boolean().optional(),trace_length:E.number().optional(),route:E.array(E.union([E.object({route_type:E.literal("wire"),x:ac,y:ac,width:ac,start_pcb_port_id:E.string().optional(),end_pcb_port_id:E.string().optional(),layer:xg}),E.object({route_type:E.literal("via"),x:ac,y:ac,from_layer:E.string(),to_layer:E.string()})]))}).describe("Defines a trace on the PCB"),F2e=E.object({type:E.literal("pcb_trace_error"),pcb_trace_error_id:r1("pcb_trace_error"),error_type:E.literal("pcb_trace_error"),message:E.string(),center:M9.optional(),pcb_trace_id:E.string(),source_trace_id:E.string(),pcb_component_ids:E.array(E.string()),pcb_port_ids:E.array(E.string())}).describe("Defines a trace error on the PCB"),B2e=E.object({type:E.literal("pcb_port_not_matched_error"),pcb_error_id:r1("pcb_error"),message:E.string(),pcb_component_ids:E.array(E.string())}).describe("Defines a trace error on the PCB where a port is not matched"),j2e=E.object({type:E.literal("pcb_via"),pcb_via_id:r1("pcb_via"),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),x:ac,y:ac,outer_diameter:ac.default("0.6mm"),hole_diameter:ac.default("0.25mm"),from_layer:xg.optional(),to_layer:xg.optional(),layers:E.array(xg),pcb_trace_id:E.string().optional()}).describe("Defines a via on the PCB"),H2e=E.object({type:E.literal("pcb_board"),pcb_board_id:r1("pcb_board"),is_subcircuit:E.boolean().optional(),subcircuit_id:E.string().optional(),width:kg,height:kg,center:M9,thickness:kg.optional().default(1.4),num_layers:E.number().optional().default(4),outline:E.array(M9).optional(),material:E.enum(["fr4","fr1"]).default("fr4")}).describe("Defines the board outline of the PCB"),V2e=E.object({type:E.literal("pcb_placement_error"),pcb_placement_error_id:r1("pcb_placement_error"),message:E.string()}).describe("Defines a placement error on the PCB"),$2e=E.object({type:E.literal("pcb_trace_hint"),pcb_trace_hint_id:r1("pcb_trace_hint"),pcb_port_id:E.string(),pcb_component_id:E.string(),route:E.array(T2e)}).describe("A hint that can be used during generation of a PCB trace"),G2e=E.object({type:E.literal("pcb_silkscreen_line"),pcb_silkscreen_line_id:r1("pcb_silkscreen_line"),pcb_component_id:E.string(),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),stroke_width:ac.default("0.1mm"),x1:ac,y1:ac,x2:ac,y2:ac,layer:yE}).describe("Defines a silkscreen line on the PCB"),q2e=E.object({type:E.literal("pcb_silkscreen_path"),pcb_silkscreen_path_id:r1("pcb_silkscreen_path"),pcb_component_id:E.string(),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),layer:yE,route:E.array(M9),stroke_width:kg}).describe("Defines a silkscreen path on the PCB"),Y2e=E.object({type:E.literal("pcb_silkscreen_text"),pcb_silkscreen_text_id:r1("pcb_silkscreen_text"),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),font:E.literal("tscircuit2024").default("tscircuit2024"),font_size:ac.default("0.2mm"),pcb_component_id:E.string(),text:E.string(),ccw_rotation:E.number().optional(),layer:xg,is_mirrored:E.boolean().default(!1).optional(),anchor_position:M9.default({x:0,y:0}),anchor_alignment:E.enum(["center","top_left","top_right","bottom_left","bottom_right"]).default("center")}).describe("Defines silkscreen text on the PCB"),X2e=E.object({type:E.literal("pcb_silkscreen_rect"),pcb_silkscreen_rect_id:r1("pcb_silkscreen_rect"),pcb_component_id:E.string(),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),center:M9,width:kg,height:kg,layer:xg,stroke_width:kg.default("1mm")}).describe("Defines a silkscreen rect on the PCB"),W2e=E.object({type:E.literal("pcb_silkscreen_circle"),pcb_silkscreen_circle_id:r1("pcb_silkscreen_circle"),pcb_component_id:E.string(),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),center:M9,radius:kg,layer:yE,stroke_width:kg.default("1mm")}).describe("Defines a silkscreen circle on the PCB"),Z2e=E.object({type:E.literal("pcb_silkscreen_oval"),pcb_silkscreen_oval_id:r1("pcb_silkscreen_oval"),pcb_component_id:E.string(),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),center:M9,radius_x:ac,radius_y:ac,layer:yE}).describe("Defines a silkscreen oval on the PCB"),Q2e=E.object({type:E.literal("pcb_fabrication_note_text"),pcb_fabrication_note_text_id:r1("pcb_fabrication_note_text"),subcircuit_id:E.string().optional(),pcb_group_id:E.string().optional(),font:E.literal("tscircuit2024").default("tscircuit2024"),font_size:ac.default("1mm"),pcb_component_id:E.string(),text:E.string(),layer:yE,anchor_position:M9.default({x:0,y:0}),anchor_alignment:E.enum(["center","top_left","top_right","bottom_left","bottom_right"]).default("center"),color:E.string().optional()}).describe("Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"),K2e=E.object({type:E.literal("pcb_fabrication_note_path"),pcb_fabrication_note_path_id:r1("pcb_fabrication_note_path"),pcb_component_id:E.string(),subcircuit_id:E.string().optional(),layer:xg,route:E.array(M9),stroke_width:kg,color:E.string().optional()}).describe("Defines a fabrication path on the PCB for fabricators or assemblers"),J2e=E.object({type:E.literal("pcb_keepout"),shape:E.literal("rect"),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),center:M9,width:ac,height:ac,pcb_keepout_id:E.string(),layers:E.array(E.string()),description:E.string().optional()}).or(E.object({type:E.literal("pcb_keepout"),shape:E.literal("circle"),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),center:M9,radius:ac,pcb_keepout_id:E.string(),layers:E.array(E.string()),description:E.string().optional()})),e5e=E.object({type:E.literal("pcb_missing_footprint_error"),pcb_missing_footprint_error_id:r1("pcb_missing_footprint_error"),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),error_type:E.literal("pcb_missing_footprint_error"),source_component_id:E.string(),message:E.string()}).describe("Defines a missing footprint error on the PCB"),t5e=E.object({type:E.literal("pcb_group"),pcb_group_id:r1("pcb_group"),source_group_id:E.string(),is_subcircuit:E.boolean().optional(),subcircuit_id:E.string().optional(),width:kg,height:kg,center:M9,pcb_component_ids:E.array(E.string()),name:E.string().optional(),description:E.string().optional()}).describe("Defines a group of components on the PCB"),n5e=E.object({type:E.literal("pcb_autorouting_error"),pcb_error_id:r1("pcb_autorouting_error"),message:E.string()}).describe("The autorouting has failed to route a portion of the board"),_Y=E.object({type:E.literal("pcb_manual_edit_conflict_warning"),pcb_manual_edit_conflict_warning_id:r1("pcb_manual_edit_conflict_warning"),message:E.string(),pcb_component_id:E.string(),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),source_component_id:E.string()}).describe("Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"),r5e=E.object({type:E.literal("cad_component"),cad_component_id:E.string(),pcb_component_id:E.string(),source_component_id:E.string(),position:vE,rotation:vE.optional(),size:vE.optional(),layer:xg.optional(),footprinter_string:E.string().optional(),model_obj_url:E.string().optional(),model_stl_url:E.string().optional(),model_3mf_url:E.string().optional(),model_jscad:E.any().optional()}).describe("Defines a component on the PCB"),i5e=E.union([r2e,n2e,t2e,aY,a2e,i2e,rY,iY,tY,YL,nY,oY,sY,lY,fY,dY,mY,pY,hY,uY,cY,vY,M2e,A2e,e5e,_Y,P2e,J2e,N2e,z2e,I2e,j2e,L2e,O2e,H2e,t5e,$2e,G2e,q2e,Y2e,X2e,W2e,Z2e,F2e,V2e,B2e,K2e,Q2e,n5e,o2e,m2e,p2e,d2e,v2e,h2e,s2e,g2e,y2e,S2e,w2e,yY,r5e]),xY=i5e;const a5e=Object.freeze(Object.defineProperty({__proto__:null,all_layers:wC,any_circuit_element:i5e,any_soup_element:xY,any_source_component:t2e,battery_capacity:Qxe,cad_component:r5e,capacitance:Jq,current:__t,distance:ac,frequency:Zxe,getZodPrefixedIdWithDefault:r1,inductance:Wxe,layer_ref:xg,layer_string:gY,length:kg,pcb_autorouting_error:n5e,pcb_board:H2e,pcb_component:M2e,pcb_fabrication_note_path:K2e,pcb_fabrication_note_text:Q2e,pcb_group:t5e,pcb_hole:A2e,pcb_hole_circle_or_square_shape:E_t,pcb_hole_oval_shape:T_t,pcb_keepout:J2e,pcb_manual_edit_conflict_warning:_Y,pcb_missing_footprint_error:e5e,pcb_placement_error:V2e,pcb_plated_hole:P2e,pcb_port:N2e,pcb_port_not_matched_error:B2e,pcb_route_hint:E2e,pcb_route_hints:w_t,pcb_silkscreen_circle:W2e,pcb_silkscreen_line:G2e,pcb_silkscreen_oval:Z2e,pcb_silkscreen_path:q2e,pcb_silkscreen_rect:X2e,pcb_silkscreen_text:Y2e,pcb_smtpad:L2e,pcb_smtpad_pill:D2e,pcb_solder_paste:O2e,pcb_text:z2e,pcb_trace:I2e,pcb_trace_error:F2e,pcb_trace_hint:$2e,pcb_trace_route_point:O_t,pcb_trace_route_point_via:k2e,pcb_trace_route_point_wire:U2e,pcb_via:j2e,point:M9,point3:vE,port_arrangement:f2e,position:b_t,position3:S_t,resistance:GL,rotation:mE,route_hint_point:T2e,schematic_box:o2e,schematic_component:d2e,schematic_component_port_arrangement_by_sides:u2e,schematic_component_port_arrangement_by_size:c2e,schematic_debug_line:x2e,schematic_debug_object:S2e,schematic_debug_object_base:XL,schematic_debug_point:b2e,schematic_debug_rect:_2e,schematic_error:g2e,schematic_line:p2e,schematic_manual_edit_conflict_warning:yY,schematic_net_label:y2e,schematic_path:s2e,schematic_pin_styles:l2e,schematic_port:v2e,schematic_text:m2e,schematic_trace:h2e,schematic_voltage_probe:w2e,size:eY,source_component_base:Y2,source_group:i2e,source_led:aY,source_net:a2e,source_port:n2e,source_project_metadata:vY,source_simple_battery:sY,source_simple_bug:rY,source_simple_capacitor:tY,source_simple_chip:iY,source_simple_crystal:e2e,source_simple_diode:YL,source_simple_ground:Jxe,source_simple_inductor:lY,source_simple_mosfet:hY,source_simple_pin_header:fY,source_simple_potentiometer:uY,source_simple_power_source:oY,source_simple_push_button:cY,source_simple_resistor:nY,source_simple_resonator:dY,source_simple_switch:mY,source_simple_transistor:pY,source_trace:r2e,supplier_name:Kxe,time:x_t,visible_layer:yE,voltage:qL},Symbol.toStringTag,{value:"Module"}));function bY(n){if(n.length===0)return{minX:0,maxX:0,minY:0,maxY:0};let e=1/0,t=-1/0,r=1/0,i=-1/0;const a=o=>{e=Math.min(e,o.x),t=Math.max(t,o.x),r=Math.min(r,o.y),i=Math.max(i,o.y)};return n.forEach(o=>{switch(o.type){case"path":o.points.forEach(a);break;case"text":a({x:o.x,y:o.y});break;case"circle":{const{x:s,y:l,radius:c}=o;a({x:s-c,y:l-c}),a({x:s+c,y:l+c});break}case"box":{const{x:s,y:l,width:c,height:u}=o,f=c/2,d=u/2;a({x:s-f,y:l-d}),a({x:s+f,y:l+d});break}}}),{minX:e,maxX:t,minY:r,maxY:i}}function Bm(n){let e=n.size;if(!e){const t=bY(n.primitives);e={width:t.maxX-t.minX,height:t.maxY-t.minY}}return{...n,size:e}}var z_t={paths:{path11:{type:"path",points:[{x:-.5274831500000005,y:.03018695000000049},{x:-.30105415000000013,y:.03018695000000049}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.2932119499999999,y:.03018695000000049},{x:.5339524499999997,y:.03018695000000049}],color:"primary",fill:!1},"path11-5-5":{type:"path",points:[{x:.09765764999999949,y:.12845085000000034},{x:-.0011297500000011507,y:-.06303624999999946},{x:-.10778645000000164,y:.12845085000000034}],color:"primary",fill:!1},path17:{type:"path",points:[{x:-.002934749999999875,y:-.13606674999999946},{x:.06869635000000063,y:-.11019914999999947}],color:"primary",fill:!1},path18:{type:"path",points:[{x:.06869635000000063,y:-.11019914999999947},{x:.1403274500000009,y:-.13606674999999946}],color:"primary",fill:!1},path19:{type:"path",points:[{x:-.1461968499999997,y:-.13606674999999946},{x:-.07456574999999921,y:-.11019914999999947}],color:"primary",fill:!1},path20:{type:"path",points:[{x:-.07456575000000054,y:-.11019914999999947},{x:-.0029346500000002607,y:-.13606674999999946}],color:"primary",fill:!1}},refblocks:{left1:{x:-.5413984499999998,y:.029334149999999948},right1:{x:.54139845,y:.030330549999999734}},bounds:{width:1.1391137819999997,height:.5443252999999999,centerX:11102230246251565e-32,centerY:.05499999999999999},circles:{path1:{type:"circle",x:-.0037626500000000895,y:.03731525000000002,radius:.28854213,color:"primary",fill:!1}}},{paths:U_t,bounds:WL,refblocks:o5e,circles:k_t}=z_t,s5e=Bm({primitives:[...Object.values(U_t),...Object.values(k_t),{type:"text",text:"{REF}",x:0,y:-.3594553499999995,anchor:"middle_top"},{type:"text",text:"{VAL}",x:0,y:.35,anchor:"middle_bottom"}],ports:[{...o5e.left1,labels:["1"]},{...o5e.right1,labels:["2"]}],size:{width:WL.width,height:WL.height},center:{x:WL.centerX,y:WL.centerY}}),I_t=(n,e="right")=>{switch(e){case"down":switch(n){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(n){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(n){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 n}return n},F_t=(n,e)=>{const{primitives:t,center:r,ports:i,size:a}=n,o=D3({a:1,b:0,c:0,d:-1,e:0,f:2*r.y}),s=t.map(c=>{switch(c={...c},c.type){case"path":return{...c,points:c.points.map(v=>Ir(o,v))};case"text":const u=Ir(o,{x:c.x,y:c.y}),f={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{...c,x:u.x,y:u.y,anchor:f[c.anchor]};case"circle":case"box":const d=Ir(o,{x:c.x,y:c.y});return{...c,x:d.x,y:d.y}}}),l=i.map(c=>({...c,...Ir(o,c)}));return{primitives:s,center:r,ports:l,size:a,...e}},SY=(n,e)=>{const{primitives:t,center:r,ports:i,size:a}=n,o=D3({a:-1,b:0,c:0,d:1,e:0,f:2*r.x}),s=t.map(c=>{switch(c={...c},c.type){case"path":return{...c,points:c.points.map(v=>Ir(o,v))};case"text":const u=Ir(o,{x:c.x,y:c.y}),f={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{...c,x:u.x,y:u.y,anchor:f[c.anchor]};case"circle":case"box":const d=Ir(o,{x:c.x,y:c.y});return{...c,x:d.x,y:d.y}}}),l=i.map(c=>({...c,...Ir(o,c)}));return{primitives:s,center:r,ports:l,size:a,...e}},EC=(n,e)=>{const{newOrientation:t,overrides:r}=e,i={up:Math.PI/2,right:0,down:-Math.PI/2,left:-Math.PI},a=q5(t?i[t]:Math.PI/2,n.center.x,n.center.y),{primitives:o,center:s,size:l,ports:c}=n,u=o.map(v=>{switch(v={...v},v.type){case"path":return{...v,points:v.points.map(S=>Ir(a,S))};case"text":const y=Ir(a,{x:v.x,y:v.y});return v.anchor=I_t(v.anchor,t??"right"),{...v,x:y.x,y:y.y};case"circle":const w=Ir(a,{x:v.x,y:v.y});return{...v,x:w.x,y:w.y};case"box":const b=Ir(a,{x:v.x,y:v.y});return{...v,x:b.x,y:b.y,width:v.height,height:v.width}}}),f=c.map(v=>({...v,...Ir(a,v)})),d=bY(u);return{primitives:u,center:s,ports:f,size:{width:d.maxX-d.minX,height:d.maxY-d.minY},...r}},Cl=(n,e="down",t={})=>EC(n,{newOrientation:e,overrides:t}),B_t=EC(s5e,{newOrientation:"up"}),j_t=B_t,H_t={paths:{path40:{type:"path",points:[{x:.14458890000000002,y:.0390362999999998},{x:-.1199943999999995,y:-.09325540000000054}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.1199943999999995,y:.17132800000000015},{x:.14458890000000002,y:.0390362999999998}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.1199943999999995,y:-.09325539999999921},{x:-.1199943999999995,y:.17132800000000015}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.14458890000000002,y:.17132800000000015},{x:.14458890000000002,y:-.09325539999999921}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.12219909999999956,y:.0390362999999998},{x:-.5168693999999996,y:.0390362999999998}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.5233797000000002,y:.03895110000000024},{x:.1496715999999998,y:.03895110000000024}],color:"primary",fill:!1},"path43-8":{type:"path",points:[{x:.14339119999999994,y:.17181090000000032},{x:.07768859999999966,y:.19542900000000052}],color:"primary",fill:!1},"path43-8-3":{type:"path",points:[{x:.21083259999999981,y:-.1180321000000002},{x:.14512999999999954,y:-.094414}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.0050250999999996715,y:.26884529999999995},bottom1:{type:"text",text:"{VAL}",x:-.00011179999999977319,y:-.27884529999999996}},refblocks:{left1:{x:-.5191471000000001,y:.03992070000000081},right1:{x:.5191470999999999,y:.03889609999999988}},bounds:{width:1.094611082,height:.2976905999999999,centerX:-11102230246251565e-32,centerY:.05499999999999999},circles:{}},{paths:V_t,texts:l5e,bounds:ZL,refblocks:c5e,circles:$_t}=H_t,u5e=Bm({primitives:[...Object.values(V_t),...Object.values($_t),{...l5e.top1,anchor:"middle_bottom"},{...l5e.bottom1,anchor:"middle_top"}],ports:[{...c5e.left1,labels:["1"]},{...c5e.right1,labels:["2"]}],size:{width:ZL.width,height:ZL.height},center:{x:ZL.centerX,y:ZL.centerY}}),G_t=EC(u5e,{newOrientation:"down"}),q_t=G_t,Y_t={paths:{path43:{type:"path",points:[{x:-.05901489999999909,y:.18831315000000015},{x:-.05869489999999833,y:-.11814524999999954}],color:"primary",fill:!1},"path43-6":{type:"path",points:[{x:.015375000000000805,y:.12533125000000034},{x:.016669000000000933,y:-.05562075000000033}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.06443049999999961,y:.032673549999999496},{x:-.4368029,y:.032673549999999496}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.4350822999999997,y:.03438825000000034},{x:.028285099999999952,y:.03438825000000034}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.027835099999999446,y:.26564474999999943},bottom1:{type:"text",text:"{VAL}",x:-.028373699999999502,y:-.27564474999999966}},refblocks:{left1:{x:-.4458008,y:.033557849999999334},right1:{x:.4458008,y:.03343344999999931}},bounds:{width:.947918482,height:.2912894999999991,centerX:0,centerY:.055000000000000104},circles:{}},{paths:X_t,texts:f5e,bounds:QL,refblocks:d5e,circles:W_t}=Y_t,p5e=Bm({primitives:[...Object.values(X_t),...Object.values(W_t),{...f5e.top1,anchor:"middle_bottom"},{...f5e.bottom1,anchor:"middle_top"}],ports:[{...d5e.left1,labels:["1"]},{...d5e.right1,labels:["2"]}],size:{width:QL.width,height:QL.height},center:{x:QL.centerX,y:QL.centerY}}),Z_t=EC(p5e,{newOrientation:"up"}),KL={paths:{path1:{type:"path",points:[{x:-.511850799999999,y:.04616140000000257},{x:-.24726749999999953,y:.04616140000000257}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.2818991000000013,y:.04616140000000257},{x:.5464825000000006,y:.04616140000000257}],color:"primary",fill:!1},path3:{type:"path",points:[{x:.0173157000000006,y:.17845310000000225},{x:.2818990000000001,y:.17845310000000225},{x:.2818990000000001,y:-.0861302999999971},{x:-.24726770000000053,y:-.0861302999999971},{x:-.24726770000000053,y:.17845310000000225},{x:.017315699999998824,y:.17845310000000225}],color:"primary",fill:!1}},refblocks:{left1:{x:-.5337907000000002,y:.04580520000000021},right1:{x:.5337907000000004,y:.04525870000000154}},bounds:{centerX:11102230246251565e-32,centerY:8881784197001252e-31},circles:{}},Q_t=class{constructor(e){ht(this,"symbol");this.symbol=JSON.parse(JSON.stringify(e)),this.symbol.size=this.computeSize()}changeTextAnchor(e,t){return this.symbol={...this.symbol,primitives:this.symbol.primitives.map(r=>r.type==="text"&&r.text===e?{...r,anchor:t}:r)},this}labelPort(e,t){return this.symbol={...this.symbol,ports:this.symbol.ports.map(r=>r.labels.includes(e)?{...r,labels:t}:r)},this}rotateRightFacingSymbol(e){return this.symbol=EC(this.symbol,{newOrientation:e}),this}computeSize(){const e=bY(this.symbol.primitives);return{width:e.maxX-e.minX,height:e.maxY-e.minY}}build(){return{...this.symbol,size:this.computeSize()}}},l0=n=>new Q_t({...n,primitives:n.primitives??[...Object.values(n.paths??{}),...Object.values(n.texts??{}),...Object.values(n.circles??{}),...Object.values(n.rects??{})],ports:n.ports??Object.entries(n.refblocks).flatMap(([e,t])=>[{...t,labels:[e]}]),center:n.center??{x:n.bounds.centerX,y:n.bounds.centerY}}),{paths:K_t,bounds:h5e,refblocks:m5e,circles:J_t}=KL,ext=l0({primitives:[...Object.values(K_t),...Object.values(J_t),{type:"text",text:"{REF}",x:-.16,y:.2294553499999995},{type:"text",text:"{VAL}",x:.16,y:.2294553499999995}],ports:[{...m5e.left1,labels:["1"]},{...m5e.right1,labels:["2"]}],center:{x:h5e.centerX,y:h5e.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").build(),{paths:txt,bounds:v5e,refblocks:y5e,circles:nxt}=KL,rxt=l0({primitives:[...Object.values(txt),...Object.values(nxt),{type:"text",text:"{REF}",x:0,y:.2294553499999995},{type:"text",text:"{VAL}",x:0,y:-.1594553499999995}],ports:[{...y5e.left1,labels:["1"]},{...y5e.right1,labels:["2"]}],center:{x:v5e.centerX,y:v5e.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:ixt,bounds:g5e,refblocks:_5e,circles:axt}=KL,oxt=l0({primitives:[...Object.values(ixt),...Object.values(axt),{type:"text",text:"{REF}",x:0,y:.2294553499999995},{type:"text",text:"{VAL}",x:0,y:-.1594553499999995}],ports:[{..._5e.left1,labels:["1"]},{..._5e.right1,labels:["2"]}],center:{x:g5e.centerX,y:g5e.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:sxt,bounds:x5e,refblocks:b5e,circles:lxt}=KL,cxt=l0({primitives:[...Object.values(sxt),...Object.values(lxt),{type:"text",text:"{REF}",x:-.16,y:.2294553499999995},{type:"text",text:"{VAL}",x:.16,y:.2294553499999995}],ports:[{...b5e.left1,labels:["1"]},{...b5e.right1,labels:["2"]}],center:{x:x5e.centerX,y:x5e.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").build(),JL={paths:{path27:{type:"path",points:[{x:.5229378000000002,y:.017283050000003186},{x:.07314620000000005,y:.017283050000003186}],color:"primary",fill:!1},path28:{type:"path",points:[{x:-.0856037999999999,y:.017283050000003186},{x:-.5353954999999999,y:.017283050000003186}],color:"primary",fill:!1},path29:{type:"path",points:[{x:.0731461999999996,y:.2818663500000014},{x:.07314620000000005,y:-.24730024999999856}],color:"primary",fill:!1},path30:{type:"path",points:[{x:-.0856037999999999,y:.2818663500000014},{x:-.0856037999999999,y:-.24730024999999856}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.012864500000000056,y:.4200086500000033},bottom1:{type:"text",text:"{VAL}",x:-.003850500000000423,y:-.42000864999999976}},refblocks:{left1:{x:-.5512093000000005,y:.01638025000000276},right1:{x:.5512093,y:.016926950000001995}},bounds:{minX:-.5793677410000004,maxX:.579367741,minY:-.42000864999999976,maxY:.4200086500000033,width:1.1587354820000004,height:.8400173000000031,centerX:-2220446049250313e-31,centerY:17763568394002505e-31},circles:{}},{paths:uxt,texts:$5n,bounds:eO,refblocks:S5e,circles:fxt}=JL,dxt=l0({primitives:[...Object.values(uxt),...Object.values(fxt),{type:"text",text:"{REF}",x:-.2,y:.2094553499999995},{type:"text",text:"{VAL}",x:.2,y:.2094553499999995}],ports:[{...S5e.left1,labels:["1"]},{...S5e.right1,labels:["2"]}],size:{width:eO.width,height:eO.height},center:{x:eO.centerX,y:eO.centerY}}).changeTextAnchor("{VAL}","top_left").rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","bottom_left").build(),pxt=l0(JL).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["2"]).labelPort("right1",["1"]).changeTextAnchor("{REF}","middle_bottom").build(),wY={paths:{"path27-5":{type:"path",points:[{x:.4511331000000005,y:.017283050000003186},{x:.001333100000000531,y:.017283050000003186}],color:"primary",fill:!1},"path28-5":{type:"path",points:[{x:-.08560379999999945,y:.017283050000003186},{x:-.5353954999999995,y:.017283050000003186}],color:"primary",fill:!1},"path30-7":{type:"path",points:[{x:-.0024798999999995353,y:.28420285000000334},{x:-.0024798999999995353,y:-.247479349999999}],color:"primary",fill:!1},path8704:{type:"path",points:[{x:-.1433630999999993,y:-.24400714999999806},{x:-.1433630999999993,y:-.24400714999999806},{x:-.14262848833929928,y:-.24277205092349807},{x:-.1418975396743993,y:-.2415360290679981},{x:-.14117026348109932,y:-.24029908349449816},{x:-.14044666923519933,y:-.23906121326399818},{x:-.13972676641249931,y:-.2378224174374982},{x:-.1390105644887993,y:-.23658269507599822},{x:-.13829807293989932,y:-.2353420452404983},{x:-.13758930124159935,y:-.23410046699199832},{x:-.13688425886969938,y:-.23285795939149836},{x:-.13618295529999938,y:-.23161452149999842},{x:-.13548540000829937,y:-.23037015237849842},{x:-.13479160247039934,y:-.22912485108799843},{x:-.13410157216209936,y:-.22787861668949844},{x:-.1334153185591994,y:-.22663144824399842},{x:-.13273285113749936,y:-.22538334481249844},{x:-.13205417937279937,y:-.22413430545599844},{x:-.1313793127408994,y:-.2228843292354985},{x:-.1307082607175994,y:-.22163341521199847},{x:-.13004103277869938,y:-.2203815624464985},{x:-.1293776383999994,y:-.21912876999999853},{x:-.12871808705729942,y:-.21787503693349855},{x:-.12806238822639943,y:-.21662036230799855},{x:-.12741055138309942,y:-.21536474518449858},{x:-.12676258600319942,y:-.21410818462399858},{x:-.12611850156249946,y:-.21285067968749863},{x:-.12547830753679945,y:-.21159222943599865},{x:-.12484201340189946,y:-.21033283293049862},{x:-.12420962863359947,y:-.20907248923199864},{x:-.12358116270769948,y:-.20781119740149864},{x:-.12295662509999947,y:-.20654895649999866},{x:-.12233602528629947,y:-.20528576558849868},{x:-.12171937274239948,y:-.20402162372799865},{x:-.12110667694409948,y:-.20275652997949864},{x:-.12049794736719947,y:-.2014904834039986},{x:-.11989319348749948,y:-.20022348306249865},{x:-.11929242478079949,y:-.19895552801599864},{x:-.11869565072289952,y:-.19768661732549864},{x:-.11810288078959952,y:-.19641675005199866},{x:-.11751412445669952,y:-.19514592525649863},{x:-.1169293911999995,y:-.1938741419999986},{x:-.11634869049529953,y:-.19260139934349865},{x:-.11577203181839951,y:-.1913276963479986},{x:-.11519942464509951,y:-.1900530320744986},{x:-.11463087845119951,y:-.18877740558399858},{x:-.11406640271249952,y:-.1875008159374986},{x:-.11350600690479953,y:-.18622326219599858},{x:-.11294970050389953,y:-.18494474342049858},{x:-.11239749298559953,y:-.1836652586719986},{x:-.11184939382569953,y:-.18238480701149856},{x:-.11130541249999952,y:-.18110338749999852},{x:-.11076555848429954,y:-.17982099919849853},{x:-.11022984125439952,y:-.1785376411679985},{x:-.10969827028609953,y:-.1772533124694985},{x:-.10917085505519954,y:-.17596801216399852},{x:-.10864760503749954,y:-.17468173931249847},{x:-.10812852970879953,y:-.17339449297599843},{x:-.10761363854489954,y:-.17210627221549843},{x:-.10710294102159955,y:-.17081707609199845},{x:-.10659644661469955,y:-.16952690366649845},{x:-.10609416479999954,y:-.1682357539999984},{x:-.10559610505329955,y:-.1669436261534984},{x:-.10510227685039954,y:-.1656505191879984},{x:-.10461268966709955,y:-.16435643216449838},{x:-.10412735297919956,y:-.16306136414399838},{x:-.10364627626249956,y:-.16176531418749837},{x:-.10316946899279957,y:-.16046828135599833},{x:-.10269694064589956,y:-.15917026471049833},{x:-.10222870069759955,y:-.1578712633119983},{x:-.10176475862369955,y:-.1565712762214983},{x:-.10130512389999956,y:-.1552703024999983},{x:-.10084980600229956,y:-.15396834120849828},{x:-.10039881440639958,y:-.15266539140799829},{x:-.09995215858809957,y:-.15136145215949826},{x:-.09950984802319957,y:-.15005652252399826},{x:-.09907189218749957,y:-.14875060156249825},{x:-.09863830055679956,y:-.14744368833599825},{x:-.09820908260689958,y:-.14613578190549825},{x:-.09778424781359957,y:-.14482688133199823},{x:-.09736380565269957,y:-.1435169856764982},{x:-.09694776559999957,y:-.1422060939999982},{x:-.09653613713129958,y:-.1408942053634982},{x:-.09612892972239956,y:-.13958131882799818},{x:-.09572615284909958,y:-.13826743345449818},{x:-.09532781598719958,y:-.13695254830399817},{x:-.09493392861249958,y:-.13563666243749817},{x:-.09454450020079957,y:-.13431977491599817},{x:-.09415954022789956,y:-.13300188480049818},{x:-.09377905816959958,y:-.13168299115199816},{x:-.09340306350169958,y:-.13036309303149818},{x:-.09303156569999958,y:-.12904218949999818},{x:-.09266457424029959,y:-.12772027961849816},{x:-.09230209859839958,y:-.12639736244799815},{x:-.09194414825009957,y:-.12507343704949817},{x:-.09159073267119958,y:-.12374850248399819},{x:-.09124186133749958,y:-.12242255781249818},{x:-.09089754372479958,y:-.12109560209599818},{x:-.09055778930889957,y:-.11976763439549819},{x:-.09022260756559956,y:-.11843865377199818},{x:-.08989200797069956,y:-.11710865928649819},{x:-.08956599999999959,y:-.11577764999999829},{x:-.08956599999999959,y:-.11577764999999829},{x:-.08916166532269958,y:-.1141015840276983},{x:-.08876332646159957,y:-.11242441110159831},{x:-.08837097017289958,y:-.11074614170789834},{x:-.08798458321279957,y:-.10906678633279836},{x:-.08760415233749957,y:-.10738635546249836},{x:-.08722966430319957,y:-.10570485958319836},{x:-.08686110586609956,y:-.10402230918109837},{x:-.08649846378239957,y:-.10233871474239843},{x:-.0861417248082996,y:-.10065408675329846},{x:-.08579087569999959,y:-.09896843569999846},{x:-.08544590321369959,y:-.09728177206869845},{x:-.08510679410559958,y:-.09559410634559845},{x:-.08477353513189957,y:-.09390544901689848},{x:-.08444611304879956,y:-.09221581056879849},{x:-.08412451461249956,y:-.0905252014874985},{x:-.08380872657919955,y:-.0888336322591985},{x:-.08349873570509957,y:-.08714111337009853},{x:-.08319452874639957,y:-.08544765530639854},{x:-.08289609245929955,y:-.08375326855429854},{x:-.08260341359999955,y:-.08205796359999856},{x:-.08231647892469955,y:-.08036175092969856},{x:-.08203527518959956,y:-.07866464102959857},{x:-.08175978915089956,y:-.07696664438589859},{x:-.08149000756479956,y:-.07526777148479862},{x:-.08122591718749958,y:-.07356803281249863},{x:-.08096750477519957,y:-.07186743885519864},{x:-.08071475708409956,y:-.07016600009909864},{x:-.08046766087039958,y:-.06846372703039866},{x:-.08022620289029957,y:-.06676063013529866},{x:-.07999036989999955,y:-.06505671989999867},{x:-.07976014865569958,y:-.06335200681069868},{x:-.07953552591359955,y:-.061646501353598705},{x:-.07931648842989956,y:-.0599402140148987},{x:-.07910302296079955,y:-.0582331552807987},{x:-.07889511626249955,y:-.05652533563749871},{x:-.07869275509119955,y:-.05481676557119872},{x:-.07849592620309954,y:-.053107455568098726},{x:-.07830461635439954,y:-.05139741611439873},{x:-.07811881230129955,y:-.049686657696298736},{x:-.07793850079999953,y:-.04797519079999873},{x:-.07776366860669955,y:-.04626302591169874},{x:-.07759430247759955,y:-.04455017351759874},{x:-.07743038916889955,y:-.042836644103898744},{x:-.07727191543679954,y:-.04112244815679875},{x:-.07711886803749955,y:-.039407596162498754},{x:-.07697123372719955,y:-.03769209860719875},{x:-.07682899926209953,y:-.035975965977098755},{x:-.07669215139839955,y:-.03425920875839876},{x:-.07656067689229953,y:-.032541837437298764},{x:-.07643456249999953,y:-.03082386249999876},{x:-.07631379497769952,y:-.029105294432698766},{x:-.07619836108159952,y:-.02738614372159877},{x:-.07608824756789952,y:-.02566642085289876},{x:-.07598344119279953,y:-.023946136312798766},{x:-.07588392871249951,y:-.02222530058749876},{x:-.0757896968831995,y:-.020503924163198756},{x:-.07570073246109951,y:-.01878201752609876},{x:-.07561702220239952,y:-.017059591162398753},{x:-.07553855286329951,y:-.015336655558298754},{x:-.07546531119999951,y:-.01361322119999875},{x:-.07539728396869952,y:-.011889298573698748},{x:-.07533445792559951,y:-.010164898165598747},{x:-.07527681982689952,y:-.008440030461898743},{x:-.07522435642879952,y:-.006714705948798734},{x:-.07517705448749952,y:-.004988935112498731},{x:-.07513490075919951,y:-.0032627284391987255},{x:-.07509788200009951,y:-.0015360964150987165},{x:-.07506598496639952,y:.0001909504736012889},{x:-.0750391964142995,y:.0019184017407012956},{x:-.07501750309999951,y:.003646246900001303},{x:-.07500089177969951,y:.00537447546530131},{x:-.07498934920959952,y:.00710307695040132},{x:-.0749828621458995,y:.00883204086910133},{x:-.0749814173447995,y:.010561356735201338},{x:-.07498500156249951,y:.012291014062501347},{x:-.0749936015551995,y:.014021002364801359},{x:-.07500720407909953,y:.015751311155901372},{x:-.07502579589039951,y:.017481929949601384},{x:-.0750493637452995,y:.01921284825970139},{x:-.07507789439999951,y:.0209440556000014},{x:-.0751113746106995,y:.022675541484301412},{x:-.0751497911335995,y:.024407295426401427},{x:-.07519313072489951,y:.02613930694010145},{x:-.07524138014079951,y:.027871565539201462},{x:-.07529452613749951,y:.029604060737501478},{x:-.07535255547119951,y:.031336782048801484},{x:-.0754154548980995,y:.0330697189869015},{x:-.07548321117439952,y:.03480286106560152},{x:-.07555581105629952,y:.03653619779870154},{x:-.07563324129999952,y:.038269718700001565},{x:-.07571548866169951,y:.04000341328330158},{x:-.07580253989759951,y:.04173727106240159},{x:-.07589438176389952,y:.043471281551101616},{x:-.07599100101679952,y:.04520543426320164},{x:-.07609238441249952,y:.04693971871250166},{x:-.07619851870719953,y:.048674124412801674},{x:-.07630939065709953,y:.0504086408779017},{x:-.07642498701839952,y:.05214325762160172},{x:-.07654529454729952,y:.05387796415770175},{x:-.07667029999999952,y:.055612750000001654},{x:-.07667029999999952,y:.055612750000001654},{x:-.07680210846969952,y:.05708314936460168},{x:-.07693595411759954,y:.05855396299680169},{x:-.07707186730189955,y:.06002517220420173},{x:-.07720987838079954,y:.06149675829440175},{x:-.07735001771249954,y:.06296870257500178},{x:-.07749231565519954,y:.06444098635360178},{x:-.07763680256709955,y:.0659135909378018},{x:-.07778350880639956,y:.06738649763520185},{x:-.07793246473129956,y:.06885968775340187},{x:-.07808370069999958,y:.07033314260000188},{x:-.07823724707069958,y:.07180684348260188},{x:-.07839313420159956,y:.07328077170880191},{x:-.07855139245089958,y:.07475490858620194},{x:-.07871205217679958,y:.07622923542240194},{x:-.07887514373749958,y:.07770373352500196},{x:-.07904069749119959,y:.07917838420160196},{x:-.07920874379609959,y:.080653168759802},{x:-.07937931301039959,y:.082128068507202},{x:-.07955243549229958,y:.08360306475140203},{x:-.0797281415999996,y:.085078138800002},{x:-.0799064616916996,y:.08655327196060203},{x:-.08008742612559962,y:.08802844554080204},{x:-.08027106525989962,y:.08950364084820207},{x:-.08045740945279962,y:.09097883919040207},{x:-.08064648906249965,y:.0924540218750021},{x:-.08083833444719964,y:.0939291702096021},{x:-.08103297596509963,y:.09540426550180209},{x:-.08123044397439966,y:.09687928905920212},{x:-.08143076883329967,y:.09835422218940212},{x:-.08163398089999965,y:.09982904620000212},{x:-.08184011053269966,y:.10130374239860213},{x:-.08204918808959966,y:.10277829209280215},{x:-.08226124392889968,y:.10425267659020215},{x:-.08247630840879966,y:.10572687719840214},{x:-.08269441188749967,y:.10720087522500214},{x:-.08291558472319968,y:.10867465197760214},{x:-.0831398572740997,y:.11014818876380215},{x:-.08336725989839969,y:.11162146689120216},{x:-.0835978229542997,y:.11309446766740217},{x:-.0838315767999997,y:.11456717240000215},{x:-.08406855179369971,y:.11603956239660215},{x:-.0843087782935997,y:.11751161896480215},{x:-.08455228665789971,y:.11898332341220215},{x:-.0847991072447997,y:.12045465704640215},{x:-.08504927041249971,y:.12192560117500215},{x:-.0853028065191997,y:.12339613710560214},{x:-.08555974592309973,y:.12486624614580213},{x:-.08582011898239973,y:.12633590960320215},{x:-.08608395605529973,y:.12780510878540213},{x:-.08635128749999971,y:.1292738250000021},{x:-.08662214367469973,y:.1307420395546021},{x:-.08689655493759973,y:.1322097337568021},{x:-.08717455164689972,y:.13367688891420207},{x:-.08745616416079972,y:.13514348633440207},{x:-.08774142283749972,y:.13660950732500204},{x:-.08803035803519974,y:.13807493319360203},{x:-.08832300011209973,y:.13953974524780205},{x:-.08861937942639975,y:.14100392479520202},{x:-.08891952633629974,y:.14246745314340203},{x:-.08922347119999974,y:.14393031160000203},{x:-.08953124437569973,y:.145392481472602},{x:-.08984287622159975,y:.14685394406880198},{x:-.09015839709589976,y:.148314680696202},{x:-.09047783735679976,y:.149774672662402},{x:-.09080122736249976,y:.15123390127500197},{x:-.09112859747119977,y:.15269234784160193},{x:-.09145997804109976,y:.15414999366980195},{x:-.09179539943039977,y:.15560682006720195},{x:-.09213489199729977,y:.1570628083414019},{x:-.09247848609999976,y:.1585179398000019},{x:-.09282621209669975,y:.1599721957506019},{x:-.09317810034559978,y:.1614255575008019},{x:-.09353418120489977,y:.16287800635820185},{x:-.09389448503279976,y:.16432952363040182},{x:-.09425904218749978,y:.16578009062500182},{x:-.09462788302719977,y:.1672296886496018},{x:-.09500103791009978,y:.1686782990118018},{x:-.09537853719439979,y:.17012590301920177},{x:-.09576041123829979,y:.17157248197940175},{x:-.09614669039999979,y:.17301801720000176},{x:-.09653740503769978,y:.17446248998860173},{x:-.0969325855095998,y:.17590588165280172},{x:-.09733226217389979,y:.17734817350020168},{x:-.09773646538879979,y:.1787893468384017},{x:-.0981452255124998,y:.18022938297500168},{x:-.0985585729031998,y:.18166826321760166},{x:-.09897653791909979,y:.1831059688738016},{x:-.09939915091839979,y:.1845424812512016},{x:-.0998264422592998,y:.1859777816574016},{x:-.1002584422999998,y:.1874118514000016},{x:-.1006951813986998,y:.18884467178660155},{x:-.1011366899135998,y:.19027622412480152},{x:-.10158299820289979,y:.19170648972220153},{x:-.1020341366247998,y:.1931354498864015},{x:-.1024901355374998,y:.1945630859250015},{x:-.1029510252991998,y:.19598937914560147},{x:-.10341683626809982,y:.19741431085580147},{x:-.1038875988023998,y:.19883786236320142},{x:-.1043633432602998,y:.20026001497540138},{x:-.10484409999999977,y:.2016807500000013},{x:-.10484409999999977,y:.2016807500000013},{x:-.10512829034499978,y:.20251255364660126},{x:-.10541452131999979,y:.2033439212528012},{x:-.10570279283499981,y:.2041748478182012},{x:-.10599310479999982,y:.20500532834240115},{x:-.10628545712499982,y:.20583535782500112},{x:-.10657984971999983,y:.20666493126560112},{x:-.10687628249499985,y:.2074940436638011},{x:-.10717475535999986,y:.20832269001920106},{x:-.10747526822499989,y:.2091508653314011},{x:-.1077778209999999,y:.20997856460000103},{x:-.10808241359499988,y:.21080578282460102},{x:-.10838904591999989,y:.21163251500480096},{x:-.10869771788499989,y:.212458756140201},{x:-.10900842939999988,y:.21328450123040094},{x:-.10932118037499987,y:.21410974527500093},{x:-.10963597071999989,y:.21493448327360093},{x:-.10995280034499992,y:.21575871022580093},{x:-.1102716691599999,y:.2165824211312009},{x:-.1105925770749999,y:.21740561098940095},{x:-.11091552399999992,y:.21822827480000093},{x:-.1112405098449999,y:.2190504075626009},{x:-.11156753451999993,y:.21987200427680093},{x:-.11189659793499994,y:.22069305994220095},{x:-.11222769999999993,y:.22151356955840096},{x:-.11256084062499995,y:.222333528125001},{x:-.11289601971999996,y:.223152930641601},{x:-.11323323719499996,y:.223971772107801},{x:-.11357249295999995,y:.22479004752320103},{x:-.11391378692499997,y:.22560775188740104},{x:-.11425711899999995,y:.22642488020000104},{x:-.11460248909499995,y:.22724142746060105},{x:-.11494989711999995,y:.2280573886688011},{x:-.11529934298499996,y:.22887275882420108},{x:-.11565082659999995,y:.22968753292640107},{x:-.11600434787499994,y:.23050170597500114},{x:-.11635990671999996,y:.23131527296960114},{x:-.11671750304499996,y:.23212822890980117},{x:-.11707713675999995,y:.23294056879520117},{x:-.11743880777499995,y:.2337522876254012},{x:-.11780251599999993,y:.2345633804000012},{x:-.11816826134499994,y:.23537384211860124},{x:-.11853604371999993,y:.23618366778080127},{x:-.11890586303499992,y:.2369928523862013},{x:-.11927771919999992,y:.23780139093440128},{x:-.11965161212499995,y:.23860927842500138},{x:-.12002754171999992,y:.23941650985760138},{x:-.12040550789499993,y:.24022308023180142},{x:-.12078551055999992,y:.24102898454720142},{x:-.12116754962499991,y:.24183421780340145},{x:-.12155162499999989,y:.24263877500000142},{x:-.1219377365949999,y:.2434426511366015},{x:-.1223258843199999,y:.2442458412128015},{x:-.1227160680849999,y:.24504834022820154},{x:-.12310828779999988,y:.24585014318240156},{x:-.12350254337499987,y:.24665124507500158},{x:-.12389883471999988,y:.24745164090560162},{x:-.12429716174499987,y:.24825132567380165},{x:-.12469752435999987,y:.2490502943792017},{x:-.12509992247499988,y:.2498485420214017},{x:-.12550435599999984,y:.25064606360000175},{x:-.12591082484499985,y:.25144285411460177},{x:-.12631932891999986,y:.2522389085648018},{x:-.12672986813499987,y:.25303422195020187},{x:-.12714244239999986,y:.25382878927040187},{x:-.12755705162499986,y:.25462260552500193},{x:-.12797369571999986,y:.25541566571360197},{x:-.12839237459499983,y:.256207964835802},{x:-.12881308815999984,y:.256999497891202},{x:-.12923583632499985,y:.2577902598794021},{x:-.12966061899999984,y:.2585802458000021},{x:-.13008743609499984,y:.25936945065260214},{x:-.13051628751999986,y:.2601578694368022},{x:-.13094717318499982,y:.26094549715220217},{x:-.13138009299999984,y:.26173232879840225},{x:-.13181504687499984,y:.2625183593750023},{x:-.13225203471999986,y:.2633035838816023},{x:-.13269105644499984,y:.26408799731780236},{x:-.13313211195999985,y:.26487159468320237},{x:-.13357520117499982,y:.2656543709774024},{x:-.13402032399999986,y:.26643632120000244},{x:-.13446748034499983,y:.26721744035060246},{x:-.13491667011999983,y:.26799772342880246},{x:-.13536789323499984,y:.2687771654342025},{x:-.13582114959999986,y:.2695557613664026},{x:-.13627643912499987,y:.27033350622500263},{x:-.13673376171999985,y:.27111039500960266},{x:-.13719311729499983,y:.2718864227198026},{x:-.13765450575999985,y:.2726615843552027},{x:-.13811792702499986,y:.2734358749154028},{x:-.1385833809999999,y:.2742092894000028},{x:-.13905086759499988,y:.2749818228086028},{x:-.1395203867199999,y:.2757534701408028},{x:-.1399919382849999,y:.27652422639620283},{x:-.14046552219999991,y:.27729408657440285},{x:-.1409411383749999,y:.2780630456750029},{x:-.1414187867199999,y:.2788310986976029},{x:-.14189846714499993,y:.27959824064180294},{x:-.14238017955999993,y:.2803644665072029},{x:-.1428639238749999,y:.28112977129340294},{x:-.1433496999999999,y:.28189415000000295}],color:"primary",fill:!1},"rect1577-4":{type:"path",points:[{x:.26345180000000035,y:.2455934500000012},{x:.12298460000000011,y:.2455934500000012},{x:.12298460000000011,y:.2505664500000009},{x:.26345180000000035,y:.2505664500000009}],color:"primary",fill:!0},"rect1577-4-7":{type:"path",points:[{x:.19576130000000003,y:.31834525000000014},{x:.19576130000000003,y:.17787805000000034},{x:.1907882999999999,y:.17787805000000034},{x:.1907882999999999,y:.31834525000000014}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.012864499999999612,y:.4200086500000033},bottom1:{type:"text",text:"{VAL}",x:-.003850499999999979,y:-.42000864999999976}},refblocks:{left1:{x:-.5353954999999995,y:.016380250000000984},right1:{x:.4511331000000005,y:.016926950000001995}},bounds:{minX:-.579367741,maxX:.579367741,minY:-.42000864999999976,maxY:.4200086500000033,width:1.158735482,height:.8400173000000031,centerX:0,centerY:17763568394002505e-31},circles:{}},{paths:hxt,texts:G5n,bounds:tO,refblocks:w5e,circles:mxt}=wY,vxt=l0({primitives:[...Object.values(hxt),...Object.values(mxt),{type:"text",text:"{REF}",x:-.2,y:.2094553499999995},{type:"text",text:"{VAL}",x:.3,y:.2094553499999995}],ports:[{...w5e.left1,labels:["1"]},{...w5e.right1,labels:["2"]}],size:{width:tO.width,height:tO.height},center:{x:tO.centerX,y:tO.centerY}}).changeTextAnchor("{VAL}","top_left").rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","bottom_left").build(),E5e=l0(wY).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),yxt=l0(E5e).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_top").build(),{paths:gxt,texts:q5n,bounds:nO,refblocks:T5e,circles:_xt}=wY,xxt=l0({primitives:[...Object.values(gxt),...Object.values(_xt),{type:"text",text:"{REF}",x:.1,y:-.2094553499999995},{type:"text",text:"{VAL}",x:-.2,y:-.2094553499999995}],ports:[{...T5e.left1,labels:["1"]},{...T5e.right1,labels:["2"]}],size:{width:nO.width,height:nO.height},center:{x:nO.centerX,y:nO.centerY}}).changeTextAnchor("{VAL}","top_left").rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","bottom_left").build(),bxt=l0(JL).rotateRightFacingSymbol("right").changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:Sxt,texts:Y5n,bounds:rO,refblocks:M5e,circles:wxt}=JL,Ext=l0({primitives:[...Object.values(Sxt),...Object.values(wxt),{type:"text",text:"{REF}",x:.2,y:-.2094553499999995},{type:"text",text:"{VAL}",x:-.2,y:-.2094553499999995}],ports:[{...M5e.left1,labels:["1"]},{...M5e.right1,labels:["2"]}],size:{width:rO.width,height:rO.height},center:{x:rO.centerX,y:rO.centerY}}).changeTextAnchor("{VAL}","top_left").rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","bottom_left").build(),C5e={paths:{path11:{type:"path",points:[{x:-.5274831500000005,y:.02897970000000072},{x:-.30105415000000013,y:.02897970000000072}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.2932119499999999,y:.02897970000000072},{x:.5339524499999997,y:.02897970000000072}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.2932119499999999,y:.2923763000000008},{x:.2932119499999999,y:-.23441689999999937}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.021208049999999812,y:.3692298999999999},bottom1:{type:"text",text:"{VAL}",x:-.00661455000000033,y:-.3692298999999999}},refblocks:{left1:{x:-.5413984499999998,y:.028126900000000177},right1:{x:.54139845,y:.029123299999999963}},bounds:{minX:-.5695568909999997,maxX:.569556891,minY:-.3692298999999999,maxY:.3692298999999999,width:1.1391137819999997,height:.7384597999999998,centerX:11102230246251565e-32,centerY:0},circles:{path1:{type:"circle",x:-.0037626500000000895,y:.03610800000000025,radius:.28854213,color:"primary",fill:!1}}},Txt=l0(C5e).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),Mxt=l0(C5e).rotateRightFacingSymbol("down").changeTextAnchor("{VAL}","middle_right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").build(),Cxt={paths:{path27:{type:"path",points:[{x:.52188525,y:-.010083950000000286},{x:.1314137500000001,y:-.010083950000000286}],color:"primary",fill:!1},path29:{type:"path",points:[{x:.12501034999999971,y:.25449935000000146},{x:.12501035000000016,y:-.2746672499999985}],color:"primary",fill:!1},"path29-2":{type:"path",points:[{x:.07157854999999946,y:.253778650000001},{x:.07157854999999991,y:-.27538794999999716}],color:"primary",fill:!1},path30:{type:"path",points:[{x:-.13957305000000053,y:.25449935000000146},{x:-.1395730500000001,y:-.2746672499999985}],color:"primary",fill:!1},"path29-5":{type:"path",points:[{x:-.08349325000000052,y:.25541165000000277},{x:-.08349325000000007,y:-.27375494999999894}],color:"primary",fill:!1},"path29-2-7":{type:"path",points:[{x:.07147894999999993,y:.2552525499999998},{x:-.0829032500000002,y:.2552525499999998}],color:"primary",fill:!1},"path29-2-7-6":{type:"path",points:[{x:.07107315000000014,y:-.27817384999999817},{x:-.08330905,y:-.27817384999999817}],color:"primary",fill:!1},path43:{type:"path",points:[{x:-.21327535000000042,y:.31803495000000304},{x:.19712464999999968,y:.31807695}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.003324649999999707,y:.694594949999999},{x:.003324649999999707,y:.3310069500000008},{x:.003324649999999707,y:.3209089500000015}],color:"primary",fill:!1},"path43-8":{type:"path",points:[{x:-.21327535000000042,y:.3180639499999991},{x:-.21327535000000042,y:.2498769499999991}],color:"primary",fill:!1},"path43-8-8":{type:"path",points:[{x:.19712464999999968,y:.31807695},{x:.19712464999999968,y:.24987695000000443}],color:"primary",fill:!1},"path43-9":{type:"path",points:[{x:.19226054999999942,y:-.3468980499999983},{x:-.21813945000000068,y:-.3469400500000006}],color:"primary",fill:!1},"path44-0-5":{type:"path",points:[{x:-.024339450000000262,y:-.7234580499999996},{x:-.024339450000000262,y:-.3598700499999996},{x:-.024339450000000262,y:-.34977205000000033}],color:"primary",fill:!1},"path43-8-1":{type:"path",points:[{x:.19226054999999942,y:-.3469270499999997},{x:.19226054999999942,y:-.2787400499999979}],color:"primary",fill:!1},"path43-8-8-9":{type:"path",points:[{x:-.21813955000000096,y:-.34694015},{x:-.21813955000000096,y:-.27874015000000085}],color:"primary",fill:!1},path28:{type:"path",points:[{x:-.14368304999999992,y:-.010083950000000286},{x:-.5364480500000002,y:-.010083950000000286}],color:"primary",fill:!1}},texts:{left1:{type:"text",text:"{REF}",x:-.38155925000000046,y:.09576035000000083},right1:{type:"text",text:"{VAL}",x:.3369813499999994,y:-.17868404999999754}},refblocks:{top1:{x:.0032092499999998303,y:.7114137500000002},bottom1:{x:-.02355145000000025,y:-.7114137500000002},left1:{x:-.5415391500000004,y:-.00607074999999746},right1:{x:.5415391499999997,y:-.012221549999997805}},bounds:{minX:-.5696975910000004,maxX:.5696975909999997,minY:-.7395721910000002,maxY:.7395721910000002,width:1.1393951820000001,height:1.4791443820000003,centerX:-33306690738754696e-32,centerY:0},circles:{}},R5e=l0(Cxt).labelPort("top1",["2","gnd1"]).labelPort("bottom1",["4","gnd2"]).labelPort("left1",["1"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","bottom_right").changeTextAnchor("{VAL}","top_left").build(),Rxt=l0(R5e).rotateRightFacingSymbol("up").changeTextAnchor("{REF}","top_right").changeTextAnchor("{VAL}","bottom_left").build(),A5e={paths:{path27:{type:"path",points:[{x:.5229378000000002,y:-.012283099999995883},{x:.13246630000000037,y:-.012283099999995883}],color:"primary",fill:!1},path28:{type:"path",points:[{x:-.14263049999999966,y:-.012283099999995883},{x:-.5353954999999999,y:-.012283099999995883}],color:"primary",fill:!1},path29:{type:"path",points:[{x:.12606289999999998,y:-.2768663999999976},{x:.12606290000000042,y:.2523002000000023}],color:"primary",fill:!1},"path29-2":{type:"path",points:[{x:.07263109999999973,y:-.27614569999999716},{x:.07263110000000017,y:.253020900000001}],color:"primary",fill:!1},path30:{type:"path",points:[{x:-.13852050000000027,y:-.2768663999999976},{x:-.13852049999999982,y:.2523002000000023}],color:"primary",fill:!1},"path29-5":{type:"path",points:[{x:-.08244070000000026,y:-.27777869999999893},{x:-.08244069999999981,y:.2513879000000028}],color:"primary",fill:!1},"path29-2-7":{type:"path",points:[{x:.07253150000000019,y:-.27761959999999597},{x:-.08185069999999994,y:-.27761959999999597}],color:"primary",fill:!1},"path29-2-7-6":{type:"path",points:[{x:.0721257000000004,y:.255806800000002},{x:-.08225649999999973,y:.255806800000002}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.012864500000000056,y:-.4150086999999978},bottom1:{type:"text",text:"{VAL}",x:-.003850500000000423,y:.4250087000000011}},refblocks:{left1:{x:-.5512093000000002,y:-.011380399999998403},right1:{x:.5512093,y:-.011926899999997076}},bounds:{minX:-.5793677410000002,maxX:.579367741,minY:-.5150086999999978,maxY:.4250087000000011,width:1.1587354820000002,height:1,centerX:-11102230246251565e-32,centerY:-.04499999999999832},circles:{}},Axt=l0(A5e).changeTextAnchor("{VAL}","middle_bottom").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_top").build(),Pxt=l0(A5e).rotateRightFacingSymbol("down").changeTextAnchor("{VAL}","middle_left").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_right").build(),EY={paths:{path11:{type:"path",points:[{x:1.9942486145,y:-1.6422072295000003},{x:2.0984258145,y:-1.6428272295000004}],color:"primary",fill:!1},"path40-0":{type:"path",points:[{x:2.1030704145000003,y:-1.4809259295000001},{x:2.1026604145,y:-1.8041042295}],color:"primary",fill:!1},"path40-0-5":{type:"path",points:[{x:2.2218770145,y:-1.4969414295},{x:2.1063461145,y:-1.5757354295000003}],color:"primary",fill:!1},"path40-0-5-0":{type:"path",points:[{x:2.2286252145,y:-1.7819395295000002},{x:2.1136540145000002,y:-1.7033263295}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:2.2273251145,y:-1.4948802295},{x:2.2284101145,y:-1.1518438295000002}],color:"primary",fill:!1},"path12-1-5-3":{type:"path",points:[{x:2.2276017145,y:-1.9567437295},{x:2.2281317145,y:-1.7888340295000003}],color:"primary",fill:!1},"arrow-2":{type:"path",points:[{x:2.1704797145,y:-1.6991380295000003},{x:2.1275815145,y:-1.7604028295000003},{x:2.1917009144999997,y:-1.7601828295000004},{x:2.1704797145,y:-1.6991380295000003}],color:"primary",fill:!0},path1:{type:"path",points:[{x:1.5978828145000001,y:-1.5020091295000002},{x:1.8597023145000002,y:-1.5035561295000002}],color:"primary",fill:!1},path2:{type:"path",points:[{x:1.8686937145000002,y:-1.3411936295000002},{x:1.8682837145,y:-1.6643719295000001}],color:"primary",fill:!1},path3:{type:"path",points:[{x:1.9875004145000004,y:-1.3572092295000002},{x:1.8719693145,y:-1.4360031295000002}],color:"primary",fill:!1},path4:{type:"path",points:[{x:1.9942486145,y:-1.6422072295000003},{x:1.8792773145000001,y:-1.5635940295000004}],color:"primary",fill:!1},"arrow-1":{type:"path",points:[{x:1.9361028144999999,y:-1.5594057295000003},{x:1.8932048145,y:-1.6206705295000003},{x:1.9573242144999998,y:-1.6204505295000005},{x:1.9361028144999999,y:-1.5594057295000003}],color:"primary",fill:!0},path9:{type:"path",points:[{x:1.9943087144999998,y:-1.3539494295000003},{x:2.2269582145,y:-1.3556534295000002}],color:"primary",fill:!1}},texts:{bottom1:{type:"text",text:"{VAL}",x:1.8805772145,y:-1.9423669295000003},right1:{type:"text",text:"{REF}",x:1.8845380145,y:-1.1387692295000003}},refblocks:{right1:{x:2.2278617145000004,y:-1.9651412295000004},right2:{x:1.5977076145000002,y:-1.5027827295000002},right3:{x:2.2278680145,y:-1.1403971295000002}},bounds:{minX:1.5810976555000003,maxX:2.3461148445,minY:-1.9817511885000003,maxY:-1.1237871705000002,width:.7650171889999999,height:.8579640180000001,centerX:1.9636062500000002,centerY:-1.5527691795000003},circles:{"path1-0":{type:"circle",x:2.0463372145000003,y:-1.5363384295000002,radius:.29977763,color:"primary",fill:!1}}},Nxt=l0(EY).changeTextAnchor("{VAL}","middle_top").labelPort("right2",["1"]).labelPort("right3",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_bottom").build();EY.bounds.width+=.3;var Dxt=l0(EY).rotateRightFacingSymbol("down").changeTextAnchor("{VAL}","middle_right").labelPort("right2",["1"]).labelPort("right3",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_left").build(),Lxt={paths:{path11:{type:"path",points:[{x:-.5307178,y:0},{x:-.3042887999999997,y:0}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.2899773000000003,y:0},{x:.5307178000000001,y:0}],color:"primary",fill:!1},path2:{type:"path",points:[{x:-.12447409999999959,y:.0852510999999998},{x:.11626639999999999,y:.0852510999999998}],color:"primary",fill:!1}},texts:{left1:{type:"text",text:"A",x:0,y:-.1}},refblocks:{left1:{x:-.5446330999999993,y:0},right1:{x:.5381638000000004,y:0}},bounds:{width:1.0614356000000003,height:1,centerX:5551115123125783e-32,centerY:-11102230246251565e-32},circles:{path1:{type:"circle",x:0,y:0,radius:.28854213,color:"primary",fill:!1}}},{paths:Oxt,texts:zxt,bounds:iO,refblocks:P5e,circles:Uxt}=Lxt,TY=Bm({primitives:[...Object.values(Oxt),...Object.values(Uxt),{type:"text",text:"{REF}",x:0,y:-.3594553499999995,anchor:"middle_top"},{type:"text",text:"{VAL}",x:0,y:.35,anchor:"middle_bottom"},{...zxt.left1,x:0,y:.01,anchor:"center",fontSize:.3}],ports:[{...P5e.left1,labels:["1"]},{...P5e.right1,labels:["2"]}],size:{width:iO.width,height:iO.height},center:{x:iO.centerX,y:iO.centerY}});function kxt(n){return typeof n=="object"&&n!==null&&n.type==="path"&&Array.isArray(n.points)&&typeof n.color=="string"}function Ixt(n){return typeof n=="object"&&n!==null&&n.type==="text"&&typeof n.text=="string"&&typeof n.x=="number"&&typeof n.y=="number"&&typeof n.anchor=="string"}var{6:MY,2:CY,...Fxt}=TY.primitives;kxt(CY)&&CY.points.map(n=>{n.y+=.05}),Ixt(MY)&&(MY.y+=.025);function Bxt(n){return typeof n=="object"}var N5e=Cl({...TY,primitives:Object.values(Fxt).filter(Bxt)}),jxt={...N5e,primitives:[...N5e.primitives,MY,CY]},Hxt={paths:{path11:{type:"path",points:[{x:-.5307178,y:0},{x:-.3042887999999997,y:0}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.2899773000000003,y:0},{x:.5307178000000001,y:0}],color:"primary",fill:!1},"path11-5-5":{type:"path",points:[{x:.09442299999999992,y:-.13438304999999984},{x:-.004364400000000712,y:.05710404999999996},{x:-.1110211000000012,y:-.13438304999999984}],color:"primary",fill:!1},path2:{type:"path",points:[{x:-.12447409999999959,y:.13438304999999984},{x:.11626639999999999,y:.13438304999999984}],color:"primary",fill:!1}},refblocks:{left1:{x:-.5446330999999993,y:0},right1:{x:.5381638000000004,y:0}},bounds:{width:1.0614356000000003,height:1,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:0,radius:.28854213,color:"primary",fill:!1}}},{paths:Vxt,bounds:aO,refblocks:D5e,circles:$xt}=Hxt,RY=Bm({primitives:[...Object.values(Vxt),...Object.values($xt),{type:"text",text:"{REF}",x:0,y:-.3594553499999995,anchor:"middle_top"},{type:"text",text:"{VAL}",x:0,y:.35,anchor:"middle_bottom"}],ports:[{...D5e.left1,labels:["1"]},{...D5e.right1,labels:["2"]}],size:{width:aO.width,height:aO.height},center:{x:aO.centerX,y:aO.centerY}}),{2:Gxt,3:qxt,...Yxt}=RY.primitives;function Xxt(n){return typeof n=="object"}var L5e=Cl({...RY,primitives:Object.values(Yxt).filter(Xxt)}),Wxt={...L5e,primitives:[...L5e.primitives,Gxt,qxt]},Zxt={paths:{path11:{type:"path",points:[{x:-.5176700499999997,y:.041745050000000505},{x:-.10888805000000024,y:.041745050000000505}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.1031184499999993,y:.041745050000000505},{x:.5246894499999994,y:.041745050000000505}],color:"primary",fill:!1},"path11-0":{type:"path",points:[{x:-.09343985000000021,y:-.14620634999999882},{x:-.0930998500000002,y:.2583405500000009}],color:"primary",fill:!1},"path11-0-3":{type:"path",points:[{x:.08519034999999908,y:-.14503384999999902},{x:.08553034999999909,y:.2595130500000007}],color:"primary",fill:!1},"path11-0-9":{type:"path",points:[{x:-.08315755000000014,y:.055934450000000524},{x:-.08415755000000047,y:-.14678124999999964},{x:.08653524999999984,y:-.05104664999999953},{x:-.08126175000000035,y:.05647715000000031}],color:"primary",fill:!0},"path11-0-9-0":{type:"path",points:[{x:.07661224999999927,y:.256654450000001},{x:.07761224999999983,y:.05393885000000109},{x:-.0930805500000007,y:.1496734500000012},{x:.07471644999999949,y:.25719715000000143}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.0316381500000007,y:.41683614999999996},bottom1:{type:"text",text:"{VAL}",x:-.03022294999999975,y:-.41683614999999996}},refblocks:{left1:{x:-.54139845,y:.04089205000000051},right1:{x:.5413984499999995,y:.04188845000000008}},bounds:{minX:-.569556891,maxX:.5695568909999995,minY:-.41683614999999996,maxY:.41683614999999996,width:1.1391137819999995,height:.8336722999999999,centerX:-2220446049250313e-31,centerY:0},circles:{path1:{type:"circle",x:-.0037626500000003116,y:.048873150000000365,radius:.28854213,color:"primary",fill:!1}}},O5e=l0(Zxt).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),z5e=Cl(O5e),U5e=z5e.primitives.filter(n=>n.type==="text"),Qxt=U5e.find(n=>n.text==="{REF}"),Kxt=U5e.find(n=>n.text==="{VAL}");Qxt.y=0,Kxt.y=0;var Jxt=z5e,e2t={paths:{path40:{type:"path",points:[{x:.14458890000000002,y:.04403629999999836},{x:-.1199943999999995,y:-.08825540000000132}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.1199943999999995,y:.1763280000000016},{x:.14458890000000002,y:.04403629999999836}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.1199943999999995,y:-.08825539999999776},{x:-.1199943999999995,y:.1763280000000016}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.14458890000000002,y:.1763280000000016},{x:.14458890000000002,y:-.08825539999999776}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.12219909999999956,y:.04403629999999836},{x:-.5168693999999996,y:.04403629999999836}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.5233797,y:.04395110000000102},{x:.14967160000000002,y:.04395110000000102}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.0050250999999996715,y:.27384529999999785},bottom1:{type:"text",text:"{VAL}",x:-.00011179999999999524,y:-.2738453000000014}},refblocks:{left1:{x:-.5191471000000001,y:.0449206999999987},right1:{x:.5191471000000001,y:.043896100000001326}},bounds:{minX:-.5473055410000001,maxX:.5473055410000001,minY:-.2738453000000014,maxY:.27384529999999785,width:1.0946110820000001,height:.5476905999999993,centerX:0,centerY:-17763568394002505e-31},circles:{}},oO=l0(e2t).labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),t2t=Cl(oO,"down"),n2t=Cl(oO,"left"),r2t=Cl(oO,"up"),i2t={paths:{path1:{type:"path",points:[{x:-.3543580999999998,y:.22373490000000018},{x:-.1279290999999998,y:.22373490000000018}],color:"primary",fill:!1},"path-1-2":{type:"path",points:[{x:-.07134165999999999,y:.215546000000001},{x:.1083980000000001,y:.16078}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.10434800000000011,y:.127178},{x:.345089,y:.127178}],color:"primary",fill:!1},path3:{type:"path",points:[{x:.12008600000000014,y:.36383770000000015},{x:.360827,y:.36383770000000015}],color:"primary",fill:!1},path4:{type:"path",points:[{x:-.3543580999999998,y:-.17811849999999985},{x:-.1279290999999998,y:-.17811849999999985}],color:"primary",fill:!1},"path4-5":{type:"path",points:[{x:-.07134165999999999,y:-.1867987999999997},{x:.10434800000000011,y:-.2376754}],color:"primary",fill:!1},path5:{type:"path",points:[{x:.10434800000000011,y:-.2746754},{x:.345089,y:-.2746754}],color:"primary",fill:!1},path6:{type:"path",points:[{x:.12008600000000014,y:-.038015699999999875},{x:.360827,y:-.038015699999999875}],color:"primary",fill:!1},"path1-4-join":{type:"path",points:[{x:-.001896399999999815,y:-.19827304999999998},{x:-.001896399999999815,y:.190981}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.5644774000000002},bottom1:{type:"text",text:"{VAL}",x:0,y:-.4244773999999998}},refblocks:{left1:{x:-.3682734999999999,y:.22373490000000018},left2:{x:-.3682734999999999,y:-.17811849999999985},right1:{x:.36827350000000014,y:.36383770000000015},right2:{x:.36827350000000014,y:.12717810000000007},right3:{x:.36827350000000014,y:-.038015699999999875},right5:{x:.36827350000000014,y:-.2746754}},bounds:{minX:-.3964319409999999,maxX:.3964319410000001,minY:-.4744773999999998,maxY:.5644774000000002,width:1,height:1.0389548,centerX:-11102230246251565e-32,centerY:.045000000000000207},circles:{"circle-2":{type:"circle",x:.08200307499999998,y:.127178,radius:.023193523,color:"primary",fill:!1},"circle-5":{type:"circle",x:.08200307499999998,y:-.2745079499999997,radius:.023193523,color:"primary",fill:!1},"circle-3":{type:"circle",x:.08200307499999998,y:.369178,radius:.023193523,color:"primary",fill:!1},"circle-6":{type:"circle",x:.08200307499999998,y:-.03805079499999997,radius:.023193523,color:"primary",fill:!1},"circle-1":{type:"circle",x:-.10003074999999978,y:.219178,radius:.023193523,color:"primary",fill:!1},"circle-4":{type:"circle",x:-.10003074999999978,y:-.18250794999999972,radius:.023193523,color:"primary",fill:!1}}},sO=l0(i2t).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(),AY=Cl(sO,"down"),PY=AY.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),NY=AY.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");PY.anchor="middle_bottom",NY.anchor="middle_top",PY.x=0,PY.y+=.537,NY.y-=.5375,NY.x=0;var a2t=AY,DY=Cl(sO,"left"),LY=DY.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),OY=DY.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");LY.anchor="middle_bottom",OY.anchor="middle_top",LY.x=0,LY.y+=1,OY.y-=1,OY.x=0;var o2t=DY,zY=Cl(sO,"up"),UY=zY.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),kY=zY.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");UY.anchor="middle_bottom",kY.anchor="middle_top",UY.x=0,UY.y+=.537,kY.y-=.5375,kY.x=0;var s2t=zY,l2t={paths:{path1:{type:"path",points:[{x:-.3543580999999998,y:.22373490000000018},{x:-.1279290999999998,y:.22373490000000018}],color:"primary",fill:!1},"path-1-3":{type:"path",points:[{x:-.0741659999999987,y:.2290546000000001},{x:.1091012,y:.334}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.10434800000000011,y:.127178},{x:.345089,y:.127178}],color:"primary",fill:!1},path3:{type:"path",points:[{x:.12008600000000014,y:.36383770000000015},{x:.360827,y:.36383770000000015}],color:"primary",fill:!1},path4:{type:"path",points:[{x:-.3543580999999998,y:-.17811849999999985},{x:-.1279290999999998,y:-.17811849999999985}],color:"primary",fill:!1},"path4-6":{type:"path",points:[{x:-.0741659999999987,y:-.1777987999999997},{x:.1091012,y:-.07370029999999998}],color:"primary",fill:!1},path5:{type:"path",points:[{x:.10434800000000011,y:-.2746754},{x:.345089,y:-.2746754}],color:"primary",fill:!1},path6:{type:"path",points:[{x:.12008600000000014,y:-.038015699999999875},{x:.360827,y:-.038015699999999875}],color:"primary",fill:!1},"path1-4-join":{type:"path",points:[{x:-.000896399999999815,y:-.12190304999999999},{x:-.000896399999999815,y:.2708100000000002}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.6144774000000003},bottom1:{type:"text",text:"{VAL}",x:0,y:-.5244773999999998}},refblocks:{left1:{x:-.3682734999999999,y:.22373490000000018},left2:{x:-.3682734999999999,y:-.17811849999999985},right1:{x:.36827350000000014,y:.36383770000000015},right2:{x:.36827350000000014,y:.12717810000000007},right3:{x:.36827350000000014,y:-.038015699999999875},right5:{x:.36827350000000014,y:-.2746754}},bounds:{minX:-.3964319409999999,maxX:.3964319410000001,minY:-.4744773999999998,maxY:.5644774000000002,width:1,height:1.0389548,centerX:-11102230246251565e-32,centerY:.045000000000000207},circles:{"circle-2":{type:"circle",x:.08200307499999998,y:.127178,radius:.023193523,color:"primary",fill:!1},"circle-5":{type:"circle",x:.08200307499999998,y:-.2745079499999997,radius:.023193523,color:"primary",fill:!1},"circle-3":{type:"circle",x:.08200307499999998,y:.369178,radius:.023193523,color:"primary",fill:!1},"circle-6":{type:"circle",x:.08200307499999998,y:-.03805079499999997,radius:.023193523,color:"primary",fill:!1},"circle-1":{type:"circle",x:-.10003074999999978,y:.219178,radius:.023193523,color:"primary",fill:!1},"circle-4":{type:"circle",x:-.10003074999999978,y:-.18250794999999972,radius:.023193523,color:"primary",fill:!1}}},lO=l0(l2t).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(),IY=Cl(lO,"down"),FY=IY.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),BY=IY.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");FY.anchor="middle_bottom",BY.anchor="middle_top",FY.x=0,FY.y+=.565,BY.y-=.555,BY.x=0;var c2t=IY,jY=Cl(lO,"left"),HY=jY.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),VY=jY.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");HY.anchor="middle_bottom",VY.anchor="middle_top",HY.x=0,HY.y+=1.09,VY.y-=1.09,VY.x=0;var u2t=jY,$Y=Cl(lO,"up"),GY=$Y.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),qY=$Y.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");GY.anchor="middle_bottom",qY.anchor="middle_top",GY.x=0,GY.y+=.565,qY.y-=.555,qY.x=0;var f2t=$Y,d2t={paths:{path11:{type:"path",points:[{x:-.3622268000000006,y:.06287995000000057},{x:-.1357978000000004,y:.06287995000000057}],color:"primary",fill:!1},"path11-0":{type:"path",points:[{x:-.08700995000000007,y:.06634945000000092},{x:.11099564000000006,y:.1105995000000057}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.12795640000000064,y:.06287995000000057},{x:.36869780000000096,y:.06287995000000057}],color:"primary",fill:!1},"path11-5":{type:"path",points:[{x:-.3622270999999999,y:-.16866424999999907},{x:-.1357980999999997,y:-.16866424999999907}],color:"primary",fill:!1},"path11-0-3":{type:"path",points:[{x:-.08700995000000007,y:-.17019474999999962},{x:.11099564000000006,y:-.12466424999999907}],color:"primary",fill:!1},"path12-0":{type:"path",points:[{x:.12795610000000002,y:-.16866424999999907},{x:.3686968000000006,y:-.16866424999999907}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.30716265000000004},bottom1:{type:"text",text:"{VAL}",x:0,y:-.30716265000000004}},refblocks:{left1:{x:-.37614279999999956,y:-.16951715000000012},left3:{x:-.37614279999999956,y:.06202735000000037},right1:{x:.37614279999999933,y:-.16852074999999966},right3:{x:.37614279999999933,y:.06302374999999993}},bounds:{minX:-.40430124099999953,maxX:.4043012409999993,minY:-.39716264999999984,maxY:.39716265000000006,width:.8086024819999988,height:.7943252999999999,centerX:-11102230246251565e-32,centerY:11102230246251565e-32},circles:{"circle-4":{type:"circle",x:.09900307499999998,y:.06478,radius:.023193523,color:"primary",fill:!1},"circle-2":{type:"circle",x:.09900307499999998,y:-.16978,radius:.023193523,color:"primary",fill:!1},"circle-3":{type:"circle",x:-.11003074999999977,y:.06478,radius:.023193523,color:"primary",fill:!1},"circle-1":{type:"circle",x:-.11003074999999977,y:-.16978,radius:.023193523,color:"primary",fill:!1}}},cO=l0(d2t).labelPort("left1",["1"]).labelPort("right1",["2"]).labelPort("right3",["4"]).labelPort("left3",["3"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),YY=Cl(cO,"down"),XY=YY.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),WY=YY.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");XY.anchor="middle_bottom",WY.anchor="middle_top",XY.x=.4,XY.y+=.265,WY.y-=.265,WY.x=.4;var p2t=YY,ZY=Cl(cO,"left"),QY=ZY.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),KY=ZY.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");QY.anchor="middle_bottom",KY.anchor="middle_top",QY.x=0,QY.y+=.67,KY.y-=.67,KY.x=0;var h2t=ZY,JY=Cl(cO,"up"),eX=JY.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),tX=JY.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");eX.anchor="middle_bottom",tX.anchor="middle_top",eX.x=.46,eX.y+=.265,tX.y-=.265,tX.x=.46;var m2t=JY,v2t={paths:{path11:{type:"path",points:[{x:-.3622268000000006,y:.06287995000000057},{x:-.1357978000000004,y:.06287995000000057}],color:"primary",fill:!1},"path11-0":{type:"path",points:[{x:-.08500995000000007,y:.06934945000000092},{x:.10307889999999986,y:.2010388500000011}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.12795640000000064,y:.06287995000000057},{x:.36869780000000096,y:.06287995000000057}],color:"primary",fill:!1},"path11-5":{type:"path",points:[{x:-.3622270999999999,y:-.16866424999999907},{x:-.1357980999999997,y:-.16866424999999907}],color:"primary",fill:!1},"path11-0-3":{type:"path",points:[{x:-.08500995000000007,y:-.16201947499999997},{x:.10307860000000058,y:-.03050534999999921}],color:"primary",fill:!1},"path12-0":{type:"path",points:[{x:.12795610000000002,y:-.16866424999999907},{x:.3686968000000006,y:-.16866424999999907}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.4171626500000001},bottom1:{type:"text",text:"{VAL}",x:0,y:-.41716264999999986}},refblocks:{left1:{x:-.37614279999999956,y:-.16951715000000012},left3:{x:-.37614279999999956,y:.06202735000000037},right1:{x:.37614279999999933,y:-.16852074999999966},right3:{x:.37614279999999933,y:.06302374999999993}},bounds:{minX:-.40430124099999953,maxX:.4043012409999993,minY:-.39716264999999984,maxY:.39716265000000006,width:.8086024819999988,height:.7943252999999999,centerX:-11102230246251565e-32,centerY:11102230246251565e-32},circles:{"circle-4":{type:"circle",x:.09900307499999998,y:.06478,radius:.023193523,color:"primary",fill:!1},"circle-2":{type:"circle",x:.09900307499999998,y:-.16978,radius:.023193523,color:"primary",fill:!1},"circle-3":{type:"circle",x:-.11003074999999977,y:.06478,radius:.023193523,color:"primary",fill:!1},"circle-1":{type:"circle",x:-.11003074999999977,y:-.16978,radius:.023193523,color:"primary",fill:!1}}},uO=l0(v2t).labelPort("left1",["1"]).labelPort("right1",["2"]).labelPort("right3",["4"]).labelPort("left3",["3"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),nX=Cl(uO,"down"),rX=nX.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),iX=nX.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");rX.anchor="middle_bottom",iX.anchor="middle_top",rX.x=.4,rX.y+=.295,iX.y-=.295,iX.x=.42;var y2t=nX,aX=Cl(uO,"left"),oX=aX.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),sX=aX.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");oX.anchor="middle_bottom",sX.anchor="middle_top",oX.x=0,oX.y+=.795,sX.y-=.795,sX.x=0;var g2t=aX,lX=Cl(uO,"up"),cX=lX.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),uX=lX.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");cX.anchor="middle_bottom",uX.anchor="middle_top",cX.x=.46,cX.y+=.315,uX.y-=.315,uX.x=.46;var _2t=lX,x2t={paths:{path11:{type:"path",points:[{x:-.541495829500001,y:.044368009536419395},{x:-.21998262950000114,y:.044368009536419395}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.14450697049999905,y:.052237309536419474},{x:.46379767049999976,y:.052237309536419474}],color:"primary",fill:!1},"path12-6":{type:"path",points:[{x:.13965347050000032,y:-.14937819046358025},{x:.13854747050000027,y:.2538388095364199}],color:"primary",fill:!1},"path11-0-9":{type:"path",points:[{x:-.212703829500001,y:.2732984095364195},{x:-.2147708295000006,y:-.1493854904635803},{x:.13782137049999887,y:.050231709536419755},{x:-.2087893295000005,y:.27442980953642016}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.08906882950000083,y:.38011220953641867},bottom1:{type:"text",text:"{VAL}",x:-.0685314901614209,y:-.38011220953641844},right1:{type:"text",text:"",x:.5884896704999998,y:-.3288545904635811}},refblocks:{left1:{x:-.5603312294999999,y:.04351520953641885},right1:{x:.47524967049999955,y:.05238090953641872}},bounds:{minX:-.5884896704999999,maxX:.5884896704999998,minY:-.38011220953641844,maxY:.38011220953641867,width:1.1769793409999996,height:.7602244190728371,centerX:-5551115123125783e-32,centerY:11102230246251565e-32},circles:{}},k5e=l0(x2t).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),b2t=Cl(k5e),S2t={paths:{path11:{type:"path",points:[{x:-.5307178,y:0},{x:-.3042887999999997,y:0}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.2899773000000003,y:0},{x:.5307178000000001,y:0}],color:"primary",fill:!1}},texts:{left1:{type:"text",text:"Hz",x:0,y:-.035}},refblocks:{left1:{x:-.5446330999999993,y:.000852800000000542},right1:{x:.5381638000000004,y:-.00014359999999924433}},bounds:{width:1.0614356000000003,height:1,centerX:5551115123125783e-32,centerY:0},circles:{path1:{type:"circle",x:-.006997299999999651,y:-.007128299999999532,radius:.28854213,color:"primary",fill:!1}}},{paths:w2t,texts:E2t,bounds:fO,refblocks:I5e,circles:T2t}=S2t,fX=Bm({primitives:[...Object.values(w2t),...Object.values(T2t),{type:"text",text:"{REF}",x:0,y:-.3594553499999995,anchor:"middle_top"},{type:"text",text:"{VAL}",x:0,y:.35,anchor:"middle_bottom"},{...E2t.left1,x:0,y:.01,anchor:"center",fontSize:.2}],ports:[{...I5e.left1,labels:["1"]},{...I5e.right1,labels:["2"]}],size:{width:fO.width,height:fO.height},center:{x:fO.centerX,y:fO.centerY}}),{5:M2t,...C2t}=fX.primitives;function R2t(n){return typeof n=="object"}var F5e=Cl({...fX,primitives:Object.values(C2t).filter(R2t)}),A2t={...F5e,primitives:[...F5e.primitives,M2t]},P2t={paths:{path10:{type:"path",points:[{x:-.5283037500000001,y:.036413650000000075},{x:.5300302500000003,y:.036413650000000075}],color:"primary",fill:!1},path14:{type:"path",points:[{x:.0008652499999994845,y:.16870534999999975},{x:.2654482499999995,y:.16870534999999975},{x:.2654482499999995,y:-.0958780499999996},{x:-.2637187499999998,y:-.0958780499999996},{x:-.2637187499999998,y:.16870534999999975},{x:.0008652499999994845,y:.16870534999999975}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.008263949999999909,y:.23591724999999997}},refblocks:{left1:{x:-.5345548500000001,y:.03946054999999937},right1:{x:.5345548500000001,y:.0352561499999986}},bounds:{width:1.1254265820000002,height:.47183449999999993,centerX:0,centerY:0}},{paths:N2t,texts:D2t,bounds:dO,refblocks:B5e}=P2t,j5e=Bm({primitives:[...Object.values(N2t),{...D2t.top1,anchor:"middle_bottom"},{type:"text",text:"{VAL}",x:0,y:-.2,anchor:"middle_top"}],ports:[{...B5e.left1,labels:["1"]},{...B5e.right1,labels:["2"]}],size:{width:dO.width,height:dO.height},center:{x:dO.centerX,y:dO.centerY}}),L2t=Cl(j5e),O2t={paths:{path1:{type:"path",points:[{x:-.33997010000000016,y:.4545300000000001},{x:-.03997010000000012,y:.4545300000000001}],color:"primary",fill:!1},path2:{type:"path",points:[{x:-.02032289999999981,y:.25053000000000014},{x:-.020322900000000033,y:.65053}],color:"primary",fill:!1},path3:{type:"path",points:[{x:.050000000000000044,y:.3005300000000002},{x:.050000000000000044,y:.60053}],color:"primary",fill:!1},path4:{type:"path",points:[{x:.1499999999999997,y:.40053000000000005},{x:.1499999999999997,y:.5005300000000001}],color:"primary",fill:!1}},refblocks:{top1:{x:-.33997010000000016,y:.4545300000000001}},circles:{}},{paths:z2t,circles:U2t,refblocks:k2t}=O2t,I2t=Bm({primitives:[...Object.values(z2t),...Object.values(U2t),{type:"text",text:"{REF}",x:-.1,y:.8,anchor:"middle_bottom"},{type:"text",text:"{VAL}",x:-.1,y:.1,anchor:"middle_top"}],ports:[{...k2t.top1,labels:["1"]}],size:{width:1,height:1},center:{x:0,y:.4}}),H5e=I2t,F2t=l0(H5e).rotateRightFacingSymbol("down").build(),dX={paths:{path11:{type:"path",points:[{x:-.49895505000000084,y:.035186950000000605},{x:-.177441850000001,y:.035186950000000605}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.18704774999999918,y:.043056250000000684},{x:.5063384499999999,y:.043056250000000684}],color:"primary",fill:!1},"path11-0-9":{type:"path",points:[{x:-.3067105499999998,y:.19836805000000046},{x:-.3084575500000002,y:-.10569684999999973},{x:-.01040014999999972,y:.03790115000000038},{x:-.3034011499999991,y:.1991819500000005}],color:"primary",fill:!0},"path11-0-9-5":{type:"path",points:[{x:.3324594500000002,y:.19920585000000046},{x:.33420945000000013,y:-.10485904999999973},{x:.03615254999999973,y:.03873895000000038},{x:.32915344999999974,y:.2000197500000005}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:.042716749999999415,y:.3158462499999999},bottom1:{type:"text",text:"{VAL}",x:.035355149999999336,y:-.3158462499999999}},refblocks:{left1:{x:-.5177904499999998,y:.03433415000000006},right1:{x:.5177904499999997,y:.04319984999999993}},bounds:{minX:-.5459488909999998,maxX:.5459488909999997,minY:-.3158462499999999,maxY:.3158462499999999,width:1.0918977819999993,height:.6316924999999998,centerX:-5551115123125783e-32,centerY:0},circles:{}},{paths:X5n,texts:W5n,bounds:Z5n,refblocks:Q5n,circles:K5n}=dX,B2t=l0(dX).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),j2t=l0(dX).rotateRightFacingSymbol("down").changeTextAnchor("{VAL}","middle_right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").build(),H2t={paths:{path45:{type:"path",points:[{x:.13585750000000063,y:-.003696399999999045},{x:-.12872579999999934,y:-.13598810000000228}],color:"primary",fill:!1},"path1-8":{type:"path",points:[{x:.12763670000000094,y:-.003920199999999596},{x:.3,y:-.003920199999999596}],color:"primary",fill:!1},path46:{type:"path",points:[{x:-.12872579999999934,y:.12859530000000063},{x:.13585750000000063,y:-.003696399999999045}],color:"primary",fill:!1},path47:{type:"path",points:[{x:-.12872579999999934,y:-.13598810000000228},{x:-.12872579999999934,y:.12859530000000063}],color:"primary",fill:!1},path48:{type:"path",points:[{x:.13585750000000063,y:.12859530000000063},{x:.13585750000000063,y:-.13598810000000228}],color:"primary",fill:!1},path49:{type:"path",points:[{x:-.13076959999999938,y:-.003696399999999045},{x:-.3,y:-.003696399999999045}],color:"primary",fill:!1},path25:{type:"path",points:[{x:-.1557438999999996,y:.28545279999999806},{x:-.2530861999999994,y:.3023319999999998},{x:-.21878339999999952,y:.20956920000000068}],color:"primary",fill:!0},path78:{type:"path",points:[{x:-.08000449999999937,y:.16590799999999817},{x:-.09202799999999911,y:.1748410000000007},{x:-.2137844999999996,y:.26529680000000155},{x:-.2144144999999993,y:.2662468000000011}],color:"primary",fill:!1},"path25-0":{type:"path",points:[{x:.021722400000000697,y:.30658939999999646},{x:-.07561989999999952,y:.3234685999999982},{x:-.04131709999999922,y:.23070579999999907}],color:"primary",fill:!0},"path78-6":{type:"path",points:[{x:.09746180000000093,y:.18704459999999656},{x:.08543830000000074,y:.19597759999999909},{x:-.0363181999999993,y:.28643339999999995},{x:-.03694819999999943,y:.2873833999999995}],color:"primary",fill:!1},box:{type:"path",points:[{x:-.3,y:-.4},{x:.3,y:-.4},{x:.3,y:.4},{x:-.3,y:.4},{x:-.3,y:-.4},{x:-.3,y:.4}],color:"primary",fill:!1},"path48-1":{type:"path",points:[{x:-.3,y:.1333},{x:-.5362092999999997,y:.1333}],color:"primary",fill:!1},"path48-2":{type:"path",points:[{x:-.3,y:-.1333},{x:-.5362092999999997,y:-.1333}],color:"primary",fill:!1},"path48-3":{type:"path",points:[{x:.3,y:-.1333},{x:.5362093000000003,y:-.1333}],color:"primary",fill:!1},"path48-4":{type:"path",points:[{x:.3,y:.1333},{x:.5362093000000003,y:.1333}],color:"primary",fill:!1}},texts:{bottom1:{type:"text",text:"{VAL}",x:0,y:-.43222},right1:{type:"text",text:"{REF}",x:0,y:.43222}},refblocks:{left1:{x:-.5362092999999997,y:.1333},left2:{x:-.5362092999999997,y:-.1333},right1:{x:.5362093000000003,y:-.1333},right2:{x:.5362093000000003,y:.1333}},bounds:{minX:-.5643677409999996,maxX:.5643677410000003,minY:-.3234685999999982,maxY:.3234685999999982,width:1.128735482,height:.6469371999999964,centerX:33306690738754696e-32,centerY:0},circles:{}},pO=l0(H2t).labelPort("left1",["1","DIN"]).labelPort("left2",["2","POWER"]).labelPort("right1",["4","GND"]).labelPort("right2",["3","DOUT"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),V2t=Cl(pO,"down"),$2t=SY(pO),pX=Cl(pO,"up"),G2t={...pX,primitives:pX.primitives.map(n=>n.type==="path"&&(n.points.length===3||n.points.length===4)?{...n,points:n.points.map(e=>({x:e.x,y:-e.y+2*pX.center.y}))}:n)},q2t=G2t,Y2t={paths:{path11:{type:"path",points:[{x:-.3850944445000005,y:.0010025000000009054},{x:-.006525044499999799,y:-.0016204999999989145}],color:"primary",fill:!1},path40:{type:"path",points:[{x:.07415065550000066,y:.19027400000000116},{x:.07322065550000101,y:-.17787549999999852}],color:"primary",fill:!1},path42:{type:"path",points:[{x:.01002445549999953,y:-.12022799999999911},{x:.01002445549999953,y:.1443554000000009}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.28374995550000004,y:-.2462579999999992},{x:.2831499554999999,y:-.5425888999999995}],color:"primary",fill:!1},"path12-1":{type:"path",points:[{x:.28423665550000043,y:.5370061000000012},{x:.2836366555000003,y:.2678117000000011}],color:"primary",fill:!1},path15:{type:"path",points:[{x:.1731829554999995,y:-.2153930999999989},{x:.2780310554999992,y:-.23045039999999894},{x:.2324710554999987,y:-.14155709999999888}],color:"primary",fill:!0},path17:{type:"path",points:[{x:.07704605550000054,y:-.08544359999999895},{x:.2325688555000005,y:-.19774119999999895}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.07425025549999931,y:.11255990000000127},{x:.28369465549999884,y:.2606293000000013}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.006566644499999885,y:.35624680000000075},bottom1:{type:"text",text:"{VAL}",x:.020614555499999687,y:-.4202180999999998}},refblocks:{top1:{x:.2843894554999997,y:.5566011000000001},bottom1:{x:.2823318555000005,y:-.5566010999999997},left1:{x:-.3990097444999998,y:.00014970000000036343}},bounds:{minX:-.4271681854999998,maxX:.42716818549999985,minY:-.5847595409999997,maxY:.584759541,width:.8543363709999996,height:1.1695190819999999,centerX:27755575615628914e-33,centerY:16653345369377348e-32},circles:{path1:{type:"circle",x:.13862605549999985,y:.008130800000000438,radius:.28854213,color:"primary",fill:!1}}},V5e=l0(Y2t).changeTextAnchor("{VAL}","middle_right").labelPort("left1",["3"]).labelPort("top1",["2"]).labelPort("bottom1",["1"]).changeTextAnchor("{REF}","middle_right").build(),hX=Cl(V5e),mX=hX.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),$5e=hX.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");mX.anchor="middle_left",$5e.anchor="middle_right",mX.x=.45,mX.y+=.065,$5e.y+=.065;var X2t=hX,W2t={paths:{"path12-1-8-6-9":{type:"path",points:[{x:.023137150000000162,y:-.022408499999999165},{x:.023137150000000162,y:-.10240850000000101}],color:"primary",fill:!1},"path12-1-5-6":{type:"path",points:[{x:-.48740694999999956,y:-.18547949999999958},{x:-.1731006500000003,y:-.18547949999999958}],color:"primary",fill:!1},"path12-1-5-6-8":{type:"path",points:[{x:.023792949999999813,y:.17183650000000128},{x:.023792949999999813,y:.10518850000000057}],color:"primary",fill:!1},"path12-1-8-0":{type:"path",points:[{x:-.14922445000000018,y:-.032671500000001075},{x:.19549865000000022,y:-.18509050000000116}],color:"primary",fill:!1},"path12-1-0":{type:"path",points:[{x:.19549885000000078,y:-.18509050000000116},{x:.4881437499999999,y:-.18509050000000116}],color:"primary",fill:!1},"path12-1-8-6-9-4":{type:"path",points:[{x:.023137150000000162,y:.11939749999999982},{x:.023137150000000162,y:.017597499999999044}],color:"primary",fill:!1},"path12-1-8-6-9-4-3":{type:"path",points:[{x:.08312335000000015,y:.10724749999999972},{x:.08312335000000015,y:.050463500000001105}],color:"primary",fill:!1},"path12-1-8-6-9-4-3-1":{type:"path",points:[{x:-.03684904999999983,y:.10724749999999972},{x:-.03684904999999983,y:.050463500000001105}],color:"primary",fill:!1},"path12-1-8-6-9-4-4":{type:"path",points:[{x:.08312335000000015,y:.10724749999999972},{x:-.03684904999999983,y:.10724749999999972}],color:"primary",fill:!1},"path14-5":{type:"path",points:[{x:-.011640198644880861,y:.2824489119921765},{x:.01182744133211866,y:.25421423950368016},{x:.035295081309120846,y:.22597956701517674},{x:.05876272128612037,y:.19774489452667865}],color:"primary",fill:!0},"path14-5-3":{type:"path",points:[{x:-.011818241440559873,y:.19775449269853418},{x:.01171692178543804,y:.22592735480803405},{x:.03525208501144128,y:.25410021691753926},{x:.058787248237439194,y:.2822730790270338}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:.010987250000000337,y:.3808714999999978},bottom1:{type:"text",text:"{VAL}",x:.05578094999999994,y:-.3808714999999996}},refblocks:{left1:{x:-.4717985499999999,y:-.1854504999999982},right1:{x:.4717985499999999,y:-.18547650000000182}},bounds:{minX:-.4999569909999999,maxX:.4999569909999999,minY:-.3808714999999996,maxY:.3808714999999978,width:.9999139819999998,height:.7617429999999974,centerX:0,centerY:-8881784197001252e-31},circles:{path9:{type:"circle",x:.02379285000000042,y:.24000550000000054,radius:.059920847,color:"primary",fill:!1}}},G5e=l0(W2t).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),q5e=Cl(G5e),Y5e=q5e.primitives.filter(n=>n.type==="text"),vX=Y5e.find(n=>n.text==="{VAL}");vX.x=-.35,vX.y=0,vX.anchor="middle_right";var yX=Y5e.find(n=>n.text==="{REF}");yX.y=0,yX.x=.35,yX.anchor="middle_left";var Z2t=q5e,Q2t={paths:{path8698:{type:"path",points:[{x:-.20003504999999944,y:-.023826854587889912},{x:-.20252458999999945,y:-.018993393814014044},{x:-.20501412999999943,y:-.014174384106555204},{x:-.2075036699999995,y:-.009384187436300498},{x:-.20999320999999949,y:-.004636988132081332},{x:-.2124827499999995,y:5329457033053167e-20},{x:-.2149722899999995,y:.004673092344940186},{x:-.2174618299999995,y:.009209271428771242},{x:-.21995136999999956,y:.013649213595881985},{x:-.22244090999999955,y:.01798089395292432},{x:-.22493044999999956,y:.022192955076609913},{x:-.22741998999999957,y:.02627477703600152},{x:-.22990952999999958,y:.030216542867918667},{x:-.2323990699999996,y:.03400929910178016},{x:-.2348886099999996,y:.03764501096072756},{x:-.23737814999999962,y:.04111661189869628},{x:-.23986768999999963,y:.04441804716802203},{x:-.24235722999999965,y:.04754431114897349},{x:-.24484676999999966,y:.05049147821106258},{x:-.24733630999999967,y:.053256726915861724},{x:-.24982584999999968,y:.05583835741211009},{x:-.2523153899999997,y:.05823580191586174},{x:-.2548049299999997,y:.060449628211062575},{x:-.2572944699999997,y:.0624815361489735},{x:-.25978400999999973,y:.06433434716802203},{x:-.26227354999999974,y:.06601198689869628},{x:-.26476308999999976,y:.06751946096072757},{x:-.26725262999999977,y:.06886282410178016},{x:-.2697421699999998,y:.07004914286791866},{x:-.2722317099999998,y:.0710864520360015},{x:-.2747212499999998,y:.07198370507660991},{x:-.2772107899999998,y:.07275071895292433},{x:-.27970032999999983,y:.07339811359588198},{x:-.28218986999999984,y:.07393724642877124},{x:-.28467940999999986,y:.07438014234494018},{x:-.28716894999999987,y:.07473941957033053},{x:-.2896584899999999,y:.07502821186791866},{x:-.2921480299999999,y:.07526008756369952},{x:-.2946375699999999,y:.07544896589344477},{x:-.2971271099999999,y:.07560903118598594},{x:-.29961664999999993,y:.07575464541211008},{x:-.3021061874999999,y:.07560903118598594},{x:-.30459572499999993,y:.07544896589344477},{x:-.3070852624999999,y:.07526008756369951},{x:-.30957479999999993,y:.07502821186791866},{x:-.31206433749999984,y:.07473941957033052},{x:-.3145538749999998,y:.07438014234494018},{x:-.31704341249999984,y:.07393724642877124},{x:-.31953294999999987,y:.07339811359588198},{x:-.32202248749999984,y:.07275071895292431},{x:-.3245120249999998,y:.07198370507660991},{x:-.3270015624999998,y:.0710864520360015},{x:-.32949109999999976,y:.07004914286791866},{x:-.33198063749999984,y:.06886282410178016},{x:-.33447017499999976,y:.06751946096072757},{x:-.3369597124999998,y:.06601198689869628},{x:-.33944924999999976,y:.06433434716802203},{x:-.34193878749999973,y:.06248153614897349},{x:-.34442832499999976,y:.06044962821106258},{x:-.3469178624999997,y:.05823580191586174},{x:-.3494073999999997,y:.05583835741211009},{x:-.35189693749999973,y:.053256726915861724},{x:-.35438647499999965,y:.050491478211062576},{x:-.3568760124999997,y:.0475443111489735},{x:-.35936554999999964,y:.04441804716802203},{x:-.3618550874999996,y:.04111661189869628},{x:-.36434462499999964,y:.03764501096072756},{x:-.36683416249999967,y:.03400929910178016},{x:-.3693236999999996,y:.030216542867918673},{x:-.3718132374999996,y:.02627477703600152},{x:-.3743027749999996,y:.022192955076609917},{x:-.37679231249999956,y:.017980893952924324},{x:-.3792818499999996,y:.013649213595881985},{x:-.3817713874999995,y:.00920927142877125},{x:-.38426092499999953,y:.004673092344940191},{x:-.38675046249999956,y:5329457033053514e-20},{x:-.38923999999999953,y:-.004636988132081328},{x:-.39172953749999956,y:-.009384187436300498},{x:-.3942190749999995,y:-.014174384106555197},{x:-.3967086124999995,y:-.01899339381401404},{x:-.3991981499999995,y:-.023826854587889912}],color:"primary",fill:!1},path8700:{type:"path",points:[{x:-.000872049999999458,y:-.02382615458789039},{x:-.0033615874999994412,y:-.01899269131401453},{x:-.0058511249999994245,y:-.014173679106555696},{x:-.008340662499999407,y:-.009383479936300985},{x:-.010830199999999391,y:-.004636278132081827},{x:-.013319737499999373,y:5400707033003174e-20},{x:-.015809274999999356,y:.004673807344939683},{x:-.018298812499999338,y:.009209988928770731},{x:-.020788349999999324,y:.013649933595881476},{x:-.023277887499999306,y:.017981616452923805},{x:-.02576742499999929,y:.022193680076609393},{x:-.02825696249999927,y:.026275504536001},{x:-.030746499999999254,y:.030217272867918137},{x:-.03323603749999924,y:.034010031601779636},{x:-.03572557499999922,y:.03764574596072702},{x:-.038215112499999204,y:.04111734939869574},{x:-.04070464999999919,y:.04441878716802149},{x:-.04319418749999917,y:.04754505364897295},{x:-.045683724999999155,y:.05049222321106203},{x:-.048173262499999134,y:.05325747441586117},{x:-.05066279999999912,y:.055839107412109526},{x:-.053152337499999106,y:.05823655441586117},{x:-.055641874999999084,y:.06045038321106201},{x:-.05813141249999907,y:.06248229364897292},{x:-.06062094999999905,y:.06433510716802145},{x:-.06311048749999904,y:.0660127493986957},{x:-.06560002499999902,y:.06752022596072697},{x:-.068089562499999,y:.06886359160177957},{x:-.07057909999999898,y:.07004991286791806},{x:-.07306863749999896,y:.07108722453600091},{x:-.07555817499999895,y:.0719844800766093},{x:-.07804771249999894,y:.07275149645292371},{x:-.08053724999999892,y:.07339889359588138},{x:-.0830267874999989,y:.07393802892877062},{x:-.08551632499999888,y:.07438092734493956},{x:-.08800586249999887,y:.07474020707032991},{x:-.09049539999999885,y:.07502900186791804},{x:-.09298493749999884,y:.07526088006369888},{x:-.09547447499999881,y:.07544976089344414},{x:-.0979640124999988,y:.0756098286859853},{x:-.10045354999999878,y:.07575544541210943},{x:-.1029430899999988,y:.0756098286859853},{x:-.1054326299999988,y:.07544976089344414},{x:-.10792216999999882,y:.07526088006369887},{x:-.11041170999999883,y:.07502900186791804},{x:-.11290124999999884,y:.0747402070703299},{x:-.11539078999999886,y:.07438092734493956},{x:-.11788032999999885,y:.07393802892877062},{x:-.1203698699999989,y:.07339889359588138},{x:-.12285940999999889,y:.07275149645292371},{x:-.1253489499999989,y:.0719844800766093},{x:-.12783848999999892,y:.07108722453600091},{x:-.13032802999999893,y:.07004991286791806},{x:-.13281756999999894,y:.06886359160177957},{x:-.13530710999999895,y:.06752022596072697},{x:-.13779664999999897,y:.0660127493986957},{x:-.14028618999999898,y:.06433510716802145},{x:-.142775729999999,y:.06248229364897291},{x:-.145265269999999,y:.06045038321106202},{x:-.14775480999999901,y:.05823655441586117},{x:-.15024434999999903,y:.055839107412109526},{x:-.15273388999999904,y:.05325747441586117},{x:-.15522342999999905,y:.05049222321106202},{x:-.15771296999999906,y:.047545053648972956},{x:-.16020250999999908,y:.04441878716802149},{x:-.1626920499999991,y:.04111734939869574},{x:-.1651815899999991,y:.03764574596072702},{x:-.16767112999999914,y:.034010031601779636},{x:-.1701606699999991,y:.03021727286791814},{x:-.17265020999999914,y:.026275504536001},{x:-.17513974999999915,y:.022193680076609396},{x:-.17762928999999916,y:.017981616452923805},{x:-.1801188299999992,y:.013649933595881474},{x:-.18260836999999916,y:.00920998892877074},{x:-.1850979099999992,y:.0046738073449396865},{x:-.1875874499999992,y:5400707033003521e-20},{x:-.19007698999999922,y:-.004636278132081827},{x:-.19256652999999926,y:-.009383479936300985},{x:-.19505606999999922,y:-.01417367910655569},{x:-.19754560999999926,y:-.018992691314014522},{x:-.20003514999999927,y:-.02382615458789039}],color:"primary",fill:!1},path8702:{type:"path",points:[{x:.19829105000000036,y:-.02382615458789039},{x:.19580151000000035,y:-.01899269131401453},{x:.1933119700000003,y:-.014173679106555696},{x:.19082243000000035,y:-.009383479936300985},{x:.1883328900000003,y:-.004636278132081827},{x:.1858433500000003,y:5400707033003174e-20},{x:.18335381000000028,y:.004673807344939683},{x:.18086427000000024,y:.009209988928770731},{x:.1783747300000003,y:.013649933595881476},{x:.17588519000000025,y:.017981616452923805},{x:.17339565000000023,y:.022193680076609393},{x:.17090611000000022,y:.026275504536001},{x:.16841657000000018,y:.030217272867918137},{x:.16592703000000023,y:.034010031601779636},{x:.16343749000000019,y:.03764574596072702},{x:.16094795000000017,y:.04111734939869574},{x:.15845841000000016,y:.04441878716802149},{x:.15596887000000015,y:.04754505364897295},{x:.15347933000000014,y:.05049222321106203},{x:.15098979000000012,y:.05325747441586117},{x:.1485002500000001,y:.055839107412109526},{x:.1460107100000001,y:.05823655441586117},{x:.1435211700000001,y:.06045038321106201},{x:.14103163000000007,y:.06248229364897292},{x:.13854209000000006,y:.06433510716802145},{x:.13605255000000005,y:.0660127493986957},{x:.13356301000000004,y:.06752022596072697},{x:.13107347000000003,y:.06886359160177957},{x:.12858393,y:.07004991286791806},{x:.12609439,y:.07108722453600091},{x:.12360484999999999,y:.0719844800766093},{x:.12111530999999998,y:.07275149645292371},{x:.11862576999999996,y:.07339889359588138},{x:.11613622999999995,y:.07393802892877062},{x:.11364668999999994,y:.07438092734493956},{x:.11115714999999993,y:.07474020707032991},{x:.10866760999999991,y:.07502900186791804},{x:.1061780699999999,y:.07526088006369888},{x:.10368852999999989,y:.07544976089344414},{x:.10119898999999988,y:.0756098286859853},{x:.09870944999999987,y:.07575544541210943},{x:.09621991249999988,y:.0756098286859853},{x:.0937303749999999,y:.07544976089344414},{x:.09124083749999992,y:.07526088006369887},{x:.08875129999999994,y:.07502900186791804},{x:.08626176249999995,y:.0747402070703299},{x:.08377222499999996,y:.07438092734493956},{x:.08128268749999998,y:.07393802892877062},{x:.07879315,y:.07339889359588138},{x:.07630361250000002,y:.07275149645292371},{x:.07381407500000003,y:.0719844800766093},{x:.07132453750000005,y:.07108722453600091},{x:.06883500000000006,y:.07004991286791806},{x:.06634546250000009,y:.06886359160177957},{x:.0638559250000001,y:.06752022596072697},{x:.06136638750000012,y:.0660127493986957},{x:.05887685000000013,y:.06433510716802145},{x:.05638731250000015,y:.06248229364897291},{x:.053897775000000175,y:.06045038321106202},{x:.05140823750000019,y:.05823655441586117},{x:.048918700000000204,y:.055839107412109526},{x:.04642916250000022,y:.05325747441586117},{x:.04393962500000023,y:.05049222321106202},{x:.04145008750000026,y:.047545053648972956},{x:.038960550000000274,y:.04441878716802149},{x:.03647101250000029,y:.04111734939869574},{x:.0339814750000003,y:.03764574596072702},{x:.03149193750000032,y:.034010031601779636},{x:.02900240000000034,y:.03021727286791814},{x:.02651286250000036,y:.026275504536001},{x:.024023325000000373,y:.022193680076609396},{x:.021533787500000387,y:.017981616452923805},{x:.019044250000000405,y:.013649933595881474},{x:.016554712500000426,y:.00920998892877074},{x:.014065175000000442,y:.0046738073449396865},{x:.011575637500000457,y:5400707033003521e-20},{x:.009086100000000473,y:-.004636278132081827},{x:.006596562500000487,y:-.009383479936300985},{x:.004107025000000513,y:-.01417367910655569},{x:.0016174875000005274,y:-.018992691314014522},{x:-.000872049999999458,y:-.02382615458789039}],color:"primary",fill:!1},path8704:{type:"path",points:[{x:.39745405000000034,y:-.02382615458789039},{x:.3949645125000003,y:-.01899269131401453},{x:.39247497500000034,y:-.014173679106555696},{x:.3899854375000004,y:-.009383479936300985},{x:.38749590000000045,y:-.004636278132081827},{x:.3850063625000004,y:5400707033003174e-20},{x:.3825168250000004,y:.004673807344939683},{x:.3800272875000004,y:.009209988928770731},{x:.3775377500000005,y:.013649933595881476},{x:.37504821250000053,y:.017981616452923805},{x:.3725586750000005,y:.022193680076609393},{x:.3700691375000005,y:.026275504536001},{x:.3675796000000005,y:.030217272867918137},{x:.3650900625000006,y:.034010031601779636},{x:.3626005250000006,y:.03764574596072702},{x:.3601109875000006,y:.04111734939869574},{x:.35762145000000056,y:.04441878716802149},{x:.3551319125000006,y:.04754505364897295},{x:.3526423750000007,y:.05049222321106203},{x:.3501528375000007,y:.05325747441586117},{x:.3476633000000007,y:.055839107412109526},{x:.34517376250000065,y:.05823655441586117},{x:.34268422500000073,y:.06045038321106201},{x:.3401946875000007,y:.06248229364897292},{x:.3377051500000008,y:.06433510716802145},{x:.33521561250000076,y:.0660127493986957},{x:.33272607500000073,y:.06752022596072697},{x:.3302365375000008,y:.06886359160177957},{x:.3277470000000008,y:.07004991286791806},{x:.3252574625000008,y:.07108722453600091},{x:.32276792500000084,y:.0719844800766093},{x:.32027838750000087,y:.07275149645292371},{x:.3177888500000009,y:.07339889359588138},{x:.3152993125000009,y:.07393802892877062},{x:.3128097750000009,y:.07438092734493956},{x:.31032023750000093,y:.07474020707032991},{x:.30783070000000096,y:.07502900186791804},{x:.305341162500001,y:.07526088006369888},{x:.30285162500000096,y:.07544976089344414},{x:.300362087500001,y:.0756098286859853},{x:.297872550000001,y:.07575544541210943},{x:.29538301000000095,y:.0756098286859853},{x:.292893470000001,y:.07544976089344414},{x:.290403930000001,y:.07526088006369887},{x:.287914390000001,y:.07502900186791804},{x:.28542485000000095,y:.0747402070703299},{x:.2829353100000009,y:.07438092734493956},{x:.2804457700000009,y:.07393802892877062},{x:.2779562300000009,y:.07339889359588138},{x:.2754666900000009,y:.07275149645292371},{x:.2729771500000009,y:.0719844800766093},{x:.2704876100000009,y:.07108722453600091},{x:.26799807000000087,y:.07004991286791806},{x:.26550853000000085,y:.06886359160177957},{x:.26301899000000084,y:.06752022596072697},{x:.26052945000000083,y:.0660127493986957},{x:.2580399100000008,y:.06433510716802145},{x:.2555503700000008,y:.06248229364897291},{x:.2530608300000008,y:.06045038321106202},{x:.2505712900000008,y:.05823655441586117},{x:.24808175000000077,y:.055839107412109526},{x:.24559221000000075,y:.05325747441586117},{x:.24310267000000074,y:.05049222321106202},{x:.24061313000000073,y:.047545053648972956},{x:.23812359000000072,y:.04441878716802149},{x:.2356340500000007,y:.04111734939869574},{x:.2331445100000007,y:.03764574596072702},{x:.23065497000000068,y:.034010031601779636},{x:.22816543000000067,y:.03021727286791814},{x:.22567589000000066,y:.026275504536001},{x:.22318635000000064,y:.022193680076609396},{x:.22069681000000063,y:.017981616452923805},{x:.21820727000000062,y:.013649933595881474},{x:.2157177300000006,y:.00920998892877074},{x:.2132281900000006,y:.0046738073449396865},{x:.21073865000000058,y:5400707033003521e-20},{x:.20824911000000057,y:-.004636278132081827},{x:.20575957000000056,y:-.009383479936300985},{x:.20327003000000055,y:-.01417367910655569},{x:.20078049000000053,y:-.018992691314014522},{x:.19829095000000052,y:-.02382615458789039}],color:"primary",fill:!1},path8706:{type:"path",points:[{x:-.4023286499999996,y:-.022544054587890106},{x:-.5293590499999994,y:-.022544054587890106}],color:"primary",fill:!1},"path8706-5":{type:"path",points:[{x:.5261604500000003,y:-.027111054587890093},{x:.39913004999999946,y:-.027111054587890093}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.0040821499999992295,y:.22997364541210996},bottom1:{type:"text",text:"{VAL}",x:-.004252755294839927,y:-.22997364541210996}},refblocks:{left1:{x:-.5504428500000003,y:-.021272154587890446},right1:{x:.5504428500000005,y:-.026521254587889898}},bounds:{width:1.1572025820000007,height:.4599472908242199,centerX:11102230246251565e-32,centerY:0},circles:{}},{paths:K2t,texts:X5e,bounds:hO,refblocks:W5e,circles:J2t}=Q2t,gX=Bm({primitives:[...Object.values(K2t),...Object.values(J2t),{...X5e.top1,anchor:"middle_bottom"},{...X5e.bottom1,anchor:"middle_top"}],ports:[{...W5e.left1,labels:["1"]},{...W5e.right1,labels:["2"]}],size:{width:hO.width,height:hO.height},center:{x:hO.centerX,y:hO.centerY}}),Z5e=Cl(gX,"up"),e5t=F_t(Z5e),t5t=SY(gX),Q5e={paths:{path11:{type:"path",points:[{x:-.5274831500000006,y:-.05991764999999982},{x:-.14891374999999996,y:-.06254064999999964}],color:"primary",fill:!1},path40:{type:"path",points:[{x:.13221874999999983,y:-.048856449999999496},{x:-.13236425000000063,y:-.18114814999999918}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.13236425000000063,y:.08343525000000018},{x:.13221874999999983,y:-.048856449999999496}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.13236425000000063,y:-.18114814999999984},{x:-.13236425000000063,y:.08343525000000018}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.13221874999999983,y:.08343525000000018},{x:.13221874999999983,y:-.18114814999999984}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.13582535000000018,y:-.04942524999999942},{x:.533952450000001,y:-.059917649999999156}],color:"primary",fill:!1},"path25-0-9-8":{type:"path",points:[{x:-.02944535000000048,y:.39378525000000053},{x:-.05325954999999993,y:.4660362500000006},{x:-.07725114999999949,y:.39386225000000086}],color:"primary",fill:!0},"path78-6-5-5":{type:"path",points:[{x:-.05361965000000035,y:.27387525000000035},{x:-.053592050000000446,y:.2865022500000003},{x:-.05330205000000077,y:.41436425000000066},{x:-.05311205000000019,y:.4152642500000008}],color:"primary",fill:!1},"path25-0-9-8-2":{type:"path",points:[{x:.06865195000000024,y:.39378525000000053},{x:.044837750000000565,y:.4660362500000006},{x:.02084615000000123,y:.39386225000000086}],color:"primary",fill:!0},"path78-6-5-5-7":{type:"path",points:[{x:.044477650000000146,y:.27387525000000035},{x:.044505250000000274,y:.2865022500000003},{x:.04479524999999995,y:.41436425000000066},{x:.04498525000000053,y:.4152642500000008}],color:"primary",fill:!1},"path43-1":{type:"path",points:[{x:.03124844999999965,y:.05895145000000013},{x:.03124844999999965,y:-.16452955000000036}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:.25206924999999947,y:.3769550499999994},bottom1:{type:"text",text:"{VAL}",x:-.006614550000000552,y:-.4660362500000004}},refblocks:{left1:{x:-.54139845,y:-.060770450000000364},right1:{x:.5413984499999995,y:-.0597740500000008}},bounds:{minX:-.569556891,maxX:.5695568909999995,minY:-.4660362500000004,maxY:.4660362500000006,width:1.1391137819999995,height:.932072500000001,centerX:-2220446049250313e-31,centerY:11102230246251565e-32},circles:{path1:{type:"circle",x:-.0037626500000003116,y:-.05278935000000051,radius:.28854213,color:"primary",fill:!1}}};Q5e.bounds.width+=.2;var K5e=l0(Q5e).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),J5e=Cl(K5e),n5t=J5e.primitives.filter(n=>n.type==="text"),ebe=n5t.find(n=>n.text==="{VAL}");ebe.x=-.52,ebe.anchor="middle_right";var r5t=J5e,i5t={paths:{path45:{type:"path",points:[{x:.13585750000000063,y:-.003696399999999045},{x:-.12872579999999934,y:-.13598810000000228}],color:"primary",fill:!1},"path1-8":{type:"path",points:[{x:.12763670000000094,y:-.003920199999999596},{x:.5265564000000009,y:-.003920199999999596}],color:"primary",fill:!1},path46:{type:"path",points:[{x:-.12872579999999934,y:.12859530000000063},{x:.13585750000000063,y:-.003696399999999045}],color:"primary",fill:!1},path47:{type:"path",points:[{x:-.12872579999999934,y:-.13598810000000228},{x:-.12872579999999934,y:.12859530000000063}],color:"primary",fill:!1},path48:{type:"path",points:[{x:.13585750000000063,y:.12859530000000063},{x:.13585750000000063,y:-.13598810000000228}],color:"primary",fill:!1},path49:{type:"path",points:[{x:-.13076959999999938,y:-.003696399999999045},{x:-.5256007999999994,y:-.003696399999999045}],color:"primary",fill:!1},path25:{type:"path",points:[{x:-.1557438999999996,y:.28545279999999806},{x:-.2530861999999994,y:.3023319999999998},{x:-.21878339999999952,y:.20956920000000068}],color:"primary",fill:!0},path78:{type:"path",points:[{x:-.08000449999999937,y:.16590799999999817},{x:-.09202799999999911,y:.1748410000000007},{x:-.2137844999999996,y:.26529680000000155},{x:-.2144144999999993,y:.2662468000000011}],color:"primary",fill:!1},"path25-0":{type:"path",points:[{x:.021722400000000697,y:.30658939999999646},{x:-.07561989999999952,y:.3234685999999982},{x:-.04131709999999922,y:.23070579999999907}],color:"primary",fill:!0},"path78-6":{type:"path",points:[{x:.09746180000000093,y:.18704459999999656},{x:.08543830000000074,y:.19597759999999909},{x:-.0363181999999993,y:.28643339999999995},{x:-.03694819999999943,y:.2873833999999995}],color:"primary",fill:!1}},texts:{bottom1:{type:"text",text:"{VAL}",x:-.009561699999999451,y:-.3234685999999982},right1:{type:"text",text:"{REF}",x:.31464070000000044,y:.22386570000000106}},refblocks:{left1:{x:-.5362092999999997,y:-.004432900000001183},right1:{x:.5362093000000003,y:-.004886400000003732}},bounds:{width:1.128735482,height:.6469371999999964,centerX:33306690738754696e-32,centerY:0},circles:{}},{paths:a5t,texts:tbe,bounds:mO,refblocks:nbe,circles:o5t}=i5t,vO=Bm({primitives:[...Object.values(a5t),...Object.values(o5t),{...tbe.bottom1,anchor:"middle_top"},{...tbe.right1,anchor:"middle_bottom"}],ports:[{...nbe.left1,labels:["1"]},{...nbe.right1,labels:["2"]}],size:{width:mO.width,height:mO.height},center:{x:mO.centerX,y:mO.centerY}}),s5t=Cl(vO,"down"),l5t=SY(vO),_X=Cl(vO,"up"),c5t={..._X,primitives:_X.primitives.map(n=>n.type==="path"&&(n.points.length===3||n.points.length===4)?{...n,points:n.points.map(e=>({x:e.x,y:-e.y+2*_X.center.y}))}:n)},u5t=c5t,f5t={paths:{path11:{type:"path",points:[{x:-.5053201665812097,y:-.010839730805804138},{x:-.1829962316128657,y:-.010839730805804138}],color:"primary",fill:!1},"path11-2":{type:"path",points:[{x:-.1674747072814866,y:-.11471502212593476},{x:-.1674747072814866,y:.07736981415388478}],color:"primary",fill:!1},"path11-5":{type:"path",points:[{x:-.1674747072814866,y:-.11632056223474518},{x:.16018133830019532,y:-.11632056223474518}],color:"primary",fill:!1},"path11-5-5":{type:"path",points:[{x:-.1674747072814866,y:.07736981415388478},{x:.16018133830019532,y:.07736981415388478}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.17205869804197382,y:-.010839950577224311},{x:.5116721586832798,y:-.010839950577224311}],color:"primary",fill:!1},"path11-2-1":{type:"path",points:[{x:.16064490317338742,y:-.11622177498145403},{x:.16064490317338742,y:.07727135655772521}],color:"primary",fill:!1},"path25-0-9":{type:"path",points:[{x:-.40391896081308554,y:-.2111951150487743},{x:-.32538818309991635,y:-.1776462385858042},{x:-.33843942905204627,y:-.26928059146906413}],color:"primary",fill:!0},"path78-6-5":{type:"path",points:[{x:-.4470989190253618,y:-.3351265263866847},{x:-.4385525777085817,y:-.32468848279378437},{x:-.3520048317368336,y:-.21897414423109507},{x:-.3516268465799328,y:-.21798517284109487}],color:"primary",fill:!1},"path25-0-9-0":{type:"path",points:[{x:-.30220674110432255,y:-.3403193953841548},{x:-.22367596339115314,y:-.30677051892118534},{x:-.23672720934328306,y:-.3984048718044453}],color:"primary",fill:!0},"path78-6-5-9":{type:"path",points:[{x:-.3453866993165988,y:-.464250806722065},{x:-.3368403579998187,y:-.45381276312916397},{x:-.2502926120280704,y:-.34809842456647466},{x:-.24991462687116983,y:-.34710945317647446}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.1679477702432366,y:-.40859918889256375},bottom1:{type:"text",text:"{VAL}",x:-.006410773639930811,y:.464250806722065}},refblocks:{left1:{x:-.5247194309452994,y:-.009902515585214156},right1:{x:.5247194309452992,y:-.010997416799653603}},bounds:{width:1.1040207733749288,height:.6228499956146287,centerX:-11102230246251565e-32,centerY:-.022174191085249373},circles:{path1:{type:"circle",x:-.003646732950281173,y:-.018672603986024328,radius:.2796529289238723,color:"primary",fill:!1}}},{paths:d5t,texts:rbe,bounds:yO,refblocks:ibe,circles:p5t}=f5t,abe=Bm({primitives:[...Object.values(d5t),...Object.values(p5t),{...rbe.top1,anchor:"middle_left",x:0},{...rbe.bottom1,anchor:"middle_left",x:0}],ports:[{...ibe.left1,labels:["1"]},{...ibe.right1,labels:["2"]}],size:{width:yO.width,height:yO.height},center:{x:yO.centerX,y:yO.centerY}}),obe=Cl(abe),sbe=obe.primitives.filter(n=>n.type==="text"),xX=sbe.find(n=>n.text==="{VAL}");xX.x=-.35,xX.y=0,xX.anchor="middle_right";var bX=sbe.find(n=>n.text==="{REF}");bX.y=0,bX.x=.35,bX.anchor="middle_left";var h5t=obe,m5t={paths:{path208:{type:"path",points:[{x:.3843021704999998,y:.13154093999999894},{x:.5165938705000004,y:-.13304206000000107}],color:"primary",fill:!1},path209:{type:"path",points:[{x:.25201047050000014,y:-.13304206000000107},{x:.3843021704999998,y:.13154093999999894}],color:"primary",fill:!1},path210:{type:"path",points:[{x:.5165938705000004,y:-.13304206000000107},{x:.25201047050000014,y:-.13304206000000107}],color:"primary",fill:!1},path211:{type:"path",points:[{x:.25201047050000014,y:.13154093999999894},{x:.5165938705000004,y:.13154093999999894}],color:"primary",fill:!1},path212:{type:"path",points:[{x:.11971887050000074,y:-.39762406000000006},{x:.3843021704999998,y:-.39762406000000006}],color:"primary",fill:!1},path213:{type:"path",points:[{x:.3843021704999998,y:.39612494},{x:.11971887050000074,y:.39612494}],color:"primary",fill:!1},path214:{type:"path",points:[{x:.11971887050000074,y:.5284169399999996},{x:.11971887050000074,y:.18445994}],color:"primary",fill:!1},path215:{type:"path",points:[{x:.11971887050000074,y:-.5299150600000004},{x:.11971887050000074,y:-.0007480600000011606}],color:"primary",fill:!1},path216:{type:"path",points:[{x:.3843021704999998,y:-.39762469000000067},{x:.3843021704999998,y:.3961256399999993}],color:"primary",fill:!1},path217:{type:"path",points:[{x:-.1448644295000001,y:.2638359399999999},{x:-.1448644295000001,y:-.26533006000000015}],color:"primary",fill:!1},path218:{type:"path",points:[{x:-.22423942949999898,y:-.2653310599999994},{x:-.22423942949999898,y:.26383493999999885}],color:"primary",fill:!1},path219:{type:"path",points:[{x:-.5417394294999998,y:-.26533006000000015},{x:-.22423942949999898,y:-.2653320600000004}],color:"primary",fill:!1},path220:{type:"path",points:[{x:-.1448644295000001,y:-.18595506000000128},{x:.11971897050000013,y:-.18595506000000128}],color:"primary",fill:!1},path221:{type:"path",points:[{x:-.1448644295000001,y:.18446093999999924},{x:.11971897050000013,y:.18446093999999924}],color:"primary",fill:!1},path222:{type:"path",points:[{x:-.06548942950000036,y:-.0007480600000011606},{x:.11971887050000074,y:-.0007480600000011606}],color:"primary",fill:!1}},texts:{right1:{type:"text",text:"{VAL}",x:.5715500704999998,y:.02044358999999929},right2:{type:"text",text:"{REF}",x:.5701646705000005,y:.2085436499999993}},refblocks:{top1:{x:.12018067049999992,y:.5432738300000004},bottom1:{x:.11982247050000083,y:-.5432738300000004},left1:{x:-.5433916295000003,y:-.2663988600000007}},bounds:{width:1.1431001410000001,height:1.1428645420000008,centerX:-2220446049250313e-31,centerY:0}},{paths:v5t,texts:lbe,bounds:gO,refblocks:SX}=m5t,cbe=Bm({primitives:[...Object.values(v5t),{...lbe.right1,anchor:"middle_left"},{...lbe.right2,anchor:"middle_left"}],ports:[{...SX.top1,labels:["1"]},{...SX.bottom1,labels:["2"]},{...SX.left1,labels:["3"]}],size:{width:gO.width+.4,height:gO.height},center:{x:gO.centerX+.2,y:gO.centerY}}),wX=Cl(cbe),ube=wX.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),EX=wX.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");ube.anchor="middle_top",EX.anchor="middle_top",ube.x=EX.x,EX.y+=.15;var y5t=wX,g5t={paths:{"path12-1-8-6-9":{type:"path",points:[{x:.005962250000000502,y:.06921149999999976},{x:.005962250000000502,y:-.005086499999999106}],color:"primary",fill:!1},"path12-1-5-6":{type:"path",points:[{x:-.48740705000000073,y:-.09299450000000142},{x:-.17310075000000058,y:-.09299450000000142}],color:"primary",fill:!1},"path12-1-8-0":{type:"path",points:[{x:-.16008695000000017,y:-.010660500000000184},{x:.1719709499999995,y:-.010660500000000184}],color:"primary",fill:!1},"path12-1-0":{type:"path",points:[{x:.1954987499999996,y:-.09260549999999945},{x:.4881436499999996,y:-.09260549999999945}],color:"primary",fill:!1},path2:{type:"path",points:[{x:-.09950044999999985,y:.05839450000000035},{x:-.09950104999999976,y:.06197449999999982},{x:-.09932044999999956,y:.06550449999999941},{x:-.09896044999999987,y:.0690104999999992},{x:-.09860045000000017,y:.07250049999999852},{x:-.09806045000000019,y:.07593049999999835},{x:-.09735344999999995,y:.07929949999999941},{x:-.09663345000000056,y:.08265950000000011},{x:-.09578045000000035,y:.08599949999999978},{x:-.09475245000000054,y:.08924949999999932},{x:-.09379245000000047,y:.09255949999999835},{x:-.09254545000000025,y:.09567949999999925},{x:-.09120844999999989,y:.09877950000000091},{x:-.08986644999999971,y:.10186950000000117},{x:-.08839545000000015,y:.10492949999999901},{x:-.08675845000000049,y:.10783949999999898},{x:-.08506245000000057,y:.11069950000000084},{x:-.08334244999999996,y:.11360950000000081},{x:-.08146945000000017,y:.11638949999999859},{x:-.0795824500000002,y:.11916949999999993},{x:-.07752845000000086,y:.12180949999999946},{x:-.07546944999999994,y:.12442949999999975},{x:-.07325945000000011,y:.12693950000000065},{x:-.07104145000000006,y:.129449499999998},{x:-.06867544999999975,y:.13182950000000027},{x:-.06628845000000005,y:.1341695000000005},{x:-.06379544999999975,y:.1364194999999988},{x:-.06114145000000004,y:.13848950000000038},{x:-.05848745000000033,y:.1405694999999998},{x:-.05584345000000024,y:.14261950000000034},{x:-.05306845000000049,y:.14449950000000022},{x:-.05029345000000074,y:.14639950000000113},{x:-.04738844999999969,y:.14811950000000174},{x:-.04437445000000029,y:.14969949999999876},{x:-.04134744999999995,y:.1513194999999996},{x:-.038316449999999946,y:.15275949999999838},{x:-.03515645000000056,y:.15407949999999992},{x:-.03204444999999989,y:.15536950000000083},{x:-.028770450000000558,y:.15655950000000018},{x:-.025468450000000864,y:.15757949999999887},{x:-.02213745000000067,y:.15863950000000138},{x:-.018790450000000014,y:.15942949999999811},{x:-.01536325000000005,y:.16012949999999826},{x:-.011980249999999693,y:.16082950000000018},{x:-.008442250000000762,y:.16141949999999916},{x:-.004890650000000107,y:.1617494999999991},{x:-.0013406500000003874,y:.16204949999999663},{x:.002252350000000014,y:.16214949999999817},{x:.005893849999999645,y:.16214949999999817},{x:.009534849999998762,y:.16214949999999817},{x:.013136849999999534,y:.16204949999999663},{x:.016683149999999536,y:.1617494999999991},{x:.020231149999998976,y:.1614494999999998},{x:.023727149999999142,y:.16104949999999896},{x:.02715474999999934,y:.16012949999999826},{x:.03057874999999921,y:.15952949999999966},{x:.03395574999999962,y:.15867949999999986},{x:.03725995000000015,y:.15758950000000027},{x:.0405679499999998,y:.15652949999999954},{x:.04379994999999948,y:.15541949999999893},{x:.04695294999999966,y:.15409950000000094},{x:.050101949999999285,y:.15280950000000004},{x:.053191949999999544,y:.1513194999999996},{x:.05617794999999948,y:.1497395000000008},{x:.05916694999999983,y:.14811950000000174},{x:.06206694999999929,y:.14639950000000113},{x:.06487294999999982,y:.1445595000000015},{x:.06767095000000012,y:.14269950000000264},{x:.07038294999999994,y:.14069950000000198},{x:.07299194999999958,y:.1385795000000023},{x:.07560095000000011,y:.13645950000000262},{x:.07809294999999938,y:.13420950000000254},{x:.08047994999999997,y:.13187950000000193},{x:.08287894999999956,y:.1295395000000017},{x:.08515495000000062,y:.12706950000000106},{x:.08729294999999926,y:.12451950000000167},{x:.08944594999999911,y:.12192950000000202},{x:.0914679499999993,y:.11930950000000173},{x:.09337295000000001,y:.1165295000000004},{x:.0971669499999992,y:.11101949999999938},{x:.10043494999999947,y:.10512450000000229},{x:.10311494999999926,y:.09890950000000132},{x:.10444094999999987,y:.09581950000000106},{x:.10564094999999973,y:.09262950000000103},{x:.10667494999999949,y:.08935950000000226},{x:.10769994999999977,y:.08610950000000273},{x:.1085699499999997,y:.08279950000000369},{x:.10927795000000007,y:.07942950000000337},{x:.10999794999999946,y:.07605950000000128},{x:.11051994999999959,y:.07262950000000146},{x:.11088394999999984,y:.06913950000000213},{x:.11124394999999954,y:.0656495000000028},{x:.11142394999999983,y:.062099500000002195},{x:.11142394999999983,y:.05854350000000075},{x:.10483595000000001,y:.05853049999999982},{x:.0982479500000002,y:.058516500000001415},{x:.09164495000000006,y:.058518500000001694},{x:.08505695000000024,y:.05850850000000207},{x:.078453950000001,y:.058509500000001324},{x:.07186595000000029,y:.058496500000000395},{x:.06526295000000104,y:.05849750000000142},{x:.058674950000001225,y:.058485499999999746},{x:.05208695000000052,y:.058473499999999845},{x:.04548395000000127,y:.058475500000000125},{x:.038895950000001456,y:.05846150000000172},{x:.03230795000000075,y:.058448499999999015},{x:.025704950000001503,y:.058453499999998826},{x:.019101950000001366,y:.05845449999999808},{x:.01251395000000155,y:.05844149999999715},{x:.005925950000001734,y:.058427499999998744},{x:-.0006560499999990199,y:.05842149999999968},{x:-.007240049999999165,y:.05841449999999959},{x:-.01382404999999931,y:.05840850000000053},{x:-.020406049999999176,y:.05840250000000147},{x:-.02699004999999932,y:.058394500000002125},{x:-.03357404999999947,y:.05838950000000409},{x:-.04015604999999933,y:.05838350000000503},{x:-.04674004999999948,y:.05837450000000466},{x:-.05332205000000023,y:.058368500000005596},{x:-.05990605000000038,y:.058360500000006255},{x:-.06649005000000052,y:.058355500000006444},{x:-.07307205000000039,y:.05834950000000738},{x:-.07965605000000053,y:.05834150000000804},{x:-.08624005000000068,y:.05833550000000898},{x:-.09282205000000143,y:.05833050000001094}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:.01254745000000046,y:.26612850000000243},bottom1:{type:"text",text:"{VAL}",x:-.16130964999999975,y:-.2661284999999989}},refblocks:{left1:{x:-.4717985499999999,y:-.09296750000000031},right1:{x:.4717985499999999,y:-.09299249999999937}},bounds:{width:.9999139819999998,height:.5322570000000013,centerX:0,centerY:17763568394002505e-31},circles:{}},{paths:_5t,texts:fbe,bounds:_O,refblocks:dbe,circles:x5t}=g5t,pbe=Bm({primitives:[...Object.values(_5t),...Object.values(x5t),{...fbe.top1,anchor:"middle_bottom",x:0},{...fbe.bottom1,anchor:"middle_top",x:0}],ports:[{...dbe.left1,labels:["1"]},{...dbe.right1,labels:["2"]}],size:{width:_O.width,height:_O.height},center:{x:_O.centerX+.006,y:_O.centerY+.06}}),TX=Cl(pbe),TC=TX.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),xO=TX.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");TC.anchor="middle_left",xO.anchor="middle_right",TC.x=TC.x-.03,TC.y=TC.y,xO.x=xO.x,xO.y=0;var b5t=TX,S5t={paths:{path11:{type:"path",points:[{x:-.39274354450000026,y:-.10329954999999957},{x:.05111245549999932,y:-.1059225499999994}],color:"primary",fill:!1},path40:{type:"path",points:[{x:.09373835550000087,y:.18559775000000034},{x:.09280835550000122,y:-.18255174999999935}],color:"primary",fill:!1},"path12-1":{type:"path",points:[{x:.30382435550000064,y:.53233025},{x:.3032243555000005,y:.10600584999999985}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:.3108281555000003,y:-.5323308500000001},{x:.31142815550000025,y:-.005876249999999805}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.09383795549999951,y:.10788365000000044},{x:.31104975549999936,y:.10659565000000004}],color:"primary",fill:!1},"path2-5":{type:"path",points:[{x:.09383795549999951,y:-.10232114999999986},{x:.31104975549999936,y:-.10360915000000026}],color:"primary",fill:!1},path15:{type:"path",points:[{x:.27419885550000034,y:-.04077644999999963},{x:.27419885550000034,y:.030615650000000327},{x:.2024438555000001,y:-.004662050000000084},{x:.27419885550000034,y:-.04077644999999963}],color:"primary",fill:!0},"path2-0":{type:"path",points:[{x:.09383795549999951,y:-.004018049999999551},{x:.31104975549999936,y:-.005306049999999729}],color:"primary",fill:!1},"path12-1-0":{type:"path",points:[{x:.05171245550000081,y:.16715385000000005},{x:.05111245550000065,y:-.10592255000000006}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.13197254449999907,y:.36092494999999936},bottom1:{type:"text",text:"{VAL}",x:.05891105550000031,y:-.42489435000000064}},refblocks:{top1:{x:.30397715549999993,y:.5519248499999992},bottom1:{x:.31067575550000126,y:-.5519248499999994},left1:{x:-.41859744450000025,y:-.10250625000000024}},bounds:{width:.8935117710000002,height:1.1601665819999987,centerX:-8326672684688674e-32,centerY:-5551115123125783e-32},circles:{path1:{type:"circle",x:.15821375550000005,y:.003454549999999612,radius:.28854213,color:"primary",fill:!1}}},{paths:w5t,texts:hbe,bounds:bO,refblocks:MX,circles:E5t}=S5t,mbe=Bm({primitives:[...Object.values(w5t),...Object.values(E5t),{...hbe.top1,anchor:"middle_right",x:0},{...hbe.bottom1,anchor:"middle_right",x:0}],ports:[{...MX.top1,labels:["1","drain"]},{...MX.bottom1,labels:["2","source"]},{...MX.left1,labels:["3","gate"]}],size:{width:bO.width,height:bO.height},center:{x:bO.centerX,y:bO.centerY}}),vbe=Cl(mbe),ybe=vbe.primitives.filter(n=>n.type==="text"),CX=ybe.find(n=>n.text==="{VAL}");CX.x=-.35,CX.y=0,CX.anchor="middle_right";var RX=ybe.find(n=>n.text==="{REF}");RX.y=0,RX.x=.35,RX.anchor="middle_left";var T5t=vbe,M5t={paths:{path11:{type:"path",points:[{x:-.39274354450000026,y:-.10329954999999957},{x:.05111245549999932,y:-.1059225499999994}],color:"primary",fill:!1},"path12-1":{type:"path",points:[{x:.30382435550000064,y:.53233025},{x:.3032243555000005,y:.10600584999999985}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:.3108281555000003,y:-.5323308500000001},{x:.31142815550000025,y:-.005876249999999805}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.09383795549999951,y:.10788365000000044},{x:.31104975549999936,y:.10659565000000004}],color:"primary",fill:!1},"path2-8-3-7":{type:"path",points:[{x:.09448295549999952,y:.14677165000000048},{x:.09319295549999951,y:.06899565000000041}],color:"primary",fill:!1},"path2-5":{type:"path",points:[{x:.09383795549999951,y:-.10232114999999986},{x:.31104975549999936,y:-.10360915000000026}],color:"primary",fill:!1},"path2-8-3":{type:"path",points:[{x:.09440455549999993,y:-.07703174999999951},{x:.09311455549999992,y:-.15480774999999958}],color:"primary",fill:!1},"path2-8-3-2":{type:"path",points:[{x:.09448295549999952,y:.03486995000000048},{x:.09319295549999951,y:-.042906049999999585}],color:"primary",fill:!1},path15:{type:"path",points:[{x:.2741991554999996,y:-.040776550000000134},{x:.2741991554999996,y:.030615549999999825},{x:.2024441554999994,y:-.004662350000000037},{x:.2741991554999996,y:-.040776550000000134}],color:"primary",fill:!0},"path2-0":{type:"path",points:[{x:.09383795549999951,y:-.004018049999999551},{x:.31104975549999936,y:-.005306049999999729}],color:"primary",fill:!1},"path12-1-0":{type:"path",points:[{x:.05171245550000081,y:.10847375000000059},{x:.05111245550000065,y:-.1059225499999994}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.13197254449999907,y:.36092494999999936},bottom1:{type:"text",text:"{VAL}",x:.05891105550000031,y:-.42489435000000064}},refblocks:{top1:{x:.30397715549999993,y:.5519248499999992},bottom1:{x:.31067575550000126,y:-.5519248499999994},left1:{x:-.41859744450000025,y:-.10250625000000024}},bounds:{width:.8935117710000002,height:1.1601665819999987,centerX:-8326672684688674e-32,centerY:-5551115123125783e-32},circles:{path1:{type:"circle",x:.15821375550000005,y:.003454549999999612,radius:.28854213,color:"primary",fill:!1}}},{paths:C5t,texts:gbe,bounds:SO,refblocks:AX,circles:R5t}=M5t,_be=Bm({primitives:[...Object.values(C5t),...Object.values(R5t),{...gbe.top1,anchor:"middle_right",x:0},{...gbe.bottom1,anchor:"middle_right",x:0}],ports:[{...AX.top1,labels:["1","drain"]},{...AX.bottom1,labels:["2","source"]},{...AX.left1,labels:["3","gate"]}],size:{width:SO.width,height:SO.height},center:{x:SO.centerX,y:SO.centerY}}),xbe=Cl(_be),bbe=xbe.primitives.filter(n=>n.type==="text"),PX=bbe.find(n=>n.text==="{VAL}");PX.x=-.35,PX.y=0,PX.anchor="middle_right";var NX=bbe.find(n=>n.text==="{REF}");NX.y=0,NX.x=.35,NX.anchor="middle_left";var A5t=xbe,P5t={paths:{path11:{type:"path",points:[{x:-.38509374449999945,y:-.00367374999999992},{x:.05876225550000025,y:-.00629674999999974}],color:"primary",fill:!1},path40:{type:"path",points:[{x:.07415065550000066,y:.18559775000000034},{x:.07322065550000101,y:-.18255174999999935}],color:"primary",fill:!1},"path12-1":{type:"path",points:[{x:.28423665550000043,y:.53233025},{x:.2836366555000003,y:.10600584999999985}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:.2912404555000001,y:-.5298821500000002},{x:.29184045550000004,y:-.10355795000000012}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.07425025549999931,y:.10788365000000044},{x:.29146205549999915,y:.10659565000000004}],color:"primary",fill:!1},"path2-5":{type:"path",points:[{x:.07425025549999931,y:-.10232114999999986},{x:.29146205549999915,y:-.10360915000000026}],color:"primary",fill:!1},path15:{type:"path",points:[{x:-.0829488445000004,y:.06153284999999986},{x:-.0829488445000004,y:-.06535114999999969},{x:.005945155500000077,y:-.0026521499999998532},{x:-.0829488445000004,y:.06153284999999986}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.15156024449999927,y:.36092494999999936},bottom1:{type:"text",text:"{VAL}",x:.0393233555000001,y:-.42489435000000064}},refblocks:{top1:{x:.2843894554999997,y:.5519248499999992},bottom1:{x:.29108805550000105,y:-.5519248499999994},left1:{x:-.3990097444999998,y:-.004526550000000462}},bounds:{width:.8543363709999996,height:1.1601665819999987,centerX:27755575615628914e-33,centerY:-5551115123125783e-32},circles:{path1:{type:"circle",x:.13862605549999985,y:.003454549999999612,radius:.28854213,color:"primary",fill:!1}}},{paths:N5t,texts:Sbe,bounds:wO,refblocks:DX,circles:D5t}=P5t,wbe=Bm({primitives:[...Object.values(N5t),...Object.values(D5t),{...Sbe.top1,anchor:"middle_right",x:0},{...Sbe.bottom1,anchor:"middle_right",x:0}],ports:[{...DX.top1,labels:["1","drain"]},{...DX.bottom1,labels:["2","source"]},{...DX.left1,labels:["3","gate"]}],size:{width:wO.width,height:wO.height},center:{x:wO.centerX,y:wO.centerY}}),Ebe=Cl(wbe),Tbe=Ebe.primitives.filter(n=>n.type==="text"),LX=Tbe.find(n=>n.text==="{VAL}");LX.x=-.35,LX.y=0,LX.anchor="middle_right";var OX=Tbe.find(n=>n.text==="{REF}");OX.y=0,OX.x=.35,OX.anchor="middle_left";var L5t=Ebe,zX={paths:{path11:{type:"path",points:[{x:-.3850939444999988,y:-.0036735999999999436},{x:.0587620555000008,y:-.0062965999999997635}],color:"primary",fill:!1},"path40-0":{type:"path",points:[{x:.07400475550000118,y:.2689528999999997},{x:.07335475550000092,y:-.2789230000000007}],color:"primary",fill:!1},"path40-0-5":{type:"path",points:[{x:.2754149555000005,y:.24180210000000013},{x:.07955815550000045,y:.10822479999999968}],color:"primary",fill:!1},"path40-0-5-0":{type:"path",points:[{x:.2868554555000009,y:-.24134789999999984},{x:.09194705550000082,y:-.10807689999999992}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:.2851204555,y:.25311099999999964},{x:.2860204555000001,y:.5377640999999995}],color:"primary",fill:!1},"path12-1-5-3":{type:"path",points:[{x:.2851204555,y:-.5376890000000012},{x:.2860204555000001,y:-.25303590000000065}],color:"primary",fill:!1},path15:{type:"path",points:[{x:.1882816555000013,y:-.10097660000000008},{x:.11555775550000158,y:-.20483720000000027},{x:.22425775550000182,y:-.20446720000000007},{x:.1882816555000013,y:-.10097660000000008}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.07802354449999971,y:.3596647999999991},bottom1:{type:"text",text:"{VAL}",x:-.0679100444999996,y:-.4129789000000006}},refblocks:{top1:{x:.28556045550000064,y:.5519250999999994},bottom1:{x:.285560455500002,y:-.5519250999999992},left1:{x:-.3990097444999998,y:-.004526300000000871}},bounds:{minX:-.4271681854999998,maxX:.4271681855000001,minY:-.5800835409999991,maxY:.5800835409999994,width:.8543363709999998,height:1.1601670819999985,centerX:13877787807814457e-32,centerY:11102230246251565e-32},circles:{"path1-0":{type:"circle",x:.13862605550000007,y:.003454799999999203,radius:.28854213,color:"primary",fill:!1}}},{paths:J5n,texts:ebn,bounds:tbn,refblocks:nbn,circles:rbn}=zX,Mbe=l0(zX).changeTextAnchor("{VAL}","middle_right").labelPort("left1",["3"]).labelPort("top1",["2"]).labelPort("bottom1",["1"]).changeTextAnchor("{REF}","middle_right").build(),O5t=Cl(Mbe),z5t=O5t.primitives.filter(n=>n.type==="text"),U5t=z5t.find(n=>n.text==="{REF}");U5t.anchor="middle_left";var k5t=l0(zX).rotateRightFacingSymbol("down").changeTextAnchor("{VAL}","middle_right").labelPort("left1",["3"]).labelPort("top1",["2"]).labelPort("bottom1",["1"]).changeTextAnchor("{REF}","middle_left").build(),I5t={paths:{path40:{type:"path",points:[{x:.14458890000000002,y:.0390362999999998},{x:-.3199943999999995,y:-.21132800000000015}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.3199943999999995,y:.31132800000000016},{x:.14458890000000002,y:.0390362999999998}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.3199943999999995,y:-.21132800000000015},{x:-.3199943999999995,y:.31132800000000016}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.3199943999999995,y:.1790362999999998},{x:-.58168694,y:.1790362999999998}],color:"primary",fill:!1},path45:{type:"path",points:[{x:-.3199943999999995,y:-.0890362999999998},{x:-.58168694,y:-.0890362999999998}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.4233797000000002,y:.03895110000000024},{x:.1496715999999998,y:.03895110000000024}],color:"primary",fill:!1},"rect1577-3":{type:"path",points:[{x:-.19898460000000012,y:.1790362999999998},{x:-.26995180000000035,y:.1790362999999998}],color:"primary",fill:!0},"rect1577-4":{type:"path",points:[{x:-.19898460000000012,y:-.0890362999999998},{x:-.26995180000000035,y:-.0890362999999998}],color:"primary",fill:!0},"rect1577-4-7":{type:"path",points:[{x:-.23480170000000036,y:-.05337805000000034},{x:-.23480170000000036,y:-.12434525000000014}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.0050250999999996715,y:.4188453},bottom1:{type:"text",text:"{VAL}",x:-.00011179999999977319,y:-.29994529999999997}},refblocks:{left1:{x:-.56868694,y:.1790362999999998},left2:{x:-.56868694,y:-.0890362999999998},right1:{x:.4291470999999999,y:.03889609999999988}},bounds:{minX:-.5473055410000001,maxX:.5473055409999998,minY:-.37884529999999994,maxY:.26884529999999995,width:1.094611082,height:.2976905999999999,centerX:-11102230246251565e-32,centerY:.05499999999999999},circles:{}},EO=l0(I5t).labelPort("left1",["1","inp1"]).labelPort("left2",["2","inp2"]).labelPort("right1",["3","out"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),F5t=Cl(EO,"down"),B5t=Cl(EO,"left"),j5t=Cl(EO,"up"),H5t={paths:{path40:{type:"path",points:[{x:.14458890000000002,y:.0390362999999998},{x:-.3199943999999995,y:-.21132800000000015}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.3199943999999995,y:.31132800000000016},{x:.14458890000000002,y:.0390362999999998}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.3199943999999995,y:-.21132800000000015},{x:-.3199943999999995,y:.31132800000000016}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.3199943999999995,y:.1790362999999998},{x:-.58168694,y:.1790362999999998}],color:"primary",fill:!1},path45:{type:"path",points:[{x:-.3199943999999995,y:-.0890362999999998},{x:-.58168694,y:-.0890362999999998}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.4233797000000002,y:.03895110000000024},{x:.1496715999999998,y:.03895110000000024}],color:"primary",fill:!1},"path44-1":{type:"path",points:[{x:-.09945180000000035,y:.43895110000000026},{x:-.09945180000000035,y:.1790362999999998}],color:"primary",fill:!1},"path44-2":{type:"path",points:[{x:-.09345180000000035,y:-.3389511000000002},{x:-.09345180000000035,y:-.0890362999999998}],color:"primary",fill:!1},"rect1577-3":{type:"path",points:[{x:-.19898460000000012,y:.1790362999999998},{x:-.26995180000000035,y:.1790362999999998}],color:"primary",fill:!0},"rect1577-4":{type:"path",points:[{x:-.19898460000000012,y:-.0890362999999998},{x:-.26995180000000035,y:-.0890362999999998}],color:"primary",fill:!0},"rect1577-4-7":{type:"path",points:[{x:-.23485180000000036,y:.14405005000000035},{x:-.23485180000000036,y:.2150405000000014}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:.2502509999999967,y:.31884529999999994},bottom1:{type:"text",text:"{VAL}",x:.2502509999999967,y:-.23599529999999996}},refblocks:{left1:{x:-.56868694,y:.1790362999999998},left2:{x:-.56868694,y:-.0890362999999998},right1:{x:.4291470999999999,y:.03889609999999988},top2:{x:-.09945180000000035,y:.43895110000000026},bottom1:{x:-.09345180000000035,y:-.3389511000000002}},bounds:{minX:-.5473055410000001,maxX:.5473055409999998,minY:-.37884529999999994,maxY:.26884529999999995,width:1.094611082,height:.2976905999999999,centerX:-11102230246251565e-32,centerY:.05499999999999999},circles:{}},TO=l0(H5t).labelPort("left1",["1","inp1"]).labelPort("left2",["2","inp2"]).labelPort("right1",["3","out"]).labelPort("top2",["4","V+"]).labelPort("bottom1",["5","V-"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),V5t=Cl(TO,"down"),$5t=Cl(TO,"left"),G5t=Cl(TO,"up"),q5t={paths:{path11:{type:"path",points:[{x:-.39274354450000026,y:-.10329954999999957},{x:.05111245549999932,y:-.1059225499999994}],color:"primary",fill:!1},path40:{type:"path",points:[{x:.09373835550000087,y:.18559775000000034},{x:.09280835550000122,y:-.18255174999999935}],color:"primary",fill:!1},"path12-1":{type:"path",points:[{x:.30382435550000064,y:.53233025},{x:.3032243555000005,y:.10600584999999985}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:.3108281555000003,y:-.5323308500000001},{x:.31142815550000025,y:-.005876249999999805}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.09383795549999951,y:.10788365000000044},{x:.31104975549999936,y:.10659565000000004}],color:"primary",fill:!1},"path2-5":{type:"path",points:[{x:.09383795549999951,y:-.10232114999999986},{x:.31104975549999936,y:-.10360915000000026}],color:"primary",fill:!1},path15:{type:"path",points:[{x:.20244405549999955,y:.03061555000000049},{x:.20244405549999955,y:-.04077654999999947},{x:.2741990554999998,y:-.0054987499999992195},{x:.20244405549999955,y:.03061555000000049}],color:"primary",fill:!0},"path2-0":{type:"path",points:[{x:.09383795549999951,y:-.004018049999999551},{x:.31104975549999936,y:-.005306049999999729}],color:"primary",fill:!1},"path12-1-0":{type:"path",points:[{x:.05171245550000081,y:.16715385000000005},{x:.05111245550000065,y:-.10592255000000006}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.13197254449999907,y:.36092494999999936},bottom1:{type:"text",text:"{VAL}",x:.05891105550000031,y:-.42489435000000064}},refblocks:{top1:{x:.30397715549999993,y:.5519248499999992},bottom1:{x:.31067575550000126,y:-.5519248499999994},left1:{x:-.41859744450000025,y:-.10250625000000024}},bounds:{width:.8935117710000002,height:1.1601665819999987,centerX:-8326672684688674e-32,centerY:-5551115123125783e-32},circles:{path1:{type:"circle",x:.15821375550000005,y:.003454549999999612,radius:.28854213,color:"primary",fill:!1}}},{paths:Y5t,texts:Cbe,bounds:MO,refblocks:UX,circles:X5t}=q5t,Rbe=Bm({primitives:[...Object.values(Y5t),...Object.values(X5t),{...Cbe.top1,anchor:"middle_right",x:0},{...Cbe.bottom1,anchor:"middle_right",x:0}],ports:[{...UX.top1,labels:["1","drain"]},{...UX.bottom1,labels:["2","source"]},{...UX.left1,labels:["3","gate"]}],size:{width:MO.width,height:MO.height},center:{x:MO.centerX,y:MO.centerY}}),Abe=Cl(Rbe),Pbe=Abe.primitives.filter(n=>n.type==="text"),kX=Pbe.find(n=>n.text==="{VAL}");kX.x=-.35,kX.y=0,kX.anchor="middle_right";var IX=Pbe.find(n=>n.text==="{REF}");IX.y=0,IX.x=.35,IX.anchor="middle_left";var W5t=Abe,Z5t={paths:{path11:{type:"path",points:[{x:-.39274354450000026,y:-.10329954999999957},{x:.05111245549999932,y:-.1059225499999994}],color:"primary",fill:!1},"path12-1":{type:"path",points:[{x:.30382435550000064,y:.53233025},{x:.3032243555000005,y:.10600584999999985}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:.3108281555000003,y:-.5323308500000001},{x:.31142815550000025,y:-.005876249999999805}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.09383795549999951,y:.10788365000000044},{x:.31104975549999936,y:.10659565000000004}],color:"primary",fill:!1},"path2-8-3-7":{type:"path",points:[{x:.09448295549999952,y:.14677165000000048},{x:.09319295549999951,y:.06899565000000041}],color:"primary",fill:!1},"path2-5":{type:"path",points:[{x:.09383795549999951,y:-.10232114999999986},{x:.31104975549999936,y:-.10360915000000026}],color:"primary",fill:!1},"path2-8-3":{type:"path",points:[{x:.09440455549999993,y:-.07703174999999951},{x:.09311455549999992,y:-.15480774999999958}],color:"primary",fill:!1},"path2-8-3-2":{type:"path",points:[{x:.09448295549999952,y:.03486995000000048},{x:.09319295549999951,y:-.042906049999999585}],color:"primary",fill:!1},path15:{type:"path",points:[{x:.20244405549999955,y:.03061555000000049},{x:.20244405549999955,y:-.04077654999999947},{x:.2741990554999998,y:-.0054987499999992195},{x:.20244405549999955,y:.03061555000000049}],color:"primary",fill:!0},"path2-0":{type:"path",points:[{x:.09383795549999951,y:-.004018049999999551},{x:.31104975549999936,y:-.005306049999999729}],color:"primary",fill:!1},"path12-1-0":{type:"path",points:[{x:.05171245550000081,y:.10847375000000059},{x:.05111245550000065,y:-.1059225499999994}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.13197254449999907,y:.36092494999999936},bottom1:{type:"text",text:"{VAL}",x:.05891105550000031,y:-.42489435000000064}},refblocks:{top1:{x:.30397715549999993,y:.5519248499999992},bottom1:{x:.31067575550000126,y:-.5519248499999994},left1:{x:-.41859744450000025,y:-.10250625000000024}},bounds:{width:.8935117710000002,height:1.1601665819999987,centerX:-8326672684688674e-32,centerY:-5551115123125783e-32},circles:{path1:{type:"circle",x:.15821375550000005,y:.003454549999999612,radius:.28854213,color:"primary",fill:!1}}},{paths:Q5t,texts:Nbe,bounds:CO,refblocks:FX,circles:K5t}=Z5t,Dbe=Bm({primitives:[...Object.values(Q5t),...Object.values(K5t),{...Nbe.top1,anchor:"middle_right",x:0},{...Nbe.bottom1,anchor:"middle_right",x:0}],ports:[{...FX.top1,labels:["1","drain"]},{...FX.bottom1,labels:["2","source"]},{...FX.left1,labels:["3","gate"]}],size:{width:CO.width,height:CO.height},center:{x:CO.centerX,y:CO.centerY}}),Lbe=Cl(Dbe),Obe=Lbe.primitives.filter(n=>n.type==="text"),BX=Obe.find(n=>n.text==="{VAL}");BX.x=-.35,BX.y=0,BX.anchor="middle_right";var jX=Obe.find(n=>n.text==="{REF}");jX.y=0,jX.x=.35,jX.anchor="middle_left";var J5t=Lbe,ebt={paths:{path11:{type:"path",points:[{x:-.5274831500000005,y:-.012413549999999773},{x:-.14891374999999973,y:-.015036549999999593}],color:"primary",fill:!1},path40:{type:"path",points:[{x:.13221874999999983,y:-.001352349999999447},{x:-.1323642500000004,y:-.13364404999999913}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.1323642500000004,y:.13093935000000023},{x:.13221874999999983,y:-.001352349999999447}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.1323642500000004,y:-.1336440499999998},{x:-.1323642500000004,y:.13093935000000023}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.13221874999999983,y:.13093935000000023},{x:.13221874999999983,y:-.1336440499999998}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.1358253500000004,y:-.001921149999999372},{x:.533952450000001,y:-.012413549999999107}],color:"primary",fill:!1},"path25-0":{type:"path",points:[{x:.19839785000000076,y:.37576625000000075},{x:.16262485000000027,y:.28367475000000053},{x:.26033484999999956,y:.2989800500000006}],color:"primary",fill:!0},"path78-6":{type:"path",points:[{x:.3305468500000004,y:.4264014500000006},{x:.31941585000000017,y:.4163797500000006},{x:.20669285000000048,y:.3148875500000008},{x:.20564285000000115,y:.31448755000000084}],color:"primary",fill:!1},"path25-0-9":{type:"path",points:[{x:.34573984999999974,y:.3493283500000002},{x:.30996684999999946,y:.25723684999999996},{x:.40767644999999963,y:.27254215000000004}],color:"primary",fill:!0},"path78-6-5":{type:"path",points:[{x:.47788845000000046,y:.39996355000000006},{x:.46675745000000024,y:.38994185000000003},{x:.35403445000000033,y:.2884496500000002},{x:.352984450000001,y:.2880496500000005}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.10246254999999982,y:.34693914999999986},bottom1:{type:"text",text:"{VAL}",x:.0012544500000004621,y:-.4264014500000004}},refblocks:{left1:{x:-.5413984499999998,y:-.013266350000000315},right1:{x:.54139845,y:-.012269950000000529}},bounds:{minX:-.5695568909999997,maxX:.569556891,minY:-.4264014500000004,maxY:.4264014500000006,width:1.1391137819999997,height:.852802900000001,centerX:11102230246251565e-32,centerY:11102230246251565e-32},circles:{path1:{type:"circle",x:-.0037626500000000895,y:-.005285250000000241,radius:.28854213,color:"primary",fill:!1}}},zbe=l0(ebt).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),Ube=Cl(zbe),tbt=Ube.primitives.filter(n=>n.type==="text"),kbe=tbt.find(n=>n.text==="{REF}");kbe.y=0,kbe.anchor="middle_left";var nbt=Ube,rbt={paths:{path11:{type:"path",points:[{x:-.38509374449999945,y:-.00367374999999992},{x:.05876225550000025,y:-.00629674999999974}],color:"primary",fill:!1},path40:{type:"path",points:[{x:.07415065550000066,y:.18559775000000034},{x:.07322065550000101,y:-.18255174999999935}],color:"primary",fill:!1},"path12-1":{type:"path",points:[{x:.28423665550000043,y:.53233025},{x:.2836366555000003,y:.10600584999999985}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:.2912404555000001,y:-.5298821500000002},{x:.29184045550000004,y:-.10355795000000012}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.07425025549999931,y:.10788365000000044},{x:.29146205549999915,y:.10659565000000004}],color:"primary",fill:!1},"path2-5":{type:"path",points:[{x:.07425025549999931,y:-.10232114999999986},{x:.29146205549999915,y:-.10360915000000026}],color:"primary",fill:!1},path15:{type:"path",points:[{x:.005945155500000077,y:-.06535114999999969},{x:.005945155500000077,y:.06153284999999986},{x:-.0829488445000004,y:-.001166149999999977},{x:.005945155500000077,y:-.06535114999999969}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.15156024449999927,y:.36092494999999936},bottom1:{type:"text",text:"{VAL}",x:.0393233555000001,y:-.42489435000000064}},refblocks:{top1:{x:.2843894554999997,y:.5519248499999992},bottom1:{x:.29108805550000105,y:-.5519248499999994},left1:{x:-.3990097444999998,y:-.004526550000000462}},bounds:{width:.8543363709999996,height:1.1601665819999987,centerX:27755575615628914e-33,centerY:-5551115123125783e-32},circles:{path1:{type:"circle",x:.13862605549999985,y:.003454549999999612,radius:.28854213,color:"primary",fill:!1}}},{paths:ibt,texts:Ibe,bounds:RO,refblocks:HX,circles:abt}=rbt,Fbe=Bm({primitives:[...Object.values(ibt),...Object.values(abt),{...Ibe.top1,anchor:"middle_right",x:0},{...Ibe.bottom1,anchor:"middle_right"}],ports:[{...HX.top1,labels:["1","drain"]},{...HX.bottom1,labels:["2","source"]},{...HX.left1,labels:["3","gate"]}],size:{width:RO.width,height:RO.height},center:{x:RO.centerX,y:RO.centerY}}),Bbe=Cl(Fbe),jbe=Bbe.primitives.filter(n=>n.type==="text"),VX=jbe.find(n=>n.text==="{VAL}");VX.x=-.35,VX.y=0,VX.anchor="middle_right";var $X=jbe.find(n=>n.text==="{REF}");$X.y=0,$X.x=.35,$X.anchor="middle_left";var obt=Bbe,Hbe={paths:{path11:{type:"path",points:[{x:-.3850939444999988,y:-.0036735999999999436},{x:.0587620555000008,y:-.0062965999999997635}],color:"primary",fill:!1},"path40-0":{type:"path",points:[{x:.07400475550000118,y:.2689528999999997},{x:.07335475550000092,y:-.2789230000000007}],color:"primary",fill:!1},"path40-0-5":{type:"path",points:[{x:.2754149555000005,y:.24180210000000013},{x:.07955815550000045,y:.10822479999999968}],color:"primary",fill:!1},"path40-0-5-0":{type:"path",points:[{x:.2868554555000009,y:-.24134789999999984},{x:.09194705550000082,y:-.10807689999999992}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:.2851204555,y:.25311099999999964},{x:.2860204555000001,y:.5377640999999995}],color:"primary",fill:!1},"path12-1-5-3":{type:"path",points:[{x:.2851204555,y:-.5376890000000012},{x:.2860204555000001,y:-.25303590000000065}],color:"primary",fill:!1},path15:{type:"path",points:[{x:.15155145550000038,y:-.2268796000000004},{x:.2242753555000001,y:-.12301900000000021},{x:.11557535549999942,y:-.12338900000000042},{x:.15155145550000038,y:-.2268796000000004}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.08351674449999891,y:.37335419999999897},bottom1:{type:"text",text:"{VAL}",x:-.0679100444999996,y:-.4129789000000006}},refblocks:{top1:{x:.28556045550000064,y:.5519250999999994},bottom1:{x:.285560455500002,y:-.5519250999999992},left1:{x:-.3990097444999998,y:-.004526300000000871}},bounds:{minX:-.4271681854999998,maxX:.4271681855000001,minY:-.5800835409999991,maxY:.5800835409999994,width:.8543363709999998,height:1.1601670819999985,centerX:13877787807814457e-32,centerY:11102230246251565e-32},circles:{"path1-0":{type:"circle",x:.13862605550000007,y:.003454799999999203,radius:.28854213,color:"primary",fill:!1}}},Vbe=l0(Hbe).changeTextAnchor("{VAL}","middle_right").labelPort("left1",["3"]).labelPort("bottom1",["2"]).labelPort("top1",["1"]).changeTextAnchor("{REF}","middle_right").build(),sbt=Cl(Vbe),lbt=sbt.primitives.filter(n=>n.type==="text"),cbt=lbt.find(n=>n.text==="{REF}");cbt.anchor="middle_left";var ubt=l0(Hbe).rotateRightFacingSymbol("down").changeTextAnchor("{VAL}","middle_right").labelPort("left1",["3"]).labelPort("bottom1",["2"]).labelPort("top1",["1"]).changeTextAnchor("{REF}","middle_left").build(),fbt={paths:{path40:{type:"path",points:[{x:-.19250837381256392,y:.32749349347032286},{x:-.25568957329611974,y:.13794979950157282}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.38205206778131373,y:.26431229398676837},{x:-.19250837381256392,y:.32749349347032286}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.2556895732961204,y:.13794979950157416},{x:-.38205206778131373,y:.26431229398676837}],color:"primary",fill:!1},path43:{type:"path",points:[{x:-.2556896210551609,y:.39067474071292196},{x:-.12932712656996737,y:.26431224622772653}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.3199237641156438,y:.2000781031672434},{x:-.5084145145074668,y:.011587352775420667}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:-.011560829633404435,y:.5083596562436202},{x:-.19004023433272543,y:.3298802515442989}],color:"primary",fill:!1},"path40-4":{type:"path",points:[{x:-.19250813152967883,y:-.3220463011874377},{x:-.38205182549842887,y:-.2588651017038819}],color:"primary",fill:!1},"path41-1":{type:"path",points:[{x:-.2556893310132333,y:-.13250260721868767},{x:-.19250813152967883,y:-.3220463011874377}],color:"primary",fill:!1},"path42-7":{type:"path",points:[{x:-.38205182549842753,y:-.258865101703881},{x:-.2556893310132333,y:-.13250260721868767}],color:"primary",fill:!1},"path43-1":{type:"path",points:[{x:-.12932688428707984,y:-.2588650539448407},{x:-.25568937877227516,y:-.38522754843003404}],color:"primary",fill:!1},"path44-8":{type:"path",points:[{x:-.3199235218327583,y:-.19463091088435758},{x:-.508414272224581,y:-.006140160492534852}],color:"primary",fill:!1},"path44-0-7":{type:"path",points:[{x:-.011641968756381349,y:-.5029938453665972},{x:-.1901213734557028,y:-.3245144406672762}],color:"primary",fill:!1},"path40-4-0":{type:"path",points:[{x:.322578868470321,y:.19315369881256328},{x:.13303517450157099,y:.2563348982961191}],color:"primary",fill:!1},"path41-1-2":{type:"path",points:[{x:.2593976689867663,y:.3826973927813131},{x:.322578868470321,y:.19315369881256328}],color:"primary",fill:!1},"path42-7-1":{type:"path",points:[{x:.13303517450157232,y:.2563348982961198},{x:.2593976689867663,y:.3826973927813131}],color:"primary",fill:!1},"path43-1-8":{type:"path",points:[{x:.38576011571292,y:.2563349460551603},{x:.2593976212277247,y:.12997245156996673}],color:"primary",fill:!1},"path44-8-7":{type:"path",points:[{x:.19516347816724133,y:.3205690891156432},{x:.006672727775418608,y:.509059839507466}],color:"primary",fill:!1},"path44-0-7-1":{type:"path",points:[{x:.5034450312436185,y:.012206154633403798},{x:.32496562654429706,y:.19068555933272457}],color:"primary",fill:!1},"path40-4-8":{type:"path",points:[{x:.3220220261874358,y:-.19326390652967795},{x:.25884082670387976,y:-.382807600498428}],color:"primary",fill:!1},"path41-1-4":{type:"path",points:[{x:.13247833221868577,y:-.25644510601323245},{x:.3220220261874358,y:-.19326390652967795}],color:"primary",fill:!1},"path42-7-0":{type:"path",points:[{x:.2588408267038793,y:-.38280760049842666},{x:.13247833221868577,y:-.25644510601323245}],color:"primary",fill:!1},"path43-1-0":{type:"path",points:[{x:.2588407789448386,y:-.13008265928707896},{x:.38520327343003213,y:-.2564451537722743}],color:"primary",fill:!1},"path44-8-9":{type:"path",points:[{x:.19460663588435567,y:-.3206792968327574},{x:.0061158854925329464,y:-.5091700472245801}],color:"primary",fill:!1},"path44-0-7-3":{type:"path",points:[{x:.5029695703665951,y:-.012397743756380697},{x:.3244901656672745,y:-.19087714845570192}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.2872803000000015,y:.4564494249999992},bottom1:{type:"text",text:"{VAL}",x:-.2872803000000015,y:-.4960514750000007}},refblocks:{left1:{x:-.5191472999999998,y:.0005123250000014234},right1:{x:.5191473000000002,y:-.0005123749999977889}},bounds:{width:1.094611482,height:1.0946118820000001,centerX:2220446049250313e-31,centerY:-5551115123125783e-32}},{paths:dbt,texts:$be,bounds:AO,refblocks:Gbe}=fbt,qbe=Bm({primitives:[...Object.values(dbt),{...$be.bottom1,y:.35,anchor:"middle_top"},{...$be.top1,anchor:"middle_left"}],ports:[{...Gbe.left1,labels:["1"]},{...Gbe.right1,labels:["2"]}],size:{width:AO.width+.05,height:AO.height},center:{x:AO.centerX,y:AO.centerY}}),pbt=Cl(qbe),hbt=pbt,mbt={paths:{path18:{type:"path",points:[{x:-.53224045,y:-.0008545000000008685},{x:-.26765715000000023,y:-.0008545000000008685}],color:"primary",fill:!1},path19:{type:"path",points:[{x:.2615098499999995,y:-.0008545000000008685},{x:.5260934499999994,y:-.0008545000000008685}],color:"primary",fill:!1},path20:{type:"path",points:[{x:-.0030722500000006647,y:.1314371999999988},{x:.2615107499999998,y:.1314371999999988},{x:.2615107499999998,y:-.13314619999999877},{x:-.26765624999999993,y:-.13314619999999877},{x:-.26765624999999993,y:.1314371999999988},{x:-.0030722499999988884,y:.1314371999999988}],color:"primary",fill:!1},path23:{type:"path",points:[{x:.2782993499999993,y:-.2822274},{x:.17598844999999885,y:-.25486950000000164},{x:.25094144999999823,y:-.1799165000000027}],color:"primary",fill:!0},path24:{type:"path",points:[{x:.2882692499999995,y:-.2921307000000013},{x:.25467554999999953,y:-.16634940000000142},{x:.16229264999999948,y:-.25853690000000284}],color:"primary",fill:!0},path26:{type:"path",points:[{x:-.2985911500000009,y:.2921307000000013},{x:.22988164999999938,y:-.2328032000000011}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:.055041669999999154,y:.2009376800000009},bottom1:{type:"text",text:"{VAL}",x:-.10019643000000089,y:-.27857531999999985}},refblocks:{left1:{x:-.5346914500000006,y:-.0013439000000019519},right1:{x:.5346914500000004,y:-.001956599999999753}},bounds:{width:1.125699782000001,height:.5842614000000026,centerX:-11102230246251565e-32,centerY:0}},{paths:vbt,texts:Ybe,bounds:PO,refblocks:Xbe}=mbt,Wbe=Bm({primitives:[...Object.values(vbt),{...Ybe.bottom1,anchor:"middle_top"},{...Ybe.top1,anchor:"middle_bottom"}],ports:[{...Xbe.left1,labels:["1"]},{...Xbe.right1,labels:["2"]}],size:{width:PO.width,height:PO.height},center:{x:PO.centerX,y:PO.centerY}}),Zbe=Cl(Wbe),Qbe=Zbe.primitives.filter(n=>n.type==="text"),ybt=Qbe.find(n=>n.text==="{VAL}");ybt.anchor="middle_right";var gbt=Qbe.find(n=>n.text==="{REF}");gbt.anchor="middle_left";var _bt=Zbe,xbt={paths:{path1:{type:"path",points:[{x:-.4,y:0},{x:-.3,y:0}],color:"primary",fill:!1},"path1-2-1":{type:"path",points:[{x:-.3,y:0},{x:-.25,y:.1},{x:-.15,y:-.1},{x:-.05,y:.1},{x:.05,y:-.1},{x:.15,y:.1},{x:.25,y:-.1},{x:.3,y:0}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.3,y:0},{x:.4,y:0}],color:"primary",fill:!1},path3:{type:"path",points:[{x:0,y:-.17},{x:0,y:-.4}],color:"primary",fill:!1},path15:{type:"path",points:[{x:0,y:-.12},{x:.05,y:-.2},{x:-.05,y:-.2},{x:0,y:-.12}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:.3,y:.25},bottom1:{type:"text",text:"{VAL}",x:.3,y:-.25}},refblocks:{left:{x:-.42,y:0},right:{x:.42,y:0},bottom:{x:0,y:-.4}},bounds:{minX:-.42,maxX:.42,minY:-.2,maxY:.2,width:.84,height:.4,centerX:0,centerY:0},circles:{}},NO=l0(xbt).labelPort("left",["1"]).labelPort("right",["3"]).labelPort("bottom",["2"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),bbt=Cl(NO,"down"),Sbt=Cl(NO,"left"),wbt=Cl(NO,"up"),Ebt={paths:{path11:{type:"path",points:[{x:-.5274831500000005,y:.02812460000000061},{x:-.30105415000000013,y:.02812460000000061}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.2932119499999999,y:.02812460000000061},{x:.5339524499999997,y:.02812460000000061}],color:"primary",fill:!1}},refblocks:{left1:{x:-.5413984499999998,y:.027271800000000068},right1:{x:.54139845,y:.028268199999999855}},bounds:{width:1.1391137819999997,height:.7903522000000003,centerX:11102230246251565e-32,centerY:11102230246251565e-32},circles:{path1:{type:"circle",x:-.0037626500000000895,y:.03525290000000014,radius:.28854213,color:"primary",fill:!1}}},{paths:Tbt,bounds:DO,refblocks:Kbe,circles:Mbt}=Ebt,Jbe=Bm({primitives:[...Object.values(Tbt),...Object.values(Mbt),{type:"text",text:"{REF}",x:-.15,y:-.42330070000000064,anchor:"middle_top"},{type:"text",text:"{VAL}",x:-.15,y:.42330070000000064,anchor:"middle_bottom"},{type:"text",text:"COS φ",x:0,y:.014279000000000375,anchor:"center"}],ports:[{...Kbe.left1,labels:["1"]},{...Kbe.right1,labels:["2"]}],size:{width:DO.width,height:DO.height},center:{x:DO.centerX,y:DO.centerY}}),e3e=Cl(Jbe),GX=e3e.primitives.filter(n=>n.type==="text"),qX=GX.find(n=>n.text==="{REF}"),YX=GX.find(n=>n.text==="{VAL}"),XX=GX.find(n=>n.text==="COS φ");qX.x=.35,qX.y=0,qX.anchor="middle_left",YX.anchor="middle_right",YX.x=-.35,YX.y=0,XX.x=0,XX.y=0,XX.anchor="center";var Cbt=e3e,Rbt={paths:{"path12-1-8-6-9-9":{type:"path",points:[{x:.013196749999999646,y:.030446500000000043},{x:.013196749999999646,y:-.0859464999999986}],color:"primary",fill:!1},"path12-1-5-6-4":{type:"path",points:[{x:-.4867871500000014,y:-.0510704999999998},{x:-.17248085000000124,y:-.0510704999999998}],color:"primary",fill:!1},"path12-1-8-0-0":{type:"path",points:[{x:-.15916995000000078,y:-.0915204999999979},{x:.1810634499999999,y:-.0915204999999979}],color:"primary",fill:!1},"path12-1-0-1":{type:"path",points:[{x:.19611864999999984,y:-.05109549999999885},{x:.48876354999999894,y:-.05109549999999885}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:.007320949999999549,y:.22461850000000005},bottom1:{type:"text",text:"{VAL}",x:-.1606897500000004,y:-.22461849999999828}},refblocks:{left1:{x:-.47241845000000104,y:-.05104349999999869},right1:{x:.47241845000000016,y:-.051482499999998765}},bounds:{width:1.0011537820000012,height:.44923699999999833,centerX:-4440892098500626e-31,centerY:8881784197001252e-31},circles:{"circle-2":{type:"circle",x:-.14387115000000072,y:-.05130149999999922,radius:.023193523,color:"primary",fill:!1},circle:{type:"circle",x:.16803074999999978,y:-.05007949999999717,radius:.023193523,color:"primary",fill:!1}}},{paths:Abt,texts:t3e,bounds:LO,refblocks:n3e,circles:Pbt}=Rbt,r3e=Bm({primitives:[...Object.values(Abt),...Object.values(Pbt),{...t3e.top1,anchor:"middle_left"},{...t3e.bottom1,anchor:"middle_left"}],ports:[{...n3e.left1,labels:["1"]},{...n3e.right1,labels:["2"]}],size:{width:LO.width,height:LO.height},center:{x:LO.centerX,y:LO.centerY}}),Nbt=Cl(r3e,"up"),Dbt={paths:{"path12-1-8-6-9-9":{type:"path",points:[{x:-.04575882,y:.08981650000000013},{x:-.04575882,y:.039523500000001495}],color:"primary",fill:!1},"path12-1-8-7-9-9":{type:"path",points:[{x:-.04575882,y:.08981650000000013},{x:.06765231,y:.08981650000000013}],color:"primary",fill:!1},"path12-1-8-6-9-10":{type:"path",points:[{x:.06765231,y:.08981650000000013},{x:.06765231,y:.039523500000001495}],color:"primary",fill:!1},"path12-1-5-6-4":{type:"path",points:[{x:-.4867871500000014,y:-.0510704999999998},{x:-.17248085000000124,y:-.0510704999999998}],color:"primary",fill:!1},"path12-1-8-0-0":{type:"path",points:[{x:-.15916995000000078,y:.03984950000000042},{x:.1810634499999999,y:.03984950000000042}],color:"primary",fill:!1},"path12-1-0-1":{type:"path",points:[{x:.19611864999999984,y:-.05109549999999885},{x:.48876354999999894,y:-.05109549999999885}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:.007320949999999549,y:.29461850000000006},bottom1:{type:"text",text:"{VAL}",x:-.1606897500000004,y:-.22461849999999828}},refblocks:{left1:{x:-.47241845000000104,y:-.05104349999999869},right1:{x:.47241845000000016,y:-.051482499999998765}},bounds:{width:1.0011537820000012,height:.44923699999999833,centerX:-4440892098500626e-31,centerY:8881784197001252e-31},circles:{"circle-2":{type:"circle",x:-.14387115000000072,y:-.05130149999999922,radius:.023193523,color:"primary",fill:!1},circle:{type:"circle",x:.16803074999999978,y:-.05007949999999717,radius:.023193523,color:"primary",fill:!1}}},{paths:Lbt,texts:i3e,bounds:OO,refblocks:a3e,circles:Obt}=Dbt,o3e=Bm({primitives:[...Object.values(Lbt),...Object.values(Obt),{...i3e.top1,anchor:"middle_left"},{...i3e.bottom1,anchor:"middle_left"}],ports:[{...a3e.left1,labels:["1"]},{...a3e.right1,labels:["2"]}],size:{width:OO.width,height:OO.height},center:{x:OO.centerX,y:OO.centerY}}),zbt=Cl(o3e,"up"),Ubt={paths:{path40:{type:"path",points:[{x:-.19250837381256392,y:-.32749349347032286},{x:-.25568957329611974,y:-.13794979950157282}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.38205206778131373,y:-.26431229398676837},{x:-.19250837381256392,y:-.32749349347032286}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.2556895732961204,y:-.13794979950157416},{x:-.38205206778131373,y:-.26431229398676837}],color:"primary",fill:!1},path43:{type:"path",points:[{x:-.2556896210551609,y:-.39067474071292196},{x:-.12932712656996737,y:-.26431224622772653}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.3199237641156438,y:-.2000781031672434},{x:-.5084145145074668,y:-.011587352775420667}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:-.011560829633404435,y:-.5083596562436202},{x:-.19004023433272543,y:-.3298802515442989}],color:"primary",fill:!1},"path40-4":{type:"path",points:[{x:-.19250813152967883,y:.3220463011874377},{x:-.38205182549842887,y:.2588651017038819}],color:"primary",fill:!1},"path41-1":{type:"path",points:[{x:-.2556893310132333,y:.13250260721868767},{x:-.19250813152967883,y:.3220463011874377}],color:"primary",fill:!1},"path42-7":{type:"path",points:[{x:-.38205182549842753,y:.258865101703881},{x:-.2556893310132333,y:.13250260721868767}],color:"primary",fill:!1},"path43-1":{type:"path",points:[{x:-.12932688428707984,y:.2588650539448407},{x:-.25568937877227516,y:.38522754843003404}],color:"primary",fill:!1},"path44-8":{type:"path",points:[{x:-.3199235218327583,y:.19463091088435758},{x:-.508414272224581,y:.006140160492534852}],color:"primary",fill:!1},"path44-0-7":{type:"path",points:[{x:-.011641968756381349,y:.5029938453665972},{x:-.1901213734557028,y:.3245144406672762}],color:"primary",fill:!1},"path40-4-0":{type:"path",points:[{x:.322578868470321,y:-.19315369881256328},{x:.13303517450157099,y:-.2563348982961191}],color:"primary",fill:!1},"path41-1-2":{type:"path",points:[{x:.2593976689867663,y:-.3826973927813131},{x:.322578868470321,y:-.19315369881256328}],color:"primary",fill:!1},"path42-7-1":{type:"path",points:[{x:.13303517450157232,y:-.2563348982961198},{x:.2593976689867663,y:-.3826973927813131}],color:"primary",fill:!1},"path43-1-8":{type:"path",points:[{x:.38576011571292,y:-.2563349460551603},{x:.2593976212277247,y:-.12997245156996673}],color:"primary",fill:!1},"path44-8-7":{type:"path",points:[{x:.19516347816724133,y:-.3205690891156432},{x:.006672727775418608,y:-.509059839507466}],color:"primary",fill:!1},"path44-0-7-1":{type:"path",points:[{x:.5034450312436185,y:-.012206154633403798},{x:.32496562654429706,y:-.19068555933272457}],color:"primary",fill:!1},"path40-4-8":{type:"path",points:[{x:.3220220261874358,y:.19326390652967795},{x:.25884082670387976,y:.382807600498428}],color:"primary",fill:!1},"path41-1-4":{type:"path",points:[{x:.13247833221868577,y:.25644510601323245},{x:.3220220261874358,y:.19326390652967795}],color:"primary",fill:!1},"path42-7-0":{type:"path",points:[{x:.2588408267038793,y:.38280760049842666},{x:.13247833221868577,y:.25644510601323245}],color:"primary",fill:!1},"path43-1-0":{type:"path",points:[{x:.2588407789448386,y:.13008265928707896},{x:.38520327343003213,y:.2564451537722743}],color:"primary",fill:!1},"path44-8-9":{type:"path",points:[{x:.19460663588435567,y:.3206792968327574},{x:.0061158854925329464,y:.5091700472245801}],color:"primary",fill:!1},"path44-0-7-3":{type:"path",points:[{x:.5029695703665951,y:.012397743756380697},{x:.3244901656672745,y:.19087714845570192}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.2872803000000015,y:-.4564494249999992},bottom1:{type:"text",text:"{VAL}",x:-.2872803000000015,y:.4960514750000007}},refblocks:{top1:{x:.0005126999999993664,y:-.5191475},bottom1:{x:-.0005123000000009093,y:.5191475000000001},left1:{x:-.5191472999999998,y:-.0005123250000014234},right1:{x:.5191473000000002,y:.0005123749999977889}},bounds:{width:1.094611482,height:1.1037553659999992,centerX:2220446049250313e-31,centerY:-.004571741999999546},circles:{}},{paths:kbt,texts:s3e,bounds:zO,refblocks:UO,circles:Ibt}=Ubt,l3e=Bm({primitives:[...Object.values(kbt),...Object.values(Ibt),{...s3e.top1,anchor:"middle_right"},{...s3e.bottom1,anchor:"middle_right"}],ports:[{...UO.top1,labels:["1"]},{...UO.bottom1,labels:["2"]},{...UO.left1,labels:["3"]},{...UO.right1,labels:["4"]}],size:{width:zO.width,height:zO.height},center:{x:zO.centerX,y:zO.centerY}}),WX=Cl(l3e),Fbt=WX.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),Bbt=WX.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");Fbt.anchor="middle_left",Bbt.anchor="middle_right";var jbt=WX,Hbt={paths:{path27:{type:"path",points:[{x:.7635944500000007,y:-.2799544500000035},{x:.3138028500000005,y:-.2799544500000035}],color:"primary",fill:!1},path28:{type:"path",points:[{x:-.301017949999999,y:-.01524775000000389},{x:-.7508096499999994,y:-.01524775000000389}],color:"primary",fill:!1},path30:{type:"path",points:[{x:-.3010179499999994,y:.3480486499999973},{x:-.301017949999999,y:-.2798310500000021}],color:"primary",fill:!1},"path27-3":{type:"path",points:[{x:.7729788499999999,y:.3512451499999969},{x:.32318725000000015,y:.3512451499999969}],color:"primary",fill:!1},"path29-5":{type:"path",points:[{x:-.07279374999999932,y:-.27981925000000274},{x:-.2983350499999995,y:-.27981925000000274}],color:"primary",fill:!1},"path29-5-7":{type:"path",points:[{x:.33114835000000076,y:-.2798404500000018},{x:.10560705000000059,y:-.2798404500000018}],color:"primary",fill:!1},"path29-5-7-6":{type:"path",points:[{x:-.055820049999999455,y:-.1676584500000029},{x:-.055820049999999455,y:-.3931997500000026}],color:"primary",fill:!1},"path29-5-7-6-6":{type:"path",points:[{x:.09396265000000081,y:-.16768285000000382},{x:.09396265000000081,y:-.39322415000000355}],color:"primary",fill:!1},"path29-5-9":{type:"path",points:[{x:-.07296184999999955,y:.3513701499999957},{x:-.2985031499999997,y:.3513701499999957}],color:"primary",fill:!1},"path29-5-7-2":{type:"path",points:[{x:.33098025000000053,y:.35134894999999844},{x:.10543895000000036,y:.35134894999999844}],color:"primary",fill:!1},"path29-5-7-6-0":{type:"path",points:[{x:-.05598814999999968,y:.46353094999999733},{x:-.05598814999999968,y:.23798964999999583}],color:"primary",fill:!1},"path29-5-7-6-6-2":{type:"path",points:[{x:.09379455000000014,y:.4635065499999982},{x:.09379455000000014,y:.23796524999999846}],color:"primary",fill:!1},"path29-5-92":{type:"path",points:[{x:.3315317500000008,y:.12563884999999786},{x:.33153175000000035,y:.3511801499999976}],color:"primary",fill:!1},"path29-5-7-28":{type:"path",points:[{x:.3315105500000004,y:-.2783032500000022},{x:.3315105500000004,y:-.0527619500000025}],color:"primary",fill:!1},"path29-5-7-6-9":{type:"path",points:[{x:.44369255000000063,y:.10866514999999843},{x:.21815125000000046,y:.10866514999999843}],color:"primary",fill:!1},"path29-5-7-6-6-7":{type:"path",points:[{x:.4436681500000006,y:-.04111755000000272},{x:.21812685000000043,y:-.04111755000000272}],color:"primary",fill:!1},"path29-5-7-6-9-2":{type:"path",points:[{x:.44235445000000073,y:.07167004999999627},{x:.21681315000000057,y:.07167004999999627}],color:"primary",fill:!1},"path29-5-7-6-9-2-4":{type:"path",points:[{x:.4429695500000004,y:-.0025598500000008073},{x:.4430214500000007,y:.07134914999999609}],color:"primary",fill:!1},"path29-5-7-6-9-2-4-6":{type:"path",points:[{x:.21634305000000031,y:-.0035468500000046532},{x:.21639495000000064,y:.07036214999999935}],color:"primary",fill:!1},"path29-5-7-6-9-2-9":{type:"path",points:[{x:.4429537500000005,y:-.004130850000002795},{x:.21741245000000076,y:-.004130850000002795}],color:"primary",fill:!1}},refblocks:{left1:{x:-.7666234499999998,y:-.01615045000000137},right1:{x:.7572390499999999,y:-.28185235000000297},right2:{x:.7666234500000004,y:.3493472499999992}},bounds:{width:1.5895637820000001,height:1.0717002999999998,centerX:33306690738754696e-32,centerY:-17763568394002505e-31},circles:{}},{paths:Vbt,bounds:kO,refblocks:ZX,circles:$bt}=Hbt,c3e=Bm({primitives:[...Object.values(Vbt),...Object.values($bt),{type:"text",text:"{REF}",x:.01596175000000022,y:-.5308501500000009,anchor:"middle_top"},{type:"text",text:"{VAL}",x:.013116750000000454,y:.5408501499999989,anchor:"middle_bottom"}],ports:[{...ZX.left1,labels:["1"]},{...ZX.right1,labels:["2"]},{...ZX.right2,labels:["3"]}],size:{width:kO.width,height:kO.height},center:{x:kO.centerX,y:kO.centerY}}),Gbt=Cl(c3e),qbt={paths:{path40:{type:"path",points:[{x:.14458930000000048,y:.04403649999999937},{x:-.11999399999999905,y:-.0882552000000012}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.11999400000000038,y:.1763281999999997},{x:.14458929999999914,y:.04403649999999937}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.11999400000000038,y:-.0882552000000012},{x:-.11999400000000038,y:.17632819999999816}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.1435300000000006,y:.17844679999999968},{x:.14458899999999986,y:-.08825519999999965}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.12219870000000044,y:.04403649999999937},{x:-.5168690000000005,y:.04403649999999937}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.5233800999999991,y:.043951299999999804},{x:.14967199999999892,y:.043951299999999804}],color:"primary",fill:!1},"path43-7":{type:"path",points:[{x:.2075533999999999,y:.17973149999999904},{x:.14341080000000028,y:.17864949999999946}],color:"primary",fill:!1},"path43-7-9":{type:"path",points:[{x:.2093444999999996,y:.1301679},{x:.20797049999999984,y:.17950350000000048}],color:"primary",fill:!1},"path43-7-2":{type:"path",points:[{x:.07978989999999953,y:-.09023340000000024},{x:.14313979999999948,y:-.09001340000000013}],color:"primary",fill:!1},"path43-7-9-3":{type:"path",points:[{x:.07764390000000043,y:-.04104850000000004},{x:.0790179000000002,y:-.09038410000000074}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.0050250999999994495,y:.27384530000000007},bottom1:{type:"text",text:"{VAL}",x:-.00011179999999977319,y:-.27384530000000007}},refblocks:{left1:{x:-.5191471,y:.044920799999999206},right1:{x:.5191470999999999,y:.04389609999999999}},bounds:{minX:-.547305541,maxX:.5473055409999998,minY:-.27384530000000007,maxY:.27384530000000007,width:1.0946110819999997,height:.5476906000000001,centerX:-5551115123125783e-32,centerY:0},circles:{}},u3e=l0(qbt).labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{VAL}","middle_top").changeTextAnchor("{REF}","middle_bottom").build(),QX=Cl(u3e),Ybt=QX.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),Xbt=QX.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");Ybt.anchor="middle_left",Xbt.anchor="middle_right";var Wbt=QX,f3e={paths:{path11:{type:"path",points:[{x:-.49895505000000084,y:.04174485000000061},{x:-.177441850000001,y:.04174485000000061}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.18704774999999918,y:.04961415000000069},{x:.5063384499999999,y:.04961415000000069}],color:"primary",fill:!1},"path12-6":{type:"path",points:[{x:.18219425000000045,y:-.15200134999999904},{x:.1810882500000004,y:.2512156500000011}],color:"primary",fill:!1},"path12-2":{type:"path",points:[{x:.18646324999999986,y:.0047866500000004475},{x:.34602244999999954,y:-.13539324999999924}],color:"primary",fill:!1},"path12-2-9":{type:"path",points:[{x:.3463884499999992,y:-.14077354999999936},{x:.3447284499999994,y:-.3343437499999993}],color:"primary",fill:!1},"path11-0-9":{type:"path",points:[{x:-.17016305000000087,y:.2706752500000007},{x:-.17223005000000047,y:-.15200864999999908},{x:.180362149999999,y:.04760855000000097},{x:-.16624855000000038,y:.27180665000000137}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.22312565000000006,y:.38273545},bottom1:{type:"text",text:"{VAL}",x:.11142554999999987,y:-.38273544999999976}},refblocks:{bottom1:{x:.3445824499999999,y:-.34953845000000006},left1:{x:-.5177904499999998,y:.04089205000000007},right1:{x:.5177904499999997,y:.049757749999999934}},bounds:{minX:-.5459488909999998,maxX:.5459488909999997,minY:-.38273544999999976,maxY:.38273545,width:1.0918977819999993,height:.7654708999999997,centerX:-5551115123125783e-32,centerY:11102230246251565e-32},circles:{}},{paths:ibn,texts:abn,bounds:obn,refblocks:sbn,circles:lbn}=f3e,d3e=l0(f3e).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).labelPort("bottom1",["3"]).changeTextAnchor("{REF}","middle_bottom").build(),p3e=Cl(d3e),Zbt=p3e.primitives.filter(n=>n.type==="text"),h3e=Zbt.find(n=>n.text==="{REF}");h3e.y=0,h3e.anchor="middle_left";var Qbt=p3e,Kbt={paths:{path1:{type:"path",points:[{x:-.3543583500000005,y:.03204385000000087},{x:-.12792935000000005,y:.03204385000000087}],color:"primary",fill:!1},"path-1-3":{type:"path",points:[{x:-.0733669500000003,y:.0261987500000005},{x:.10908324999999996,y:-.029100155000000048}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.1043477500000003,y:-.0645130499999993},{x:.34508875000000017,y:-.0645130499999993}],color:"primary",fill:!1},path3:{type:"path",points:[{x:.12008575000000055,y:.17214665000000062},{x:.3608267500000004,y:.17214665000000062}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.3716265000000006},bottom1:{type:"text",text:"{VAL}",x:0,y:-.3716264999999984}},refblocks:{left1:{x:-.3682737499999995,y:.03204385000000021},right1:{x:.3682737499999995,y:-.06451304999999996},right2:{x:.3682737499999995,y:.17214665000000062}},bounds:{minX:-.3964321909999995,maxX:.3964321909999995,minY:-.39716264999999984,maxY:.39716265000000006,width:.792864381999999,height:.7943252999999999,centerX:0,centerY:11102230246251565e-32},circles:{"circle-3":{type:"circle",x:.08200307499999998,y:-.06518,radius:.023193523,color:"primary",fill:!1},"circle-1":{type:"circle",x:-.09900307499999998,y:.02848,radius:.023193523,color:"primary",fill:!1},"circle-2":{type:"circle",x:.08200307499999998,y:.172848,radius:.023193523,color:"primary",fill:!1}}},IO=l0(Kbt).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right2",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_bottom").build(),KX=Cl(IO,"down"),JX=KX.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),eW=KX.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");JX.anchor="middle_bottom",eW.anchor="middle_top",JX.x=.44,JX.y+=.28,eW.y-=.28,eW.x=.44;var Jbt=KX,tW=Cl(IO,"left"),nW=tW.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),rW=tW.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");nW.anchor="middle_bottom",rW.anchor="middle_top",nW.x=0,nW.y+=.625,rW.y-=.695,rW.x=0;var e3t=tW,iW=Cl(IO,"up"),aW=iW.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),oW=iW.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");aW.anchor="middle_bottom",oW.anchor="middle_top",aW.x=.4,aW.y+=.28,oW.y-=.28,oW.x=.4;var t3t=iW,m3e={paths:{path1:{type:"path",points:[{x:-.3543583500000005,y:.03204385000000087},{x:-.12792935000000005,y:.03204385000000087}],color:"primary",fill:!1},"path-1-3":{type:"path",points:[{x:-.1133669500000003,y:.0321987500000005},{x:.11208324999999997,y:.14600155000000048}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.1043477500000003,y:-.0645130499999993},{x:.34508875000000017,y:-.0645130499999993}],color:"primary",fill:!1},path3:{type:"path",points:[{x:.12008575000000055,y:.17214665000000062},{x:.3608267500000004,y:.17214665000000062}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.17853294999999947,y:.39716265000000006},bottom1:{type:"text",text:"{VAL}",x:-.011861250000000378,y:-.39716264999999984}},refblocks:{left1:{x:-.3682737499999995,y:.03204385000000021},right1:{x:.3682737499999995,y:-.06451304999999996},right2:{x:.3682737499999995,y:.17214665000000062}},bounds:{width:.792864381999999,height:.7943252999999999,centerX:0,centerY:11102230246251565e-32},circles:{}};m3e.bounds.width+=.2;var{paths:n3t,texts:v3e,bounds:FO,refblocks:sW,circles:r3t}=m3e,y3e=Bm({primitives:[...Object.values(n3t),...Object.values(r3t),{...v3e.top1,anchor:"middle_bottom",x:-.01},{...v3e.bottom1,anchor:"middle_top",x:-.01}],ports:[{...sW.left1,labels:["1"]},{...sW.right1,labels:["3"]},{...sW.right2,labels:["2"]}],size:{width:FO.width,height:FO.height},center:{x:FO.centerX,y:FO.centerY}}),g3e=Cl(y3e),_3e=g3e.primitives.filter(n=>n.type==="text"),lW=_3e.find(n=>n.text==="{VAL}");lW.anchor="middle_right",lW.x=-.3,lW.y=0;var cW=_3e.find(n=>n.text==="{REF}");cW.anchor="middle_left",cW.x=.3,cW.y=0;var i3t=g3e,BO={paths:{path11:{type:"path",points:[{x:-.3622273500000006,y:-.0018583499999986763},{x:-.13579835000000018,y:-.0018583499999986763}],color:"primary",fill:!1},"path11-0":{type:"path",points:[{x:-.07410005000000046,y:-.0003888499999992217},{x:.11030783499999999,y:.04830055000000119}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.12795584999999932,y:-.0018583499999986763},{x:.3686967499999996,y:-.0018583499999986763}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.31026835},bottom1:{type:"text",text:"{VAL}",x:0,y:-.28026835000000005}},refblocks:{left1:{x:-.12356015000000009,y:-.006648049999999239},left2:{x:-.37614274999999964,y:-.002711249999999721},right1:{x:.11531695000000042,y:-.006648049999999239},right2:{x:.37614274999999964,y:-.0017148499999992683}},bounds:{minX:-.4043011909999996,maxX:.4043011909999996,minY:-.25026835000000003,maxY:.25026835000000003,width:.8086023819999992,height:.5005367000000001,centerX:0,centerY:0},circles:{"circle-2":{type:"circle",x:.09900307499999998,y:.00148,radius:.023193523,color:"primary",fill:!1},"circle-1":{type:"circle",x:-.09900307499999998,y:.00148,radius:.023193523,color:"primary",fill:!1}}};delete BO.refblocks.left1,delete BO.refblocks.right1,BO.bounds.width+=.2;var jO=l0(BO).changeTextAnchor("{VAL}","middle_top").labelPort("left2",["1"]).labelPort("right2",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),uW=Cl(jO,"down"),fW=uW.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),dW=uW.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");fW.anchor="middle_bottom",dW.anchor="middle_top",fW.x=.3,fW.y+=.265,dW.y-=.265,dW.x=.3;var a3t=uW,pW=Cl(jO,"left"),hW=pW.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),mW=pW.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");hW.anchor="middle_bottom",mW.anchor="middle_top",hW.x=0,hW.y+=.57,mW.y-=.57,mW.x=0;var o3t=pW,vW=Cl(jO,"up"),yW=vW.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),gW=vW.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");yW.anchor="middle_bottom",gW.anchor="middle_top",yW.x=.3,yW.y+=.265,gW.y-=.265,gW.x=.3;var s3t=vW,HO={paths:{path11:{type:"path",points:[{x:-.3622273500000006,y:-.0018583499999986763},{x:-.13579835000000018,y:-.0018583499999986763}],color:"primary",fill:!1},"path11-0":{type:"path",points:[{x:-.12010005000000046,y:-.0033888499999992217},{x:.10307834999999987,y:.13630055000000119}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.12795584999999932,y:-.0018583499999986763},{x:.3686967499999996,y:-.0018583499999986763}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.03688484999999986,y:.25026835000000003},bottom1:{type:"text",text:"{VAL}",x:-.02235315000000071,y:-.25026835000000003}},refblocks:{left1:{x:-.12356015000000009,y:-.006648049999999239},left2:{x:-.37614274999999964,y:-.002711249999999721},right1:{x:.11531695000000042,y:-.006648049999999239},right2:{x:.37614274999999964,y:-.0017148499999992683}},bounds:{minX:-.4043011909999996,maxX:.4043011909999996,minY:-.25026835000000003,maxY:.25026835000000003,width:.8086023819999992,height:.5005367000000001,centerX:0,centerY:0},circles:{}};delete HO.refblocks.left1,delete HO.refblocks.right1,HO.bounds.width+=.2;var x3e=l0(HO).changeTextAnchor("{VAL}","middle_top").labelPort("left2",["1"]).labelPort("right2",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),b3e=Cl(x3e),S3e=b3e.primitives.filter(n=>n.type==="text"),_W=S3e.find(n=>n.text==="{VAL}");_W.anchor="middle_right",_W.x=-.3,_W.y=0;var xW=S3e.find(n=>n.text==="{REF}");xW.anchor="middle_left",xW.x=.3,xW.y=0;var l3t=b3e,w3e={paths:{path40:{type:"path",points:[{x:.14458890000000002,y:.04403629999999836},{x:-.1199943999999995,y:-.08825540000000132}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.1199943999999995,y:.1763280000000016},{x:.14458890000000002,y:.04403629999999836}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.1199943999999995,y:-.08825539999999776},{x:-.1199943999999995,y:.1763280000000016}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.14458890000000002,y:.1763280000000016},{x:.14458890000000002,y:-.08825539999999776}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.12219909999999956,y:.04403629999999836},{x:-.5168693999999996,y:.04403629999999836}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.5233797,y:.04395110000000102},{x:.14967160000000002,y:.04395110000000102}],color:"primary",fill:!1},"path43-5":{type:"path",points:[{x:.19156529999999972,y:-.0884020999999997},{x:.14591529999999908,y:-.08876210000000029}],color:"primary",fill:!1},"path43-5-2":{type:"path",points:[{x:.19233440000000046,y:-.1355493999999986},{x:.19197439999999988,y:-.08989940000000018}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.0050250999999996715,y:.27384529999999785},bottom1:{type:"text",text:"{VAL}",x:-.00011179999999999524,y:-.2738453000000014}},refblocks:{left1:{x:-.5191471000000001,y:.0449206999999987},right1:{x:.5191471000000001,y:.043896100000001326}},bounds:{minX:-.5473055410000001,maxX:.5473055410000001,minY:-.2738453000000014,maxY:.27384529999999785,width:1.0946110820000001,height:.5476905999999993,centerX:0,centerY:-17763568394002505e-31},circles:{}},{paths:cbn,texts:ubn,bounds:fbn,refblocks:dbn,circles:pbn}=w3e,E3e=l0(w3e).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),c3t=Cl(E3e),u3t={paths:{path11:{type:"path",points:[{x:-.5307178,y:0},{x:-.3042887999999997,y:0}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.2899773000000003,y:0},{x:.5307178000000001,y:0}],color:"primary",fill:!1}},texts:{left1:{type:"text",text:"RPM",x:0,y:-.025}},refblocks:{left1:{x:-.5446330999999993,y:.000852800000000542},right1:{x:.5381638000000004,y:-.00014359999999924433}},bounds:{width:1.0614356000000003,height:1,centerX:5551115123125783e-32,centerY:0},circles:{path1:{type:"circle",x:-.006997299999999651,y:-.007128299999999532,radius:.28854213,color:"primary",fill:!1}}},{paths:f3t,texts:d3t,bounds:VO,refblocks:T3e,circles:p3t}=u3t,bW=Bm({primitives:[...Object.values(f3t),...Object.values(p3t),{type:"text",text:"{REF}",x:0,y:-.3594553499999995,anchor:"middle_top"},{type:"text",text:"{VAL}",x:0,y:.35,anchor:"middle_bottom"},{...d3t.left1,y:.01,anchor:"center",fontSize:.2}],ports:[{...T3e.left1,labels:["1"]},{...T3e.right1,labels:["2"]}],size:{width:VO.width,height:VO.height},center:{x:VO.centerX,y:VO.centerY}}),{5:h3t,...m3t}=bW.primitives;function v3t(n){return typeof n=="object"}var M3e=Cl({...bW,primitives:Object.values(m3t).filter(v3t)}),y3t={...M3e,primitives:[...M3e.primitives,h3t]},C3e={paths:{path11:{type:"path",points:[{x:-.5176700499999997,y:.041745050000000505},{x:-.10888805000000024,y:.041745050000000505}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.1031184499999993,y:.041745050000000505},{x:.5246894499999994,y:.041745050000000505}],color:"primary",fill:!1},"path11-0":{type:"path",points:[{x:-.09343985000000021,y:-.14620634999999882},{x:-.0930998500000002,y:.2583405500000009}],color:"primary",fill:!1},"path11-0-3":{type:"path",points:[{x:.08519034999999908,y:-.14503384999999902},{x:.08553034999999909,y:.2595130500000007}],color:"primary",fill:!1},"path11-0-9":{type:"path",points:[{x:-.08315755000000014,y:.055934450000000524},{x:-.08415755000000047,y:-.14678124999999964},{x:.08653524999999984,y:-.05104664999999953},{x:-.08126175000000035,y:.05647715000000031}],color:"primary",fill:!0},"path11-0-9-0":{type:"path",points:[{x:.07661224999999927,y:.256654450000001},{x:.07761224999999983,y:.05393885000000109},{x:-.0930805500000007,y:.1496734500000012},{x:.07471644999999949,y:.25719715000000143}],color:"primary",fill:!0},"path12-2":{type:"path",points:[{x:.09001085000000009,y:-.05964874999999914},{x:.2707999499999998,y:-.1711147499999992}],color:"primary",fill:!1},"path12-2-9":{type:"path",points:[{x:.27291134999999955,y:-.17591894999999935},{x:.27124034999999935,y:-.30168314999999923}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:.0077081499999991365,y:.41683614999999996},bottom1:{type:"text",text:"{VAL}",x:-.03022294999999975,y:-.41683614999999996}},refblocks:{bottom1:{x:.27223905000000026,y:-.3087962499999999},left1:{x:-.54139845,y:.04089205000000051},right1:{x:.5413984499999995,y:.04188845000000008}},bounds:{minX:-.569556891,maxX:.5695568909999995,minY:-.41683614999999996,maxY:.41683614999999996,width:1.1391137819999995,height:.8336722999999999,centerX:-2220446049250313e-31,centerY:0},circles:{path1:{type:"circle",x:-.0037626500000003116,y:.048873150000000365,radius:.28854213,color:"primary",fill:!1}}},{paths:hbn,texts:mbn,bounds:vbn,refblocks:ybn,circles:gbn}=C3e,R3e=l0(C3e).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).labelPort("bottom1",["3"]).changeTextAnchor("{REF}","middle_bottom").build(),A3e=Cl(R3e),P3e=A3e.primitives.filter(n=>n.type==="text"),g3t=P3e.find(n=>n.text==="{REF}"),_3t=P3e.find(n=>n.text==="{VAL}");g3t.y=0,_3t.y=0;var x3t=A3e,b3t={paths:{path40:{type:"path",points:[{x:.14458890000000002,y:.04403629999999992},{x:-.1199943999999995,y:-.08825540000000043}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.1199943999999995,y:.17632800000000026},{x:.14458890000000002,y:.04403629999999992}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.1199943999999995,y:-.0882553999999991},{x:-.1199943999999995,y:.17632800000000026}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.14458890000000002,y:.17632800000000026},{x:.14458890000000002,y:-.0882553999999991}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.12219909999999956,y:.04403629999999992},{x:-.5168693999999996,y:.04403629999999992}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.5233797000000002,y:.043951100000000354},{x:.1496715999999998,y:.043951100000000354}],color:"primary",fill:!1},"path43-8":{type:"path",points:[{x:.14339119999999994,y:.17681090000000044},{x:.07728679999999954,y:.17632089999999967}],color:"primary",fill:!1},"path43-8-8":{type:"path",points:[{x:.1446069000000001,y:-.08908179999999888},{x:.0785024999999997,y:-.08957179999999942}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.0050250999999996715,y:.27384530000000007},bottom1:{type:"text",text:"{VAL}",x:-.00011179999999977319,y:-.27384529999999985}},refblocks:{left1:{x:-.5191471000000001,y:.044920700000000924},right1:{x:.5191470999999999,y:.04389609999999999}},bounds:{width:1.094611082,height:.5476905999999999,centerX:-11102230246251565e-32,centerY:11102230246251565e-32},circles:{}},{paths:S3t,texts:N3e,bounds:$O,refblocks:D3e,circles:w3t}=b3t,L3e=Bm({primitives:[...Object.values(S3t),...Object.values(w3t),{...N3e.top1,anchor:"middle_bottom"},{...N3e.bottom1,anchor:"middle_top"}],ports:[{...D3e.left1,labels:["1"]},{...D3e.right1,labels:["2"]}],size:{width:$O.width,height:$O.height},center:{x:$O.centerX,y:$O.centerY}}),SW=Cl(L3e),E3t=SW.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),T3t=SW.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");E3t.anchor="middle_left",T3t.anchor="middle_right";var M3t=SW,C3t={paths:{path11:{type:"path",points:[{x:-.3274461945,y:.20527883627037657},{x:-.021085194500000348,y:.007570136270376837}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.2331163055000003,y:.1251673362703769},{x:.2320633055000001,y:.3759855362703768}],color:"primary",fill:!1},"path12-2":{type:"path",points:[{x:.23221610549999938,y:-.0818845637296235},{x:.2311631054999992,y:-.33270276372962315}],color:"primary",fill:!1},"path11-0":{type:"path",points:[{x:-.013263894499999873,y:-.1792007637296229},{x:-.012923894499999866,y:.2253461362703768}],color:"primary",fill:!1},"path11-0-3":{type:"path",points:[{x:.23222970550000066,y:.12047013627037662},{x:-.011307094499999115,y:.11996013627037683}],color:"primary",fill:!1},"path11-0-9":{type:"path",points:[{x:-.1124341944999998,y:.131359936270377},{x:-.16993279449999954,y:.039004036270377185},{x:-.05822649449999928,y:.03212003627037707},{x:-.11133889449999979,y:.13104553627037707}],color:"primary",fill:!0},"path11-0-3-8":{type:"path",points:[{x:.23230320549999983,y:-.08329316372962325},{x:-.011233594499999944,y:-.07900616372962332}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.19541139450000045,y:.389088136270376},bottom1:{type:"text",text:"{VAL}",x:-.031363394499999364,y:-.42359956372962415}},refblocks:{top1:{x:.2317438004035266,y:.3954411227296242},bottom1:{x:.2308431668082036,y:-.35215823360635445},left1:{x:-.34055979449999985,y:.21512343627037622}},bounds:{width:.7374364709999996,height:.8471991274592483,centerX:27755575615628914e-33,centerY:0},circles:{path1:{type:"circle",x:.08017610549999987,y:.006746336270376352,radius:.28854213,color:"primary",fill:!1}}},{paths:R3t,texts:O3e,bounds:GO,refblocks:wW,circles:A3t}=C3t,z3e=Bm({primitives:[...Object.values(R3t),...Object.values(A3t),{...O3e.top1,anchor:"middle_left"},{...O3e.bottom1,anchor:"middle_right"}],ports:[{...wW.top1,labels:["1"]},{...wW.bottom1,labels:["2"]},{...wW.left1,labels:["3"]}],size:{width:GO.width,height:GO.height},center:{x:GO.centerX,y:GO.centerY}}),U3e=Cl(z3e),k3e=U3e.primitives.filter(n=>n.type==="text"),P3t=k3e.find(n=>n.text==="{REF}");P3t.y=.1;var I3e=k3e.find(n=>n.text==="{VAL}");I3e.y=.1,I3e.x=-.4;var N3t=U3e,D3t={paths:{path11:{type:"path",points:[{x:-.5307178,y:0},{x:-.3042887999999997,y:0}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.2899773000000003,y:0},{x:.5307178000000001,y:0}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.17652089999999898,y:-.36197569999999946},bottom1:{type:"text",text:"{VAL}",x:-.009849199999999891,y:.43234960000000044},left1:{type:"text",text:"Var",x:-.19436529999999896,y:.07249430000000023}},refblocks:{left1:{x:-.5446330999999993,y:.000852800000000542},right1:{x:.5381638000000004,y:-.00014359999999924433}},bounds:{width:1.0614356000000003,height:1,centerX:5551115123125783e-32,centerY:0},circles:{path1:{type:"circle",x:-.006997299999999651,y:-.007128299999999532,radius:.28854213,color:"primary",fill:!1}}},{paths:L3t,texts:EW,bounds:qO,refblocks:F3e,circles:O3t}=D3t,B3e=Bm({primitives:[...Object.values(L3t),...Object.values(O3t),{...EW.top1,x:0,y:-.3594553499999995,anchor:"middle_top"},{...EW.bottom1,x:0,y:.35,anchor:"middle_bottom"},{...EW.left1,x:-.02,y:.01,fontSize:.2,anchor:"center"}],ports:[{...F3e.left1,labels:["1"]},{...F3e.right1,labels:["2"]}],size:{width:qO.width,height:qO.height},center:{x:qO.centerX,y:qO.centerY}}),z3t=Cl(B3e),U3t={paths:{path40:{type:"path",points:[{x:.08342510000000014,y:.04403649999999937},{x:-.18115819999999938,y:-.0882552000000012}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.1811582000000007,y:.1763281999999997},{x:.08342509999999881,y:.04403649999999937}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.1811582000000007,y:-.0882552000000012},{x:-.1811582000000007,y:.17632819999999816}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.0949504999999995,y:.17485119999999976},{x:.09600949999999897,y:-.09185079999999957}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.1954338999999996,y:.04403649999999937},{x:-.5191807000000004,y:.04403649999999937}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.5253116,y:.043951299999999804},{x:.20527070000000047,y:.043951299999999804}],color:"primary",fill:!1},"path43-6":{type:"path",points:[{x:.1854899999999995,y:.1748848999999999},{x:.18654899999999874,y:-.09181709999999943}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.0050250999999994495,y:.27384530000000007},bottom1:{type:"text",text:"{VAL}",x:-.00011179999999977319,y:-.27384530000000007}},refblocks:{left1:{x:-.5191471,y:.044920799999999206},right1:{x:.5191470999999999,y:.04389609999999999}},bounds:{width:1.0946110819999997,height:.5476906000000001,centerX:-5551115123125783e-32,centerY:0},circles:{}},{paths:k3t,texts:j3e,bounds:YO,refblocks:H3e,circles:I3t}=U3t,V3e=Bm({primitives:[...Object.values(k3t),...Object.values(I3t),{...j3e.top1,anchor:"middle_bottom"},{...j3e.bottom1,anchor:"middle_top"}],ports:[{...H3e.left1,labels:["1"]},{...H3e.right1,labels:["2"]}],size:{width:YO.width,height:YO.height},center:{x:YO.centerX,y:YO.centerY}}),TW=Cl(V3e),F3t=TW.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),B3t=TW.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");F3t.anchor="middle_left",B3t.anchor="middle_right";var j3t=TW,H3t={paths:{path5:{type:"path",points:[{x:-.5245830500000004,y:.004659100000001359},{x:-.25999975000000086,y:.004659100000001359}],color:"primary",fill:!1},path6:{type:"path",points:[{x:.2691672500000002,y:.004659100000001359},{x:.5337505499999997,y:.004659100000001359}],color:"primary",fill:!1},path7:{type:"path",points:[{x:.2691672500000002,y:-.23346590000000056},{x:-.25999974999999953,y:.2427841000000015}],color:"primary",fill:!1},path8:{type:"path",points:[{x:.37500025000000026,y:-.23346590000000056},{x:.2691672500000002,y:-.23346590000000056}],color:"primary",fill:!1},path9:{type:"path",points:[{x:.004585150000000482,y:.13695090000000043},{x:.26916815000000094,y:.13695090000000043},{x:.26916815000000094,y:-.1276325000000007},{x:-.2599988499999988,y:-.1276325000000007},{x:-.2599988499999988,y:.13695090000000043},{x:.004585150000001814,y:.13695090000000043}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.05849044999999986,y:.25166549999999965},bottom1:{type:"text",text:"{VAL}",x:.008507150000000685,y:-.25166549999999965}},refblocks:{left1:{x:-.5392315500000002,y:.002969399999999567},right1:{x:.5392315500000002,y:.005339799999999784}},bounds:{width:1.1347799820000004,height:.5033309999999993,centerX:0,centerY:0}},{paths:V3t,texts:$3e,bounds:XO,refblocks:G3e}=H3t,q3e=Bm({primitives:[...Object.values(V3t),{...$3e.top1,anchor:"middle_left"},{...$3e.bottom1,anchor:"middle_right"}],ports:[{...G3e.left1,labels:["1","-"]},{...G3e.right1,labels:["2","+"]}],size:{width:XO.width,height:XO.height},center:{x:XO.centerX,y:XO.centerY}}),$3t=Cl(q3e),G3t={paths:{path11:{type:"path",points:[{x:-.5307178,y:0},{x:-.3042887999999997,y:0}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.2899773000000003,y:0},{x:.5307178000000001,y:0}],color:"primary",fill:!1}},texts:{left1:{type:"text",text:"Var",x:0,y:-.025}},refblocks:{left1:{x:-.5446330999999993,y:.000852800000000542},right1:{x:.5381638000000004,y:-.00014359999999924433}},bounds:{width:1.0614356000000003,height:1,centerX:5551115123125783e-32,centerY:0},circles:{path1:{type:"circle",x:-.006997299999999651,y:-.007128299999999532,radius:.28854213,color:"primary",fill:!1}}},{paths:q3t,texts:Y3t,bounds:WO,refblocks:Y3e,circles:X3t}=G3t,MW=Bm({primitives:[...Object.values(q3t),...Object.values(X3t),{type:"text",text:"{REF}",x:0,y:-.3594553499999995,anchor:"middle_top"},{type:"text",text:"{VAL}",x:0,y:.35,anchor:"middle_bottom"},{...Y3t.left1,anchor:"center",y:.02,fontSize:.2}],ports:[{...Y3e.left1,labels:["1"]},{...Y3e.right1,labels:["2"]}],size:{width:WO.width,height:WO.height},center:{x:WO.centerX,y:WO.centerY}}),{5:W3t,...Z3t}=MW.primitives;function Q3t(n){return typeof n=="object"}var X3e=Cl({...MW,primitives:Object.values(Z3t).filter(Q3t)}),K3t={...X3e,primitives:[...X3e.primitives,W3t]},W3e={paths:{path11:{type:"path",points:[{x:-.5274831500000005,y:.031252300000000455},{x:-.30105415000000013,y:.031252300000000455}],color:"primary",fill:!1},"path11-5-5":{type:"path",points:[{x:.09765764999999949,y:.1295162000000003},{x:-.0011297500000011507,y:-.061970899999999496},{x:-.10778645000000164,y:.1295162000000003}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.2932119499999999,y:.031252300000000455},{x:.5339524499999997,y:.031252300000000455}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.021146249999999478,y:.4010973},bottom1:{type:"text",text:"{VAL}",x:-.00661455000000033,y:-.4010973}},refblocks:{left1:{x:-.5413984499999998,y:.030399499999999913},right1:{x:.54139845,y:.0313958999999997}},bounds:{minX:-.5695568909999997,maxX:.569556891,minY:-.4010973,maxY:.4010973,width:1.1391137819999997,height:.8021946,centerX:11102230246251565e-32,centerY:0},circles:{path1:{type:"circle",x:-.0037626500000000895,y:.03838059999999999,radius:.28854213,color:"primary",fill:!1}}},{paths:_bn,texts:xbn,bounds:bbn,circles:Sbn,refblocks:wbn}=W3e,Z3e=l0(W3e).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),J3t=Cl(Z3e),e4t={paths:{path11:{type:"path",points:[{x:-.5307178,y:0},{x:-.3042887999999997,y:0}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.2899773000000003,y:0},{x:.5307178000000001,y:0}],color:"primary",fill:!1}},texts:{left1:{type:"text",text:"Wh",x:0,y:-.025}},refblocks:{left1:{x:-.5446330999999993,y:.000852800000000542},right1:{x:.5381638000000004,y:-.00014359999999924433}},bounds:{width:1.0614356000000003,height:1,centerX:5551115123125783e-32,centerY:0},circles:{path1:{type:"circle",x:-.006997299999999651,y:-.007128299999999532,radius:.28854213,color:"primary",fill:!1}}},{paths:t4t,texts:n4t,bounds:ZO,refblocks:Q3e,circles:r4t}=e4t,CW=Bm({primitives:[...Object.values(t4t),...Object.values(r4t),{type:"text",text:"{REF}",x:0,y:-.3594553499999995,anchor:"middle_top"},{type:"text",text:"{VAL}",x:0,y:.35,anchor:"middle_bottom"},{...n4t.left1,anchor:"center",y:.01,fontSize:.2}],ports:[{...Q3e.left1,labels:["1"]},{...Q3e.right1,labels:["2"]}],size:{width:ZO.width,height:ZO.height},center:{x:ZO.centerX,y:ZO.centerY}}),{5:i4t,...a4t}=CW.primitives;function o4t(n){return typeof n=="object"}var K3e=Cl({...CW,primitives:Object.values(a4t).filter(o4t)}),s4t={...K3e,primitives:[...K3e.primitives,i4t]},l4t={paths:{path11:{type:"path",points:[{x:-.5307178,y:0},{x:-.3042887999999997,y:0}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.2899773000000003,y:0},{x:.5307178000000001,y:0}],color:"primary",fill:!1}},texts:{left1:{type:"text",text:"W",x:0,y:-.025}},refblocks:{left1:{x:-.5446330999999993,y:.000852800000000542},right1:{x:.5381638000000004,y:-.00014359999999924433}},bounds:{width:1.0614356000000003,height:1,centerX:5551115123125783e-32,centerY:0},circles:{path1:{type:"circle",x:-.006997299999999651,y:-.007128299999999532,radius:.28854213,color:"primary",fill:!1}}},{paths:c4t,texts:u4t,bounds:QO,refblocks:J3e,circles:f4t}=l4t,RW=Bm({primitives:[...Object.values(c4t),...Object.values(f4t),{type:"text",text:"{REF}",x:0,y:-.3594553499999995,anchor:"middle_top"},{type:"text",text:"{VAL}",x:0,y:.35,anchor:"middle_bottom"},{...u4t.left1,anchor:"center",y:.01,fontSize:.3}],ports:[{...J3e.left1,labels:["1"]},{...J3e.right1,labels:["2"]}],size:{width:QO.width,height:QO.height},center:{x:QO.centerX,y:QO.centerY}}),{5:d4t,...p4t}=RW.primitives;function h4t(n){return typeof n=="object"}var e4e=Cl({...RW,primitives:Object.values(p4t).filter(h4t)}),m4t={...e4e,primitives:[...e4e.primitives,d4t]},v4t={paths:{path40:{type:"path",points:[{x:.14458890000000002,y:.04403629999999992},{x:-.1199943999999995,y:-.08825540000000043}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.1199943999999995,y:.17632800000000026},{x:.14458890000000002,y:.04403629999999992}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.1199943999999995,y:-.0882553999999991},{x:-.1199943999999995,y:.17632800000000026}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.14458890000000002,y:.17632800000000026},{x:.14458890000000002,y:-.0882553999999991}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.12219909999999956,y:.04403629999999992},{x:-.5168693999999996,y:.04403629999999992}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.5233797000000002,y:.043951100000000354},{x:.1496715999999998,y:.043951100000000354}],color:"primary",fill:!1},"path43-8":{type:"path",points:[{x:.14339119999999994,y:.17681090000000044},{x:.07728679999999954,y:.17632089999999967}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.0050250999999996715,y:.27384530000000007},bottom1:{type:"text",text:"{VAL}",x:-.00011179999999977319,y:-.27384529999999985}},refblocks:{left1:{x:-.5191471000000001,y:.044920700000000924},right1:{x:.5191470999999999,y:.04389609999999999}},bounds:{width:1.094611082,height:.5476905999999999,centerX:-11102230246251565e-32,centerY:11102230246251565e-32},circles:{}},{paths:y4t,texts:t4e,bounds:KO,refblocks:n4e,circles:g4t}=v4t,r4e=Bm({primitives:[...Object.values(y4t),...Object.values(g4t),{...t4e.top1,anchor:"middle_bottom"},{...t4e.bottom1,anchor:"middle_top"}],ports:[{...n4e.left1,labels:["1"]},{...n4e.right1,labels:["2"]}],size:{width:KO.width,height:KO.height},center:{x:KO.centerX,y:KO.centerY}}),AW=Cl(r4e),_4t=AW.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),x4t=AW.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");_4t.anchor="middle_left",x4t.anchor="middle_right";var b4t=AW,z3={ac_voltmeter_horz:s5e,ac_voltmeter_vert:j_t,avalanche_diode_horz:u5e,avalanche_diode_vert:q_t,battery_horz:p5e,battery_vert:Z_t,boxresistor_down:ext,boxresistor_left:rxt,boxresistor_right:oxt,boxresistor_up:cxt,capacitor_down:dxt,capacitor_left:pxt,capacitor_polarized_down:vxt,capacitor_polarized_left:yxt,capacitor_polarized_right:E5e,capacitor_polarized_up:xxt,capacitor_right:bxt,capacitor_up:Ext,constant_current_diode_horz:Txt,constant_current_diode_vert:Mxt,crystal_4pin_horz:R5e,crystal_4pin_vert:Rxt,crystal_horz:Axt,crystal_vert:Pxt,darlington_pair_transistor_horz:Nxt,darlington_pair_transistor_vert:Dxt,dc_ammeter_horz:TY,dc_ammeter_vert:jxt,dc_voltmeter_horz:RY,dc_voltmeter_vert:Wxt,diac_horz:O5e,diac_vert:Jxt,diode_down:t2t,diode_left:n2t,diode_right:oO,diode_up:r2t,dpdt_normally_closed_switch_down:a2t,dpdt_normally_closed_switch_left:o2t,dpdt_normally_closed_switch_right:sO,dpdt_normally_closed_switch_up:s2t,dpdt_switch_down:c2t,dpdt_switch_left:u2t,dpdt_switch_right:lO,dpdt_switch_up:f2t,dpst_normally_closed_switch_down:p2t,dpst_normally_closed_switch_left:h2t,dpst_normally_closed_switch_right:cO,dpst_normally_closed_switch_up:m2t,dpst_switch_down:y2t,dpst_switch_left:g2t,dpst_switch_right:uO,dpst_switch_up:_2t,filled_diode_horz:k5e,filled_diode_vert:b2t,frequency_meter_horz:fX,frequency_meter_vert:A2t,fuse_horz:j5e,fuse_vert:L2t,ground_horz:H5e,ground_vert:F2t,gunn_diode_horz:B2t,gunn_diode_vert:j2t,icled_down:V2t,icled_left:$2t,icled_right:pO,icled_up:q2t,igbt_transistor_horz:V5e,igbt_transistor_vert:X2t,illuminated_push_button_normally_open_horz:G5e,illuminated_push_button_normally_open_vert:Z2t,inductor_down:e5t,inductor_left:t5t,inductor_right:gX,inductor_up:Z5e,laser_diode_horz:K5e,laser_diode_vert:r5t,led_down:s5t,led_left:l5t,led_right:vO,led_up:u5t,light_dependent_resistor_horz:abe,light_dependent_resistor_vert:h5t,mosfet_depletion_normally_on_horz:cbe,mosfet_depletion_normally_on_vert:y5t,mushroom_head_normally_open_momentary_horz:pbe,mushroom_head_normally_open_momentary_vert:b5t,n_channel_d_mosfet_transistor_horz:mbe,n_channel_d_mosfet_transistor_vert:T5t,n_channel_e_mosfet_transistor_horz:_be,n_channel_e_mosfet_transistor_vert:A5t,njfet_transistor_horz:wbe,njfet_transistor_vert:L5t,npn_bipolar_transistor_horz:Mbe,npn_bipolar_transistor_vert:k5t,opamp_no_power_down:F5t,opamp_no_power_left:B5t,opamp_no_power_right:EO,opamp_no_power_up:j5t,opamp_with_power_down:V5t,opamp_with_power_left:$5t,opamp_with_power_right:TO,opamp_with_power_up:G5t,p_channel_d_mosfet_transistor_horz:Rbe,p_channel_d_mosfet_transistor_vert:W5t,p_channel_e_mosfet_transistor_horz:Dbe,p_channel_e_mosfet_transistor_vert:J5t,photodiode_horz:zbe,photodiode_vert:nbt,pjfet_transistor_horz:Fbe,pjfet_transistor_vert:obt,pnp_bipolar_transistor_horz:Vbe,pnp_bipolar_transistor_vert:ubt,potentiometer_horz:qbe,potentiometer_vert:hbt,potentiometer2_horz:Wbe,potentiometer2_vert:_bt,potentiometer3_down:bbt,potentiometer3_left:Sbt,potentiometer3_right:NO,potentiometer3_up:wbt,power_factor_meter_horz:Jbe,power_factor_meter_vert:Cbt,push_button_normally_closed_momentary_horz:r3e,push_button_normally_closed_momentary_vert:Nbt,push_button_normally_open_momentary_horz:o3e,push_button_normally_open_momentary_vert:zbt,rectifier_diode_horz:l3e,rectifier_diode_vert:jbt,resonator_horz:c3e,resonator_vert:Gbt,schottky_diode_horz:u3e,schottky_diode_vert:Wbt,silicon_controlled_rectifier_horz:d3e,silicon_controlled_rectifier_vert:Qbt,spdt_normally_closed_switch_down:Jbt,spdt_normally_closed_switch_left:e3t,spdt_normally_closed_switch_right:IO,spdt_normally_closed_switch_up:t3t,SPDT_switch_horz:y3e,SPDT_switch_vert:i3t,spst_normally_closed_switch_down:a3t,spst_normally_closed_switch_left:o3t,spst_normally_closed_switch_right:jO,spst_normally_closed_switch_up:s3t,SPST_switch_horz:x3e,SPST_switch_vert:l3t,step_recovery_diode_horz:E3e,step_recovery_diode_vert:c3t,tachometer_horz:bW,tachometer_vert:y3t,triac_horz:R3e,triac_vert:x3t,tunnel_diode_horz:L3e,tunnel_diode_vert:M3t,unijunction_transistor_horz:z3e,unijunction_transistor_vert:N3t,var_meter_horz:B3e,var_meter_vert:z3t,varactor_diode_horz:V3e,varactor_diode_vert:j3t,varistor_horz:q3e,varistor_vert:$3t,varmeter_horz:MW,varmeter_vert:K3t,volt_meter_horz:Z3e,volt_meter_vert:J3t,watt_hour_meter_horz:CW,watt_hour_meter_vert:s4t,wattmeter_horz:RW,wattmeter_vert:m4t,zener_diode_horz:r4e,zener_diode_vert:b4t};Object.fromEntries(Object.keys(z3).map(n=>[n,n]));var e2;(function(n){n.Root="root",n.Text="text",n.Directive="directive",n.Comment="comment",n.Script="script",n.Style="style",n.Tag="tag",n.CDATA="cdata",n.Doctype="doctype"})(e2||(e2={}));function S4t(n){return n.type===e2.Tag||n.type===e2.Script||n.type===e2.Style}const w4t=e2.Root,E4t=e2.Text,T4t=e2.Directive,M4t=e2.Comment,C4t=e2.Script,R4t=e2.Style,A4t=e2.Tag,P4t=e2.CDATA,N4t=e2.Doctype;function U3(n){return S4t(n)}function PW(n){return n.type===e2.CDATA}function gE(n){return n.type===e2.Text}function i4e(n){return n.type===e2.Comment}function D4t(n){return n.type===e2.Root}function u4(n){return Object.prototype.hasOwnProperty.call(n,"children")}const a4e=/["&'<>$\x80-\uFFFF]/g,L4t=new Map([[34,"&quot;"],[38,"&amp;"],[39,"&apos;"],[60,"&lt;"],[62,"&gt;"]]),O4t=String.prototype.codePointAt!=null?(n,e)=>n.codePointAt(e):(n,e)=>(n.charCodeAt(e)&64512)===55296?(n.charCodeAt(e)-55296)*1024+n.charCodeAt(e+1)-56320+65536:n.charCodeAt(e);function o4e(n){let e="",t=0,r;for(;(r=a4e.exec(n))!==null;){const i=r.index,a=n.charCodeAt(i),o=L4t.get(a);o!==void 0?(e+=n.substring(t,i)+o,t=i+1):(e+=`${n.substring(t,i)}&#x${O4t(n,i).toString(16)};`,t=a4e.lastIndex+=+((a&64512)===55296))}return e+n.substr(t)}function s4e(n,e){return function(r){let i,a=0,o="";for(;i=n.exec(r);)a!==i.index&&(o+=r.substring(a,i.index)),o+=e.get(i[0].charCodeAt(0)),a=i.index+1;return o+r.substring(a)}}const z4t=s4e(/["&\u00A0]/g,new Map([[34,"&quot;"],[38,"&amp;"],[160,"&nbsp;"]])),U4t=s4e(/[&<>\u00A0]/g,new Map([[38,"&amp;"],[60,"&lt;"],[62,"&gt;"],[160,"&nbsp;"]])),k4t=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(n=>[n.toLowerCase(),n])),I4t=new Map(["definitionURL","attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(n=>[n.toLowerCase(),n])),F4t=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function B4t(n){return n.replace(/"/g,"&quot;")}function j4t(n,e){var t;if(!n)return;const r=((t=e.encodeEntities)!==null&&t!==void 0?t:e.decodeEntities)===!1?B4t:e.xmlMode||e.encodeEntities!=="utf8"?o4e:z4t;return Object.keys(n).map(i=>{var a,o;const s=(a=n[i])!==null&&a!==void 0?a:"";return e.xmlMode==="foreign"&&(i=(o=I4t.get(i))!==null&&o!==void 0?o:i),!e.emptyAttrs&&!e.xmlMode&&s===""?i:`${i}="${r(s)}"`}).join(" ")}const l4e=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function NW(n,e={}){const t="length"in n?n:[n];let r="";for(let i=0;i<t.length;i++)r+=H4t(t[i],e);return r}function H4t(n,e){switch(n.type){case w4t:return NW(n.children,e);case N4t:case T4t:return q4t(n);case M4t:return W4t(n);case P4t:return X4t(n);case C4t:case R4t:case A4t:return G4t(n,e);case E4t:return Y4t(n,e)}}const V4t=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),$4t=new Set(["svg","math"]);function G4t(n,e){var t;e.xmlMode==="foreign"&&(n.name=(t=k4t.get(n.name))!==null&&t!==void 0?t:n.name,n.parent&&V4t.has(n.parent.name)&&(e={...e,xmlMode:!1})),!e.xmlMode&&$4t.has(n.name)&&(e={...e,xmlMode:"foreign"});let r=`<${n.name}`;const i=j4t(n.attribs,e);return i&&(r+=` ${i}`),n.children.length===0&&(e.xmlMode?e.selfClosingTags!==!1:e.selfClosingTags&&l4e.has(n.name))?(e.xmlMode||(r+=" "),r+="/>"):(r+=">",n.children.length>0&&(r+=NW(n.children,e)),(e.xmlMode||!l4e.has(n.name))&&(r+=`</${n.name}>`)),r}function q4t(n){return`<${n.data}>`}function Y4t(n,e){var t;let r=n.data||"";return((t=e.encodeEntities)!==null&&t!==void 0?t:e.decodeEntities)!==!1&&!(!e.xmlMode&&n.parent&&F4t.has(n.parent.name))&&(r=e.xmlMode||e.encodeEntities!=="utf8"?o4e(r):U4t(r)),r}function X4t(n){return`<![CDATA[${n.children[0].data}]]>`}function W4t(n){return`<!--${n.data}-->`}function c4e(n,e){return NW(n,e)}function Z4t(n,e){return u4(n)?n.children.map(t=>c4e(t,e)).join(""):""}function JO(n){return Array.isArray(n)?n.map(JO).join(""):U3(n)?n.name==="br"?`
863
+ `);const M=S.state[s];if(M==null)return;JSON.stringify(i.getState())!==JSON.stringify(M)&&v(M);return}i.dispatchFromDevtools&&typeof i.dispatch=="function"&&i.dispatch(S)});case"DISPATCH":switch(w.payload.type){case"RESET":return v(y),s===void 0?u==null?void 0:u.init(i.getState()):u==null?void 0:u.init(FL(l.name));case"COMMIT":if(s===void 0){u==null||u.init(i.getState());return}return u==null?void 0:u.init(FL(l.name));case"ROLLBACK":return Bq(w.state,S=>{if(s===void 0){v(S),u==null||u.init(i.getState());return}v(S[s]),u==null||u.init(FL(l.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return Bq(w.state,S=>{if(s===void 0){v(S);return}JSON.stringify(i.getState())!==JSON.stringify(S[s])&&v(S[s])});case"IMPORT_STATE":{const{nextLiftedState:S}=w.payload,M=(b=S.computedStates.slice(-1)[0])==null?void 0:b.state;if(!M)return;v(s===void 0?M:M[s]),u==null||u.send(null,S);return}case"PAUSE_RECORDING":return d=!d}return}}),y},Bq=(n,e)=>{let t;try{t=JSON.parse(n)}catch(r){console.error("[zustand devtools middleware] Could not parse the received json",r)}t!==void 0&&e(t)},VS=window.TSCIRCUIT_FILESERVER_API_BASE_URL??"/api",jq=Q_e.extend("store");async function dxe(n,e){return(await(await fetch(`${VS}/files/upsert`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file_path:n,text_content:e})})).json()).file}async function Hq(n){return(await(await fetch(`${VS}/files/get?file_path=${encodeURIComponent(n)}`)).json()).file}async function lgt(n){const e=n?`${VS}/events/list?since=${encodeURIComponent(n)}`:`${VS}/events/list`;return(await(await fetch(e)).json()).event_list}async function cgt(){const n=await fetch(`${VS}/files/list`),{file_list:e}=await n.json(),t=new Map;for(const r of e){const i=await Hq(r.file_path);t.set(r.file_path,i.text_content)}return t}const s4=uxe()(fxe((n,e)=>({fsMap:new Map,lastEventTime:new Date().toISOString(),isPolling:!1,error:null,circuitJson:null,lastManualEditsChangeSentAt:0,recentEvents:[],simulateScenarioOrder:void 0,loadInitialFiles:async()=>{const t=await cgt();jq("loaded initial files",{fsMap:t}),n({fsMap:t})},upsertFile:async(t,r)=>{try{const i=await dxe(t,r);n(a=>({fsMap:new Map(a.fsMap).set(i.file_path,i.text_content)}))}catch(i){n({error:i})}},getFile:async t=>{try{const r=await Hq(t);n(i=>({fsMap:new Map(i.fsMap).set(r.file_path,r.text_content)}))}catch(r){n({error:r})}},setCircuitJson:t=>{t!==e().circuitJson&&n({circuitJson:t})},startPolling:()=>{const t=async()=>{const r=e();if(r.isPolling){try{const i=await lgt(r.lastEventTime);if(i.length>0){n(s=>({recentEvents:[...s.recentEvents,...i].slice(0,100)}));const a=i[i.length-1].created_at,o=new Map(r.fsMap);for(const s of i)if(s.event_type==="FILE_UPDATED"){const l=await Hq(s.file_path);if(s.file_path==="manual_edits.json"&&Date.now()-r.lastManualEditsChangeSentAt<1e3)continue;o.set(l.file_path,l.text_content)}n({fsMap:o,lastEventTime:a})}}catch(i){n({error:i})}setTimeout(t,1e3)}};n({isPolling:!0}),t()},stopPolling:()=>{n({isPolling:!1})},pushEvent:async t=>{await fetch(`${window.TSCIRCUIT_FILESERVER_API_BASE_URL??""}/api/events/create`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})},applyEditEventsAndUpdateManualEditsJson:async t=>{jq("applyEditEventsAndUpdateManualEditsJson",{editEvents:t});const r=e();if(!r.circuitJson)return;const i=r.fsMap.get("manual-edits.json"),a=i?JSON.parse(i):{},o=X_e({circuitJson:r.circuitJson,editEvents:t,manualEditsFile:a});jq("updatedManualEditsFileContent",o),n(s=>({lastManualEditsChangeSentAt:Date.now(),fsMap:new Map(s.fsMap).set("manual-edits.json",JSON.stringify(o))})),await dxe("manual-edits.json",JSON.stringify(o,null,2))},setSimulateScenarioOrder:t=>n({simulateScenarioOrder:t})}),{name:"run-frame-store"})),ugt=Q_e.extend("useEditEventController"),fgt=()=>{const n=s4(v=>v.applyEditEventsAndUpdateManualEditsJson),[e,t]=Qe.useState([]),[r,i]=Qe.useState(!1),a=e.filter(v=>!v._applied),o=e.filter(v=>v._applied),s=r?e:a,l=Qe.useCallback(v=>{t(y=>[...y,{...v,_applied:!1}])},[]),c=Qe.useCallback(v=>{t(y=>y.map(w=>w===v?{...w,_applied:!0}:w))},[]),u=Qe.useCallback(()=>{t(v=>v.map(y=>({...y,_applied:!0})))},[]),f=Qe.useCallback(()=>{i(!0),e.length!==0&&(ugt("removing edit events that are applied"),t(v=>v.filter(y=>!y._applied)))},[e]),d=Qe.useCallback(()=>{i(!1)},[]);return Qe.useEffect(()=>{if(e.filter(y=>!y._applied).length===0)return;const v=setTimeout(()=>{u(),n(e)},1e3);return()=>clearTimeout(v)},[e]),{unappliedEditEvents:a,appliedEditEvents:o,editEventsForRender:s,pushEditEvent:l,markEditEventApplied:c,markRenderStarted:f,markRenderComplete:d,markAllEditEventsApplied:u}};function zu(n,e,{checkForDefaultPrevented:t=!0}={}){return function(i){if(n==null||n(i),t===!1||!i.defaultPrevented)return e==null?void 0:e(i)}}function dgt(n,e){const t=Qe.createContext(e),r=a=>{const{children:o,...s}=a,l=Qe.useMemo(()=>s,Object.values(s));return Fe.jsx(t.Provider,{value:l,children:o})};r.displayName=n+"Provider";function i(a){const o=Qe.useContext(t);if(o)return o;if(e!==void 0)return e;throw new Error(`\`${a}\` must be used within \`${n}\``)}return[r,i]}function l4(n,e=[]){let t=[];function r(a,o){const s=Qe.createContext(o),l=t.length;t=[...t,o];const c=f=>{var S;const{scope:d,children:v,...y}=f,w=((S=d==null?void 0:d[n])==null?void 0:S[l])||s,b=Qe.useMemo(()=>y,Object.values(y));return Fe.jsx(w.Provider,{value:b,children:v})};c.displayName=a+"Provider";function u(f,d){var w;const v=((w=d==null?void 0:d[n])==null?void 0:w[l])||s,y=Qe.useContext(v);if(y)return y;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${a}\``)}return[c,u]}const i=()=>{const a=t.map(o=>Qe.createContext(o));return function(s){const l=(s==null?void 0:s[n])||a;return Qe.useMemo(()=>({[`__scope${n}`]:{...s,[n]:l}}),[s,l])}};return i.scopeName=n,[r,pgt(i,...e)]}function pgt(...n){const e=n[0];if(n.length===1)return e;const t=()=>{const r=n.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=r.reduce((s,{useScope:l,scopeName:c})=>{const f=l(a)[`__scope${c}`];return{...s,...f}},{});return Qe.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return t.scopeName=e.scopeName,t}function pxe(n,e){if(typeof n=="function")return n(e);n!=null&&(n.current=e)}function BL(...n){return e=>{let t=!1;const r=n.map(i=>{const a=pxe(i,e);return!t&&typeof a=="function"&&(t=!0),a});if(t)return()=>{for(let i=0;i<r.length;i++){const a=r[i];typeof a=="function"?a():pxe(n[i],null)}}}}function ly(...n){return Qe.useCallback(BL(...n),n)}function o7(n){const e=mgt(n),t=Qe.forwardRef((r,i)=>{const{children:a,...o}=r,s=Qe.Children.toArray(a),l=s.find(ygt);if(l){const c=l.props.children,u=s.map(f=>f===l?Qe.Children.count(c)>1?Qe.Children.only(null):Qe.isValidElement(c)?c.props.children:null:f);return Fe.jsx(e,{...o,ref:i,children:Qe.isValidElement(c)?Qe.cloneElement(c,void 0,u):null})}return Fe.jsx(e,{...o,ref:i,children:a})});return t.displayName=`${n}.Slot`,t}var hgt=o7("Slot");function mgt(n){const e=Qe.forwardRef((t,r)=>{const{children:i,...a}=t;if(Qe.isValidElement(i)){const o=_gt(i),s=ggt(a,i.props);return i.type!==Qe.Fragment&&(s.ref=r?BL(r,o):o),Qe.cloneElement(i,s)}return Qe.Children.count(i)>1?Qe.Children.only(null):null});return e.displayName=`${n}.SlotClone`,e}var hxe=Symbol("radix.slottable");function vgt(n){const e=({children:t})=>Fe.jsx(Fe.Fragment,{children:t});return e.displayName=`${n}.Slottable`,e.__radixId=hxe,e}function ygt(n){return Qe.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===hxe}function ggt(n,e){const t={...e};for(const r in e){const i=n[r],a=e[r];/^on[A-Z]/.test(r)?i&&a?t[r]=(...s)=>{a(...s),i(...s)}:i&&(t[r]=i):r==="style"?t[r]={...i,...a}:r==="className"&&(t[r]=[i,a].filter(Boolean).join(" "))}return{...n,...t}}function _gt(n){var r,i;let e=(r=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:r.get,t=e&&"isReactWarning"in e&&e.isReactWarning;return t?n.ref:(e=(i=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:i.get,t=e&&"isReactWarning"in e&&e.isReactWarning,t?n.props.ref:n.props.ref||n.ref)}function Vq(n){const e=n+"CollectionProvider",[t,r]=l4(e),[i,a]=t(e,{collectionRef:{current:null},itemMap:new Map}),o=w=>{const{scope:b,children:S}=w,M=gf.useRef(null),N=gf.useRef(new Map).current;return Fe.jsx(i,{scope:b,itemMap:N,collectionRef:M,children:S})};o.displayName=e;const s=n+"CollectionSlot",l=o7(s),c=gf.forwardRef((w,b)=>{const{scope:S,children:M}=w,N=a(s,S),k=ly(b,N.collectionRef);return Fe.jsx(l,{ref:k,children:M})});c.displayName=s;const u=n+"CollectionItemSlot",f="data-radix-collection-item",d=o7(u),v=gf.forwardRef((w,b)=>{const{scope:S,children:M,...N}=w,k=gf.useRef(null),G=ly(b,k),q=a(u,S);return gf.useEffect(()=>(q.itemMap.set(k,{ref:k,...N}),()=>void q.itemMap.delete(k))),Fe.jsx(d,{[f]:"",ref:G,children:M})});v.displayName=u;function y(w){const b=a(n+"CollectionConsumer",w);return gf.useCallback(()=>{const M=b.collectionRef.current;if(!M)return[];const N=Array.from(M.querySelectorAll(`[${f}]`));return Array.from(b.itemMap.values()).sort((q,X)=>N.indexOf(q.ref.current)-N.indexOf(X.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:o,Slot:c,ItemSlot:v},y,r]}var hb=globalThis!=null&&globalThis.document?Qe.useLayoutEffect:()=>{},xgt=Grt[" useId ".trim().toString()]||(()=>{}),bgt=0;function O3(n){const[e,t]=Qe.useState(xgt());return hb(()=>{t(r=>r??String(bgt++))},[n]),e?`radix-${e}`:""}var xC=Ahe();const mxe=n_(xC);var Sgt=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],kh=Sgt.reduce((n,e)=>{const t=o7(`Primitive.${e}`),r=Qe.forwardRef((i,a)=>{const{asChild:o,...s}=i,l=o?t:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),Fe.jsx(l,{...s,ref:a})});return r.displayName=`Primitive.${e}`,{...n,[e]:r}},{});function vxe(n,e){n&&xC.flushSync(()=>n.dispatchEvent(e))}function u3(n){const e=Qe.useRef(n);return Qe.useEffect(()=>{e.current=n}),Qe.useMemo(()=>(...t)=>{var r;return(r=e.current)==null?void 0:r.call(e,...t)},[])}function X8({prop:n,defaultProp:e,onChange:t=()=>{}}){const[r,i]=wgt({defaultProp:e,onChange:t}),a=n!==void 0,o=a?n:r,s=u3(t),l=Qe.useCallback(c=>{if(a){const f=typeof c=="function"?c(n):c;f!==n&&s(f)}else i(c)},[a,n,i,s]);return[o,l]}function wgt({defaultProp:n,onChange:e}){const t=Qe.useState(n),[r]=t,i=Qe.useRef(r),a=u3(e);return Qe.useEffect(()=>{i.current!==r&&(a(r),i.current=r)},[r,i,a]),t}var Egt=Qe.createContext(void 0);function jL(n){const e=Qe.useContext(Egt);return n||e||"ltr"}var $q="rovingFocusGroup.onEntryFocus",Tgt={bubbles:!1,cancelable:!0},HL="RovingFocusGroup",[Gq,yxe,Mgt]=Vq(HL),[Cgt,VL]=l4(HL,[Mgt]),[Rgt,Agt]=Cgt(HL),gxe=Qe.forwardRef((n,e)=>Fe.jsx(Gq.Provider,{scope:n.__scopeRovingFocusGroup,children:Fe.jsx(Gq.Slot,{scope:n.__scopeRovingFocusGroup,children:Fe.jsx(Pgt,{...n,ref:e})})}));gxe.displayName=HL;var Pgt=Qe.forwardRef((n,e)=>{const{__scopeRovingFocusGroup:t,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:u=!1,...f}=n,d=Qe.useRef(null),v=ly(e,d),y=jL(a),[w=null,b]=X8({prop:o,defaultProp:s,onChange:l}),[S,M]=Qe.useState(!1),N=u3(c),k=yxe(t),G=Qe.useRef(!1),[q,X]=Qe.useState(0);return Qe.useEffect(()=>{const Y=d.current;if(Y)return Y.addEventListener($q,N),()=>Y.removeEventListener($q,N)},[N]),Fe.jsx(Rgt,{scope:t,orientation:r,dir:y,loop:i,currentTabStopId:w,onItemFocus:Qe.useCallback(Y=>b(Y),[b]),onItemShiftTab:Qe.useCallback(()=>M(!0),[]),onFocusableItemAdd:Qe.useCallback(()=>X(Y=>Y+1),[]),onFocusableItemRemove:Qe.useCallback(()=>X(Y=>Y-1),[]),children:Fe.jsx(kh.div,{tabIndex:S||q===0?-1:0,"data-orientation":r,...f,ref:v,style:{outline:"none",...n.style},onMouseDown:zu(n.onMouseDown,()=>{G.current=!0}),onFocus:zu(n.onFocus,Y=>{const ee=!G.current;if(Y.target===Y.currentTarget&&ee&&!S){const W=new CustomEvent($q,Tgt);if(Y.currentTarget.dispatchEvent(W),!W.defaultPrevented){const ue=k().filter(_e=>_e.focusable),pe=ue.find(_e=>_e.active),de=ue.find(_e=>_e.id===w),he=[pe,de,...ue].filter(Boolean).map(_e=>_e.ref.current);bxe(he,u)}}G.current=!1}),onBlur:zu(n.onBlur,()=>M(!1))})})}),_xe="RovingFocusGroupItem",xxe=Qe.forwardRef((n,e)=>{const{__scopeRovingFocusGroup:t,focusable:r=!0,active:i=!1,tabStopId:a,...o}=n,s=O3(),l=a||s,c=Agt(_xe,t),u=c.currentTabStopId===l,f=yxe(t),{onFocusableItemAdd:d,onFocusableItemRemove:v}=c;return Qe.useEffect(()=>{if(r)return d(),()=>v()},[r,d,v]),Fe.jsx(Gq.ItemSlot,{scope:t,id:l,focusable:r,active:i,children:Fe.jsx(kh.span,{tabIndex:u?0:-1,"data-orientation":c.orientation,...o,ref:e,onMouseDown:zu(n.onMouseDown,y=>{r?c.onItemFocus(l):y.preventDefault()}),onFocus:zu(n.onFocus,()=>c.onItemFocus(l)),onKeyDown:zu(n.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){c.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const w=Lgt(y,c.orientation,c.dir);if(w!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let S=f().filter(M=>M.focusable).map(M=>M.ref.current);if(w==="last")S.reverse();else if(w==="prev"||w==="next"){w==="prev"&&S.reverse();const M=S.indexOf(y.currentTarget);S=c.loop?Ogt(S,M+1):S.slice(M+1)}setTimeout(()=>bxe(S))}})})})});xxe.displayName=_xe;var Ngt={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Dgt(n,e){return e!=="rtl"?n:n==="ArrowLeft"?"ArrowRight":n==="ArrowRight"?"ArrowLeft":n}function Lgt(n,e,t){const r=Dgt(n.key,t);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Ngt[r]}function bxe(n,e=!1){const t=document.activeElement;for(const r of n)if(r===t||(r.focus({preventScroll:e}),document.activeElement!==t))return}function Ogt(n,e){return n.map((t,r)=>n[(e+r)%n.length])}var Sxe=gxe,wxe=xxe;function zgt(n,e){return Qe.useReducer((t,r)=>e[t][r]??t,n)}var X4=n=>{const{present:e,children:t}=n,r=Ugt(e),i=typeof t=="function"?t({present:r.isPresent}):Qe.Children.only(t),a=ly(r.ref,kgt(i));return typeof t=="function"||r.isPresent?Qe.cloneElement(i,{ref:a}):null};X4.displayName="Presence";function Ugt(n){const[e,t]=Qe.useState(),r=Qe.useRef({}),i=Qe.useRef(n),a=Qe.useRef("none"),o=n?"mounted":"unmounted",[s,l]=zgt(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return Qe.useEffect(()=>{const c=$L(r.current);a.current=s==="mounted"?c:"none"},[s]),hb(()=>{const c=r.current,u=i.current;if(u!==n){const d=a.current,v=$L(c);n?l("MOUNT"):v==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&d!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=n}},[n,l]),hb(()=>{if(e){let c;const u=e.ownerDocument.defaultView??window,f=v=>{const w=$L(r.current).includes(v.animationName);if(v.target===e&&w&&(l("ANIMATION_END"),!i.current)){const b=e.style.animationFillMode;e.style.animationFillMode="forwards",c=u.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=b)})}},d=v=>{v.target===e&&(a.current=$L(r.current))};return e.addEventListener("animationstart",d),e.addEventListener("animationcancel",f),e.addEventListener("animationend",f),()=>{u.clearTimeout(c),e.removeEventListener("animationstart",d),e.removeEventListener("animationcancel",f),e.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:Qe.useCallback(c=>{c&&(r.current=getComputedStyle(c)),t(c)},[])}}function $L(n){return(n==null?void 0:n.animationName)||"none"}function kgt(n){var r,i;let e=(r=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:r.get,t=e&&"isReactWarning"in e&&e.isReactWarning;return t?n.ref:(e=(i=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:i.get,t=e&&"isReactWarning"in e&&e.isReactWarning,t?n.props.ref:n.props.ref||n.ref)}var qq="Tabs",[Igt,H5n]=l4(qq,[VL]),Exe=VL(),[Fgt,Yq]=Igt(qq),Txe=Qe.forwardRef((n,e)=>{const{__scopeTabs:t,value:r,onValueChange:i,defaultValue:a,orientation:o="horizontal",dir:s,activationMode:l="automatic",...c}=n,u=jL(s),[f,d]=X8({prop:r,onChange:i,defaultProp:a});return Fe.jsx(Fgt,{scope:t,baseId:O3(),value:f,onValueChange:d,orientation:o,dir:u,activationMode:l,children:Fe.jsx(kh.div,{dir:u,"data-orientation":o,...c,ref:e})})});Txe.displayName=qq;var Mxe="TabsList",Cxe=Qe.forwardRef((n,e)=>{const{__scopeTabs:t,loop:r=!0,...i}=n,a=Yq(Mxe,t),o=Exe(t);return Fe.jsx(Sxe,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:Fe.jsx(kh.div,{role:"tablist","aria-orientation":a.orientation,...i,ref:e})})});Cxe.displayName=Mxe;var Rxe="TabsTrigger",Axe=Qe.forwardRef((n,e)=>{const{__scopeTabs:t,value:r,disabled:i=!1,...a}=n,o=Yq(Rxe,t),s=Exe(t),l=Dxe(o.baseId,r),c=Lxe(o.baseId,r),u=r===o.value;return Fe.jsx(wxe,{asChild:!0,...s,focusable:!i,active:u,children:Fe.jsx(kh.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":c,"data-state":u?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:l,...a,ref:e,onMouseDown:zu(n.onMouseDown,f=>{!i&&f.button===0&&f.ctrlKey===!1?o.onValueChange(r):f.preventDefault()}),onKeyDown:zu(n.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&o.onValueChange(r)}),onFocus:zu(n.onFocus,()=>{const f=o.activationMode!=="manual";!u&&!i&&f&&o.onValueChange(r)})})})});Axe.displayName=Rxe;var Pxe="TabsContent",Nxe=Qe.forwardRef((n,e)=>{const{__scopeTabs:t,value:r,forceMount:i,children:a,...o}=n,s=Yq(Pxe,t),l=Dxe(s.baseId,r),c=Lxe(s.baseId,r),u=r===s.value,f=Qe.useRef(u);return Qe.useEffect(()=>{const d=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(d)},[]),Fe.jsx(X4,{present:i||u,children:({present:d})=>Fe.jsx(kh.div,{"data-state":u?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":l,hidden:!d,id:c,tabIndex:0,...o,ref:e,style:{...n.style,animationDuration:f.current?"0s":void 0},children:d&&a})})});Nxe.displayName=Pxe;function Dxe(n,e){return`${n}-trigger-${e}`}function Lxe(n,e){return`${n}-content-${e}`}var Bgt=Txe,Oxe=Cxe,zxe=Axe,Uxe=Nxe;function kxe(n){var e,t,r="";if(typeof n=="string"||typeof n=="number")r+=n;else if(typeof n=="object")if(Array.isArray(n)){var i=n.length;for(e=0;e<i;e++)n[e]&&(t=kxe(n[e]))&&(r&&(r+=" "),r+=t)}else for(t in n)n[t]&&(r&&(r+=" "),r+=t);return r}function W4(){for(var n,e,t=0,r="",i=arguments.length;t<i;t++)(n=arguments[t])&&(e=kxe(n))&&(r&&(r+=" "),r+=e);return r}const Xq="-",jgt=n=>{const e=Vgt(n),{conflictingClassGroups:t,conflictingClassGroupModifiers:r}=n;return{getClassGroupId:o=>{const s=o.split(Xq);return s[0]===""&&s.length!==1&&s.shift(),Ixe(s,e)||Hgt(o)},getConflictingClassGroupIds:(o,s)=>{const l=t[o]||[];return s&&r[o]?[...l,...r[o]]:l}}},Ixe=(n,e)=>{var o;if(n.length===0)return e.classGroupId;const t=n[0],r=e.nextPart.get(t),i=r?Ixe(n.slice(1),r):void 0;if(i)return i;if(e.validators.length===0)return;const a=n.join(Xq);return(o=e.validators.find(({validator:s})=>s(a)))==null?void 0:o.classGroupId},Fxe=/^\[(.+)\]$/,Hgt=n=>{if(Fxe.test(n)){const e=Fxe.exec(n)[1],t=e==null?void 0:e.substring(0,e.indexOf(":"));if(t)return"arbitrary.."+t}},Vgt=n=>{const{theme:e,prefix:t}=n,r={nextPart:new Map,validators:[]};return Ggt(Object.entries(n.classGroups),t).forEach(([a,o])=>{Wq(o,r,a,e)}),r},Wq=(n,e,t,r)=>{n.forEach(i=>{if(typeof i=="string"){const a=i===""?e:Bxe(e,i);a.classGroupId=t;return}if(typeof i=="function"){if($gt(i)){Wq(i(r),e,t,r);return}e.validators.push({validator:i,classGroupId:t});return}Object.entries(i).forEach(([a,o])=>{Wq(o,Bxe(e,a),t,r)})})},Bxe=(n,e)=>{let t=n;return e.split(Xq).forEach(r=>{t.nextPart.has(r)||t.nextPart.set(r,{nextPart:new Map,validators:[]}),t=t.nextPart.get(r)}),t},$gt=n=>n.isThemeGetter,Ggt=(n,e)=>e?n.map(([t,r])=>{const i=r.map(a=>typeof a=="string"?e+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([o,s])=>[e+o,s])):a);return[t,i]}):n,qgt=n=>{if(n<1)return{get:()=>{},set:()=>{}};let e=0,t=new Map,r=new Map;const i=(a,o)=>{t.set(a,o),e++,e>n&&(e=0,r=t,t=new Map)};return{get(a){let o=t.get(a);if(o!==void 0)return o;if((o=r.get(a))!==void 0)return i(a,o),o},set(a,o){t.has(a)?t.set(a,o):i(a,o)}}},jxe="!",Ygt=n=>{const{separator:e,experimentalParseClassName:t}=n,r=e.length===1,i=e[0],a=e.length,o=s=>{const l=[];let c=0,u=0,f;for(let b=0;b<s.length;b++){let S=s[b];if(c===0){if(S===i&&(r||s.slice(b,b+a)===e)){l.push(s.slice(u,b)),u=b+a;continue}if(S==="/"){f=b;continue}}S==="["?c++:S==="]"&&c--}const d=l.length===0?s:s.substring(u),v=d.startsWith(jxe),y=v?d.substring(1):d,w=f&&f>u?f-u:void 0;return{modifiers:l,hasImportantModifier:v,baseClassName:y,maybePostfixModifierPosition:w}};return t?s=>t({className:s,parseClassName:o}):o},Xgt=n=>{if(n.length<=1)return n;const e=[];let t=[];return n.forEach(r=>{r[0]==="["?(e.push(...t.sort(),r),t=[]):t.push(r)}),e.push(...t.sort()),e},Wgt=n=>({cache:qgt(n.cacheSize),parseClassName:Ygt(n),...jgt(n)}),Zgt=/\s+/,Qgt=(n,e)=>{const{parseClassName:t,getClassGroupId:r,getConflictingClassGroupIds:i}=e,a=[],o=n.trim().split(Zgt);let s="";for(let l=o.length-1;l>=0;l-=1){const c=o[l],{modifiers:u,hasImportantModifier:f,baseClassName:d,maybePostfixModifierPosition:v}=t(c);let y=!!v,w=r(y?d.substring(0,v):d);if(!w){if(!y){s=c+(s.length>0?" "+s:s);continue}if(w=r(d),!w){s=c+(s.length>0?" "+s:s);continue}y=!1}const b=Xgt(u).join(":"),S=f?b+jxe:b,M=S+w;if(a.includes(M))continue;a.push(M);const N=i(w,y);for(let k=0;k<N.length;++k){const G=N[k];a.push(S+G)}s=c+(s.length>0?" "+s:s)}return s};function Kgt(){let n=0,e,t,r="";for(;n<arguments.length;)(e=arguments[n++])&&(t=Hxe(e))&&(r&&(r+=" "),r+=t);return r}const Hxe=n=>{if(typeof n=="string")return n;let e,t="";for(let r=0;r<n.length;r++)n[r]&&(e=Hxe(n[r]))&&(t&&(t+=" "),t+=e);return t};function Jgt(n,...e){let t,r,i,a=o;function o(l){const c=e.reduce((u,f)=>f(u),n());return t=Wgt(c),r=t.cache.get,i=t.cache.set,a=s,s(l)}function s(l){const c=r(l);if(c)return c;const u=Qgt(l,t);return i(l,u),u}return function(){return a(Kgt.apply(null,arguments))}}const _g=n=>{const e=t=>t[n]||[];return e.isThemeGetter=!0,e},Vxe=/^\[(?:([a-z-]+):)?(.+)\]$/i,e_t=/^\d+\/\d+$/,t_t=new Set(["px","full","screen"]),n_t=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,r_t=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,i_t=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,a_t=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,o_t=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,$S=n=>pE(n)||t_t.has(n)||e_t.test(n),W8=n=>hE(n,"length",h_t),pE=n=>!!n&&!Number.isNaN(Number(n)),Zq=n=>hE(n,"number",pE),bC=n=>!!n&&Number.isInteger(Number(n)),s_t=n=>n.endsWith("%")&&pE(n.slice(0,-1)),Ih=n=>Vxe.test(n),Z8=n=>n_t.test(n),l_t=new Set(["length","size","percentage"]),c_t=n=>hE(n,l_t,$xe),u_t=n=>hE(n,"position",$xe),f_t=new Set(["image","url"]),d_t=n=>hE(n,f_t,v_t),p_t=n=>hE(n,"",m_t),SC=()=>!0,hE=(n,e,t)=>{const r=Vxe.exec(n);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):t(r[2]):!1},h_t=n=>r_t.test(n)&&!i_t.test(n),$xe=()=>!1,m_t=n=>a_t.test(n),v_t=n=>o_t.test(n),y_t=Jgt(()=>{const n=_g("colors"),e=_g("spacing"),t=_g("blur"),r=_g("brightness"),i=_g("borderColor"),a=_g("borderRadius"),o=_g("borderSpacing"),s=_g("borderWidth"),l=_g("contrast"),c=_g("grayscale"),u=_g("hueRotate"),f=_g("invert"),d=_g("gap"),v=_g("gradientColorStops"),y=_g("gradientColorStopPositions"),w=_g("inset"),b=_g("margin"),S=_g("opacity"),M=_g("padding"),N=_g("saturate"),k=_g("scale"),G=_g("sepia"),q=_g("skew"),X=_g("space"),Y=_g("translate"),ee=()=>["auto","contain","none"],W=()=>["auto","hidden","clip","visible","scroll"],ue=()=>["auto",Ih,e],pe=()=>[Ih,e],de=()=>["",$S,W8],we=()=>["auto",pE,Ih],he=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],_e=()=>["solid","dashed","dotted","double","none"],Te=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],be=()=>["start","end","center","between","around","evenly","stretch"],Oe=()=>["","0",Ih],Ne=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Ie=()=>[pE,Ih];return{cacheSize:500,separator:":",theme:{colors:[SC],spacing:[$S,W8],blur:["none","",Z8,Ih],brightness:Ie(),borderColor:[n],borderRadius:["none","","full",Z8,Ih],borderSpacing:pe(),borderWidth:de(),contrast:Ie(),grayscale:Oe(),hueRotate:Ie(),invert:Oe(),gap:pe(),gradientColorStops:[n],gradientColorStopPositions:[s_t,W8],inset:ue(),margin:ue(),opacity:Ie(),padding:pe(),saturate:Ie(),scale:Ie(),sepia:Oe(),skew:Ie(),space:pe(),translate:pe()},classGroups:{aspect:[{aspect:["auto","square","video",Ih]}],container:["container"],columns:[{columns:[Z8]}],"break-after":[{"break-after":Ne()}],"break-before":[{"break-before":Ne()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...he(),Ih]}],overflow:[{overflow:W()}],"overflow-x":[{"overflow-x":W()}],"overflow-y":[{"overflow-y":W()}],overscroll:[{overscroll:ee()}],"overscroll-x":[{"overscroll-x":ee()}],"overscroll-y":[{"overscroll-y":ee()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[w]}],"inset-x":[{"inset-x":[w]}],"inset-y":[{"inset-y":[w]}],start:[{start:[w]}],end:[{end:[w]}],top:[{top:[w]}],right:[{right:[w]}],bottom:[{bottom:[w]}],left:[{left:[w]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",bC,Ih]}],basis:[{basis:ue()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ih]}],grow:[{grow:Oe()}],shrink:[{shrink:Oe()}],order:[{order:["first","last","none",bC,Ih]}],"grid-cols":[{"grid-cols":[SC]}],"col-start-end":[{col:["auto",{span:["full",bC,Ih]},Ih]}],"col-start":[{"col-start":we()}],"col-end":[{"col-end":we()}],"grid-rows":[{"grid-rows":[SC]}],"row-start-end":[{row:["auto",{span:[bC,Ih]},Ih]}],"row-start":[{"row-start":we()}],"row-end":[{"row-end":we()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ih]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ih]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal",...be()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...be(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...be(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[M]}],px:[{px:[M]}],py:[{py:[M]}],ps:[{ps:[M]}],pe:[{pe:[M]}],pt:[{pt:[M]}],pr:[{pr:[M]}],pb:[{pb:[M]}],pl:[{pl:[M]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[X]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[X]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ih,e]}],"min-w":[{"min-w":[Ih,e,"min","max","fit"]}],"max-w":[{"max-w":[Ih,e,"none","full","min","max","fit","prose",{screen:[Z8]},Z8]}],h:[{h:[Ih,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ih,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ih,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ih,e,"auto","min","max","fit"]}],"font-size":[{text:["base",Z8,W8]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Zq]}],"font-family":[{font:[SC]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Ih]}],"line-clamp":[{"line-clamp":["none",pE,Zq]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",$S,Ih]}],"list-image":[{"list-image":["none",Ih]}],"list-style-type":[{list:["none","disc","decimal",Ih]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[n]}],"placeholder-opacity":[{"placeholder-opacity":[S]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[n]}],"text-opacity":[{"text-opacity":[S]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[..._e(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",$S,W8]}],"underline-offset":[{"underline-offset":["auto",$S,Ih]}],"text-decoration-color":[{decoration:[n]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:pe()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ih]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ih]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[S]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...he(),u_t]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",c_t]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},d_t]}],"bg-color":[{bg:[n]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[v]}],"gradient-via":[{via:[v]}],"gradient-to":[{to:[v]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[S]}],"border-style":[{border:[..._e(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[S]}],"divide-style":[{divide:_e()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",..._e()]}],"outline-offset":[{"outline-offset":[$S,Ih]}],"outline-w":[{outline:[$S,W8]}],"outline-color":[{outline:[n]}],"ring-w":[{ring:de()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[n]}],"ring-opacity":[{"ring-opacity":[S]}],"ring-offset-w":[{"ring-offset":[$S,W8]}],"ring-offset-color":[{"ring-offset":[n]}],shadow:[{shadow:["","inner","none",Z8,p_t]}],"shadow-color":[{shadow:[SC]}],opacity:[{opacity:[S]}],"mix-blend":[{"mix-blend":[...Te(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Te()}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Z8,Ih]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[f]}],saturate:[{saturate:[N]}],sepia:[{sepia:[G]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[S]}],"backdrop-saturate":[{"backdrop-saturate":[N]}],"backdrop-sepia":[{"backdrop-sepia":[G]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ih]}],duration:[{duration:Ie()}],ease:[{ease:["linear","in","out","in-out",Ih]}],delay:[{delay:Ie()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ih]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[k]}],"scale-x":[{"scale-x":[k]}],"scale-y":[{"scale-y":[k]}],rotate:[{rotate:[bC,Ih]}],"translate-x":[{"translate-x":[Y]}],"translate-y":[{"translate-y":[Y]}],"skew-x":[{"skew-x":[q]}],"skew-y":[{"skew-y":[q]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ih]}],accent:[{accent:["auto",n]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ih]}],"caret-color":[{caret:[n]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":pe()}],"scroll-mx":[{"scroll-mx":pe()}],"scroll-my":[{"scroll-my":pe()}],"scroll-ms":[{"scroll-ms":pe()}],"scroll-me":[{"scroll-me":pe()}],"scroll-mt":[{"scroll-mt":pe()}],"scroll-mr":[{"scroll-mr":pe()}],"scroll-mb":[{"scroll-mb":pe()}],"scroll-ml":[{"scroll-ml":pe()}],"scroll-p":[{"scroll-p":pe()}],"scroll-px":[{"scroll-px":pe()}],"scroll-py":[{"scroll-py":pe()}],"scroll-ps":[{"scroll-ps":pe()}],"scroll-pe":[{"scroll-pe":pe()}],"scroll-pt":[{"scroll-pt":pe()}],"scroll-pr":[{"scroll-pr":pe()}],"scroll-pb":[{"scroll-pb":pe()}],"scroll-pl":[{"scroll-pl":pe()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ih]}],fill:[{fill:[n,"none"]}],"stroke-w":[{stroke:[$S,W8,Zq]}],stroke:[{stroke:[n,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function O0(...n){return y_t(W4(n))}const Gxe=n=>n.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase()),qxe=Bgt,Qq=Qe.forwardRef(({className:n,...e},t)=>Fe.jsx(Oxe,{ref:t,className:O0("rf-inline-flex rf-h-9 rf-items-center rf-justify-center rf-rounded-lg rf-bg-zinc-100 rf-p-1 rf-text-zinc-500 dark:rf-bg-zinc-800 dark:rf-text-zinc-400",n),...e}));Qq.displayName=Oxe.displayName;const Q8=Qe.forwardRef(({className:n,...e},t)=>Fe.jsx(zxe,{ref:t,className:O0("rf-inline-flex rf-items-center rf-justify-center rf-whitespace-nowrap rf-rounded-md rf-px-3 rf-py-1 rf-text-sm rf-font-medium rf-ring-offset-white rf-transition-all focus-visible:rf-outline-none focus-visible:rf-ring-2 focus-visible:rf-ring-zinc-950 focus-visible:rf-ring-offset-2 disabled:rf-pointer-events-none disabled:rf-opacity-50 data-[state=active]:rf-bg-white data-[state=active]:rf-text-zinc-950 data-[state=active]:rf-shadow dark:rf-ring-offset-zinc-950 dark:focus-visible:rf-ring-zinc-300 dark:data-[state=active]:rf-bg-zinc-950 dark:data-[state=active]:rf-text-zinc-50",n),...e}));Q8.displayName=zxe.displayName;const Z4=Qe.forwardRef(({className:n,...e},t)=>Fe.jsx(Uxe,{ref:t,className:O0("rf-mt-2 rf-ring-offset-white focus-visible:rf-outline-none focus-visible:rf-ring-2 focus-visible:rf-ring-zinc-950 focus-visible:rf-ring-offset-2 dark:rf-ring-offset-zinc-950 dark:focus-visible:rf-ring-zinc-300",n),...e}));Z4.displayName=Uxe.displayName;var Yxe={Hz:{baseUnit:"Hz",variants:{MHz:1e6,kHz:1e3,Hz:1}},g:{baseUnit:"g",variants:{kg:1e3,g:1}},Ω:{baseUnit:"Ω",variants:{mΩ:.001,Ω:1,kΩ:1e3,KΩ:1e3,kohm:1e3,MΩ:1e6,GΩ:1e9,TΩ:1e12}},V:{baseUnit:"V",variants:{mV:.001,V:1,kV:1e3,KV:1e3,MV:1e6,GV:1e9,TV:1e12}},A:{baseUnit:"A",variants:{µA:1e-6,mA:.001,ma:.001,A:1,kA:1e3,MA:1e6}},F:{baseUnit:"F",variants:{pF:1e-12,nF:1e-9,µF:1e-6,uF:1e-6,mF:.001,F:1}},ml:{baseUnit:"ml",variants:{ml:1,mL:1,l:1e3,L:1e3}},deg:{baseUnit:"deg",variants:{rad:180/Math.PI}},ms:{baseUnit:"ms",variants:{s:1e3}},mm:{baseUnit:"mm",variants:{nm:1e-6,µm:.001,um:.001,mm:1,cm:10,dm:100,m:1e3,km:1e6,in:25.4,ft:304.8,IN:25.4,FT:304.8,yd:914.4,mi:1609344,mil:.0254}}},Kq=new Set;for(const[n,e]of Object.entries(Yxe)){Kq.add(n);for(const t of Object.keys(e.variants))Kq.add(t)}function g_t(n){for(const[e,t]of Object.entries(Yxe))if(n in t.variants)return{baseUnit:t.baseUnit,conversionFactor:t.variants[n]};return{baseUnit:n,conversionFactor:1}}var Xxe={tera:1e12,T:1e12,giga:1e9,G:1e9,mega:1e6,M:1e6,kilo:1e3,k:1e3,deci:.1,d:.1,centi:.01,c:.01,milli:.001,m:.001,micro:1e-6,u:1e-6,µ:1e-6,nano:1e-9,n:1e-9,pico:1e-12,p:1e-12},c4=n=>{var s;if(typeof n>"u")return{parsedUnit:null,unitOfValue:null,value:null};if(typeof n=="string"&&n.match(/^-?[\d\.]+$/))return{value:Number.parseFloat(n),parsedUnit:null,unitOfValue:null};if(typeof n=="number")return{value:n,parsedUnit:null,unitOfValue:null};if(typeof n=="object"&&"x"in n&&"y"in n){const{parsedUnit:l,unitOfValue:c}=c4(n.x);return{parsedUnit:l,unitOfValue:c,value:{x:c4(n.x).value,y:c4(n.y).value}}}const t=(s=n.toString().split("").reverse().join("").match(/[^\d\s]+/))==null?void 0:s[0];if(!t)throw new Error(`Could not determine unit: "${n}"`);const r=t.split("").reverse().join(""),i=n.slice(0,-r.length);if(r in Xxe&&!Kq.has(r)){const l=Xxe[r];return{parsedUnit:null,unitOfValue:null,value:Number.parseFloat(i)*l}}const{baseUnit:a,conversionFactor:o}=g_t(r);return{parsedUnit:r,unitOfValue:a,value:o*Number.parseFloat(i)}},GL=E.string().or(E.number()).transform(n=>c4(n).value),Jq=E.string().or(E.number()).transform(n=>c4(n).value).transform(n=>Number.parseFloat(n.toPrecision(12))),Wxe=E.string().or(E.number()).transform(n=>c4(n).value),qL=E.string().or(E.number()).transform(n=>c4(n).value),kg=E.string().or(E.number()).transform(n=>c4(n).value),Zxe=E.string().or(E.number()).transform(n=>c4(n).value),ac=kg,__t=E.string().or(E.number()).transform(n=>c4(n).value),x_t=E.string().or(E.number()).transform(n=>c4(n).value),mE=E.string().or(E.number()).transform(n=>typeof n=="number"?n:n.endsWith("deg")?Number.parseFloat(n.split("deg")[0]):n.endsWith("rad")?Number.parseFloat(n.split("rad")[0])*180/Math.PI:Number.parseFloat(n)),Qxe=E.number().or(E.string().endsWith("mAh")).transform(n=>{if(typeof n=="string"){const e=n.replace("mAh",""),t=Number.parseFloat(e);if(Number.isNaN(t))throw new Error("Invalid capacity");return t}return n}).describe("Battery capacity in mAh"),M9=E.object({x:ac,y:ac}),b_t=M9,vE=E.object({x:ac,y:ac,z:ac}),S_t=vE,eY=E.object({width:E.number(),height:E.number()}),r1=n=>E.string().optional().default(()=>`${n}_${WM(10)}`),Kxe=E.enum(["jlcpcb","macrofab","pcbway","digikey","mouser","lcsc"]),Y2=E.object({type:E.literal("source_component"),ftype:E.string().optional(),source_component_id:E.string(),name:E.string(),manufacturer_part_number:E.string().optional(),supplier_part_numbers:E.record(Kxe,E.array(E.string())).optional(),display_value:E.string().optional()}),tY=Y2.extend({ftype:E.literal("simple_capacitor"),capacitance:Jq,max_voltage_rating:qL.optional(),display_capacitance:E.string().optional(),max_decoupling_trace_length:ac.optional()}),nY=Y2.extend({ftype:E.literal("simple_resistor"),resistance:GL,display_resistance:E.string().optional()}),YL=Y2.extend({ftype:E.literal("simple_diode")}),Jxe=Y2.extend({ftype:E.literal("simple_ground")}),rY=Y2.extend({ftype:E.literal("simple_bug")}).describe("@deprecated"),iY=Y2.extend({ftype:E.literal("simple_chip")}),aY=YL.extend({ftype:E.literal("led")}),oY=Y2.extend({ftype:E.literal("simple_power_source"),voltage:qL}),sY=Y2.extend({ftype:E.literal("simple_battery"),capacity:Qxe}),lY=Y2.extend({ftype:E.literal("simple_inductor"),inductance:Wxe}),cY=Y2.extend({ftype:E.literal("simple_push_button")}),uY=Y2.extend({ftype:E.literal("simple_potentiometer"),max_resistance:GL}),e2e=Y2.extend({ftype:E.literal("simple_crystal"),frequency:E.number().describe("Frequency in Hz"),load_capacitance:E.number().optional().describe("Load capacitance in pF")}),fY=Y2.extend({ftype:E.literal("simple_pin_header"),pin_count:E.number(),gender:E.enum(["male","female"]).optional().default("male")}),dY=Y2.extend({ftype:E.literal("simple_resonator"),load_capacitance:Jq,equivalent_series_resistance:GL.optional(),frequency:Zxe}),pY=Y2.extend({ftype:E.literal("simple_transistor"),transistor_type:E.enum(["npn","pnp"])}),hY=Y2.extend({ftype:E.literal("simple_mosfet"),channel_type:E.enum(["n","p"]),mosfet_mode:E.enum(["enhancement","depletion"])}),mY=Y2.extend({ftype:E.literal("simple_switch")}),vY=E.object({type:E.literal("source_project_metadata"),name:E.string().optional(),software_used_string:E.string().optional(),created_at:E.string().datetime().optional()}),t2e=E.union([nY,tY,YL,Jxe,iY,rY,aY,oY,sY,lY,cY,uY,e2e,fY,dY,mY,pY,hY,vY]),n2e=E.object({type:E.literal("source_port"),pin_number:E.number().optional(),port_hints:E.array(E.string()).optional(),name:E.string(),source_port_id:E.string(),source_component_id:E.string(),subcircuit_id:E.string().optional()}),r2e=E.object({type:E.literal("source_trace"),source_trace_id:E.string(),connected_source_port_ids:E.array(E.string()),connected_source_net_ids:E.array(E.string()),subcircuit_id:E.string().optional(),subcircuit_connectivity_map_key:E.string().optional(),max_length:E.number().optional(),min_trace_thickness:E.number().optional(),display_name:E.string().optional()}),i2e=E.object({type:E.literal("source_group"),source_group_id:E.string(),subcircuit_id:E.string().optional(),parent_subcircuit_id:E.string().optional(),is_subcircuit:E.boolean().optional(),name:E.string().optional()}),a2e=E.object({type:E.literal("source_net"),source_net_id:E.string(),name:E.string(),member_source_group_ids:E.array(E.string()),is_power:E.boolean().optional(),is_ground:E.boolean().optional(),is_digital_signal:E.boolean().optional(),is_analog_signal:E.boolean().optional(),trace_width:E.number().optional(),subcircuit_id:E.string().optional()}),o2e=E.object({type:E.literal("schematic_box"),schematic_component_id:E.string(),width:ac,height:ac,x:ac,y:ac}).describe("Draws a box on the schematic"),s2e=E.object({type:E.literal("schematic_path"),schematic_component_id:E.string(),fill_color:E.enum(["red","blue"]).optional(),is_filled:E.boolean().optional(),points:E.array(M9)}),l2e=E.record(E.object({left_margin:kg.optional(),right_margin:kg.optional(),top_margin:kg.optional(),bottom_margin:kg.optional()})),c2e=E.object({left_size:E.number(),right_size:E.number(),top_size:E.number().optional(),bottom_size:E.number().optional()}),u2e=E.object({left_side:E.object({pins:E.array(E.number()),direction:E.enum(["top-to-bottom","bottom-to-top"]).optional()}).optional(),right_side:E.object({pins:E.array(E.number()),direction:E.enum(["top-to-bottom","bottom-to-top"]).optional()}).optional(),top_side:E.object({pins:E.array(E.number()),direction:E.enum(["left-to-right","right-to-left"]).optional()}).optional(),bottom_side:E.object({pins:E.array(E.number()),direction:E.enum(["left-to-right","right-to-left"]).optional()}).optional()}),f2e=E.union([c2e,u2e]),d2e=E.object({type:E.literal("schematic_component"),size:eY,center:M9,source_component_id:E.string(),schematic_component_id:E.string(),pin_spacing:kg.optional(),pin_styles:l2e.optional(),box_width:kg.optional(),symbol_name:E.string().optional(),port_arrangement:f2e.optional(),port_labels:E.record(E.string()).optional(),symbol_display_value:E.string().optional()}),p2e=E.object({type:E.literal("schematic_line"),schematic_component_id:E.string(),x1:ac,x2:ac,y1:ac,y2:ac}),h2e=E.object({type:E.literal("schematic_trace"),schematic_trace_id:E.string(),source_trace_id:E.string(),junctions:E.array(E.object({x:E.number(),y:E.number()})),edges:E.array(E.object({from:E.object({x:E.number(),y:E.number()}),to:E.object({x:E.number(),y:E.number()}),is_crossing:E.boolean().optional(),from_schematic_port_id:E.string().optional(),to_schematic_port_id:E.string().optional()}))}),m2e=E.object({type:E.literal("schematic_text"),schematic_component_id:E.string(),schematic_text_id:E.string(),text:E.string(),position:E.object({x:ac,y:ac}),rotation:E.number().default(0),anchor:E.enum(["center","left","right","top","bottom"]).default("center"),color:E.string().default("#000000")}),v2e=E.object({type:E.literal("schematic_port"),schematic_port_id:E.string(),source_port_id:E.string(),schematic_component_id:E.string().optional(),center:M9,facing_direction:E.enum(["up","down","left","right"]).optional(),distance_from_component_edge:E.number().optional(),side_of_component:E.enum(["top","bottom","left","right"]).optional(),true_ccw_index:E.number().optional(),pin_number:E.number().optional(),display_pin_label:E.string().optional()}).describe("Defines a port on a schematic component"),y2e=E.object({type:E.literal("schematic_net_label"),source_net_id:E.string(),center:M9,anchor_position:M9.optional(),anchor_side:E.enum(["top","bottom","left","right"]),text:E.string(),symbol_name:E.string().optional()}),g2e=E.object({type:E.literal("schematic_error"),schematic_error_id:E.string(),error_type:E.literal("schematic_port_not_found"),message:E.string()}).describe("Defines a schematic error on the schematic"),XL=E.object({type:E.literal("schematic_debug_object"),label:E.string().optional()}),_2e=XL.extend({shape:E.literal("rect"),center:M9,size:eY}),x2e=XL.extend({shape:E.literal("line"),start:M9,end:M9}),b2e=XL.extend({shape:E.literal("point"),center:M9}),S2e=E.discriminatedUnion("shape",[_2e,x2e,b2e]),w2e=E.object({type:E.literal("schematic_voltage_probe"),schematic_voltage_probe_id:E.string(),position:M9,schematic_trace_id:E.string(),voltage:qL.optional()}).describe("Defines a voltage probe measurement point on a schematic trace"),yY=E.object({type:E.literal("schematic_manual_edit_conflict_warning"),schematic_manual_edit_conflict_warning_id:r1("schematic_manual_edit_conflict_warning"),message:E.string(),schematic_component_id:E.string(),schematic_group_id:E.string().optional(),subcircuit_id:E.string().optional(),source_component_id:E.string()}).describe("Warning emitted when a component has both manual placement and explicit schX/schY coordinates"),wC=["top","bottom","inner1","inner2","inner3","inner4","inner5","inner6"],gY=E.enum(wC),xg=gY.or(E.object({name:gY})).transform(n=>typeof n=="string"?n:n.name),yE=E.enum(["top","bottom"]),E2e=E.object({x:ac,y:ac,via:E.boolean().optional(),via_to_layer:xg.optional()}),w_t=E.array(E2e),T2e=E.object({x:ac,y:ac,via:E.boolean().optional(),to_layer:xg.optional(),trace_width:ac.optional()}),M2e=E.object({type:E.literal("pcb_component"),pcb_component_id:r1("pcb_component"),source_component_id:E.string(),center:M9,layer:xg,rotation:mE,width:kg,height:kg,subcircuit_id:E.string().optional()}).describe("Defines a component on the PCB"),C2e=E.object({type:E.literal("pcb_hole"),pcb_hole_id:r1("pcb_hole"),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),hole_shape:E.enum(["circle","square"]),hole_diameter:E.number(),x:ac,y:ac}),E_t=C2e.describe("Defines a circular or square hole on the PCB"),R2e=E.object({type:E.literal("pcb_hole"),pcb_hole_id:r1("pcb_hole"),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),hole_shape:E.literal("oval"),hole_width:E.number(),hole_height:E.number(),x:ac,y:ac}),T_t=R2e.describe("Defines an oval hole on the PCB"),A2e=C2e.or(R2e),M_t=E.object({type:E.literal("pcb_plated_hole"),shape:E.literal("circle"),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),outer_diameter:E.number(),hole_diameter:E.number(),x:ac,y:ac,layers:E.array(xg),port_hints:E.array(E.string()).optional(),pcb_component_id:E.string().optional(),pcb_port_id:E.string().optional(),pcb_plated_hole_id:r1("pcb_plated_hole")}),C_t=E.object({type:E.literal("pcb_plated_hole"),shape:E.enum(["oval","pill"]),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),outer_width:E.number(),outer_height:E.number(),hole_width:E.number(),hole_height:E.number(),x:ac,y:ac,layers:E.array(xg),port_hints:E.array(E.string()).optional(),pcb_component_id:E.string().optional(),pcb_port_id:E.string().optional(),pcb_plated_hole_id:r1("pcb_plated_hole")}),R_t=E.object({type:E.literal("pcb_plated_hole"),shape:E.literal("circular_hole_with_rect_pad"),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),hole_shape:E.literal("circle"),pad_shape:E.literal("rect"),hole_diameter:E.number(),rect_pad_width:E.number(),rect_pad_height:E.number(),x:ac,y:ac,layers:E.array(xg),port_hints:E.array(E.string()).optional(),pcb_component_id:E.string().optional(),pcb_port_id:E.string().optional(),pcb_plated_hole_id:r1("pcb_plated_hole")});E.object({type:E.literal("pcb_plated_hole"),shape:E.literal("pill_hole_with_rect_pad"),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),hole_shape:E.literal("pill"),pad_shape:E.literal("rect"),hole_width:E.number(),hole_height:E.number(),rect_pad_width:E.number(),rect_pad_height:E.number(),x:ac,y:ac,layers:E.array(xg),port_hints:E.array(E.string()).optional(),pcb_component_id:E.string().optional(),pcb_port_id:E.string().optional(),pcb_plated_hole_id:r1("pcb_plated_hole")});var P2e=E.union([M_t,C_t,R_t]),N2e=E.object({type:E.literal("pcb_port"),pcb_port_id:r1("pcb_port"),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),source_port_id:E.string(),pcb_component_id:E.string(),x:ac,y:ac,layers:E.array(xg)}).describe("Defines a port on the PCB"),A_t=E.object({type:E.literal("pcb_smtpad"),shape:E.literal("circle"),pcb_smtpad_id:r1("pcb_smtpad"),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),x:ac,y:ac,radius:E.number(),layer:xg,port_hints:E.array(E.string()).optional(),pcb_component_id:E.string().optional(),pcb_port_id:E.string().optional()}),P_t=E.object({type:E.literal("pcb_smtpad"),shape:E.literal("rect"),pcb_smtpad_id:r1("pcb_smtpad"),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),x:ac,y:ac,width:E.number(),height:E.number(),layer:xg,port_hints:E.array(E.string()).optional(),pcb_component_id:E.string().optional(),pcb_port_id:E.string().optional()}),N_t=E.object({type:E.literal("pcb_smtpad"),shape:E.literal("rotated_rect"),pcb_smtpad_id:r1("pcb_smtpad"),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),x:ac,y:ac,width:E.number(),height:E.number(),ccw_rotation:mE,layer:xg,port_hints:E.array(E.string()).optional(),pcb_component_id:E.string().optional(),pcb_port_id:E.string().optional()}),D2e=E.object({type:E.literal("pcb_smtpad"),shape:E.literal("pill"),pcb_smtpad_id:r1("pcb_smtpad"),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),x:ac,y:ac,width:E.number(),height:E.number(),radius:E.number(),layer:xg,port_hints:E.array(E.string()).optional(),pcb_component_id:E.string().optional(),pcb_port_id:E.string().optional()}),L2e=E.union([A_t,P_t,N_t,D2e]).describe("Defines an SMT pad on the PCB"),D_t=E.object({type:E.literal("pcb_solder_paste"),shape:E.literal("circle"),pcb_solder_paste_id:r1("pcb_solder_paste"),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),x:ac,y:ac,radius:E.number(),layer:xg,pcb_component_id:E.string().optional(),pcb_smtpad_id:E.string().optional()}),L_t=E.object({type:E.literal("pcb_solder_paste"),shape:E.literal("rect"),pcb_solder_paste_id:r1("pcb_solder_paste"),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),x:ac,y:ac,width:E.number(),height:E.number(),layer:xg,pcb_component_id:E.string().optional(),pcb_smtpad_id:E.string().optional()}),O2e=E.union([D_t,L_t]).describe("Defines solderpaste on the PCB"),z2e=E.object({type:E.literal("pcb_text"),pcb_text_id:r1("pcb_text"),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),text:E.string(),center:M9,layer:xg,width:kg,height:kg,lines:E.number(),align:E.enum(["bottom-left"])}).describe("Defines text on the PCB"),U2e=E.object({route_type:E.literal("wire"),x:ac,y:ac,width:ac,start_pcb_port_id:E.string().optional(),end_pcb_port_id:E.string().optional(),layer:xg}),k2e=E.object({route_type:E.literal("via"),x:ac,y:ac,from_layer:E.string(),to_layer:E.string()}),O_t=E.union([U2e,k2e]),I2e=E.object({type:E.literal("pcb_trace"),source_trace_id:E.string().optional(),pcb_component_id:E.string().optional(),pcb_trace_id:r1("pcb_trace"),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),route_thickness_mode:E.enum(["constant","interpolated"]).default("constant").optional(),route_order_index:E.number().optional(),should_round_corners:E.boolean().optional(),trace_length:E.number().optional(),route:E.array(E.union([E.object({route_type:E.literal("wire"),x:ac,y:ac,width:ac,start_pcb_port_id:E.string().optional(),end_pcb_port_id:E.string().optional(),layer:xg}),E.object({route_type:E.literal("via"),x:ac,y:ac,from_layer:E.string(),to_layer:E.string()})]))}).describe("Defines a trace on the PCB"),F2e=E.object({type:E.literal("pcb_trace_error"),pcb_trace_error_id:r1("pcb_trace_error"),error_type:E.literal("pcb_trace_error"),message:E.string(),center:M9.optional(),pcb_trace_id:E.string(),source_trace_id:E.string(),pcb_component_ids:E.array(E.string()),pcb_port_ids:E.array(E.string())}).describe("Defines a trace error on the PCB"),B2e=E.object({type:E.literal("pcb_port_not_matched_error"),pcb_error_id:r1("pcb_error"),message:E.string(),pcb_component_ids:E.array(E.string())}).describe("Defines a trace error on the PCB where a port is not matched"),j2e=E.object({type:E.literal("pcb_via"),pcb_via_id:r1("pcb_via"),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),x:ac,y:ac,outer_diameter:ac.default("0.6mm"),hole_diameter:ac.default("0.25mm"),from_layer:xg.optional(),to_layer:xg.optional(),layers:E.array(xg),pcb_trace_id:E.string().optional()}).describe("Defines a via on the PCB"),H2e=E.object({type:E.literal("pcb_board"),pcb_board_id:r1("pcb_board"),is_subcircuit:E.boolean().optional(),subcircuit_id:E.string().optional(),width:kg,height:kg,center:M9,thickness:kg.optional().default(1.4),num_layers:E.number().optional().default(4),outline:E.array(M9).optional(),material:E.enum(["fr4","fr1"]).default("fr4")}).describe("Defines the board outline of the PCB"),V2e=E.object({type:E.literal("pcb_placement_error"),pcb_placement_error_id:r1("pcb_placement_error"),message:E.string()}).describe("Defines a placement error on the PCB"),$2e=E.object({type:E.literal("pcb_trace_hint"),pcb_trace_hint_id:r1("pcb_trace_hint"),pcb_port_id:E.string(),pcb_component_id:E.string(),route:E.array(T2e)}).describe("A hint that can be used during generation of a PCB trace"),G2e=E.object({type:E.literal("pcb_silkscreen_line"),pcb_silkscreen_line_id:r1("pcb_silkscreen_line"),pcb_component_id:E.string(),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),stroke_width:ac.default("0.1mm"),x1:ac,y1:ac,x2:ac,y2:ac,layer:yE}).describe("Defines a silkscreen line on the PCB"),q2e=E.object({type:E.literal("pcb_silkscreen_path"),pcb_silkscreen_path_id:r1("pcb_silkscreen_path"),pcb_component_id:E.string(),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),layer:yE,route:E.array(M9),stroke_width:kg}).describe("Defines a silkscreen path on the PCB"),Y2e=E.object({type:E.literal("pcb_silkscreen_text"),pcb_silkscreen_text_id:r1("pcb_silkscreen_text"),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),font:E.literal("tscircuit2024").default("tscircuit2024"),font_size:ac.default("0.2mm"),pcb_component_id:E.string(),text:E.string(),ccw_rotation:E.number().optional(),layer:xg,is_mirrored:E.boolean().default(!1).optional(),anchor_position:M9.default({x:0,y:0}),anchor_alignment:E.enum(["center","top_left","top_right","bottom_left","bottom_right"]).default("center")}).describe("Defines silkscreen text on the PCB"),X2e=E.object({type:E.literal("pcb_silkscreen_rect"),pcb_silkscreen_rect_id:r1("pcb_silkscreen_rect"),pcb_component_id:E.string(),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),center:M9,width:kg,height:kg,layer:xg,stroke_width:kg.default("1mm")}).describe("Defines a silkscreen rect on the PCB"),W2e=E.object({type:E.literal("pcb_silkscreen_circle"),pcb_silkscreen_circle_id:r1("pcb_silkscreen_circle"),pcb_component_id:E.string(),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),center:M9,radius:kg,layer:yE,stroke_width:kg.default("1mm")}).describe("Defines a silkscreen circle on the PCB"),Z2e=E.object({type:E.literal("pcb_silkscreen_oval"),pcb_silkscreen_oval_id:r1("pcb_silkscreen_oval"),pcb_component_id:E.string(),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),center:M9,radius_x:ac,radius_y:ac,layer:yE}).describe("Defines a silkscreen oval on the PCB"),Q2e=E.object({type:E.literal("pcb_fabrication_note_text"),pcb_fabrication_note_text_id:r1("pcb_fabrication_note_text"),subcircuit_id:E.string().optional(),pcb_group_id:E.string().optional(),font:E.literal("tscircuit2024").default("tscircuit2024"),font_size:ac.default("1mm"),pcb_component_id:E.string(),text:E.string(),layer:yE,anchor_position:M9.default({x:0,y:0}),anchor_alignment:E.enum(["center","top_left","top_right","bottom_left","bottom_right"]).default("center"),color:E.string().optional()}).describe("Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"),K2e=E.object({type:E.literal("pcb_fabrication_note_path"),pcb_fabrication_note_path_id:r1("pcb_fabrication_note_path"),pcb_component_id:E.string(),subcircuit_id:E.string().optional(),layer:xg,route:E.array(M9),stroke_width:kg,color:E.string().optional()}).describe("Defines a fabrication path on the PCB for fabricators or assemblers"),J2e=E.object({type:E.literal("pcb_keepout"),shape:E.literal("rect"),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),center:M9,width:ac,height:ac,pcb_keepout_id:E.string(),layers:E.array(E.string()),description:E.string().optional()}).or(E.object({type:E.literal("pcb_keepout"),shape:E.literal("circle"),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),center:M9,radius:ac,pcb_keepout_id:E.string(),layers:E.array(E.string()),description:E.string().optional()})),e5e=E.object({type:E.literal("pcb_missing_footprint_error"),pcb_missing_footprint_error_id:r1("pcb_missing_footprint_error"),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),error_type:E.literal("pcb_missing_footprint_error"),source_component_id:E.string(),message:E.string()}).describe("Defines a missing footprint error on the PCB"),t5e=E.object({type:E.literal("pcb_group"),pcb_group_id:r1("pcb_group"),source_group_id:E.string(),is_subcircuit:E.boolean().optional(),subcircuit_id:E.string().optional(),width:kg,height:kg,center:M9,pcb_component_ids:E.array(E.string()),name:E.string().optional(),description:E.string().optional()}).describe("Defines a group of components on the PCB"),n5e=E.object({type:E.literal("pcb_autorouting_error"),pcb_error_id:r1("pcb_autorouting_error"),message:E.string()}).describe("The autorouting has failed to route a portion of the board"),_Y=E.object({type:E.literal("pcb_manual_edit_conflict_warning"),pcb_manual_edit_conflict_warning_id:r1("pcb_manual_edit_conflict_warning"),message:E.string(),pcb_component_id:E.string(),pcb_group_id:E.string().optional(),subcircuit_id:E.string().optional(),source_component_id:E.string()}).describe("Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"),r5e=E.object({type:E.literal("cad_component"),cad_component_id:E.string(),pcb_component_id:E.string(),source_component_id:E.string(),position:vE,rotation:vE.optional(),size:vE.optional(),layer:xg.optional(),footprinter_string:E.string().optional(),model_obj_url:E.string().optional(),model_stl_url:E.string().optional(),model_3mf_url:E.string().optional(),model_jscad:E.any().optional()}).describe("Defines a component on the PCB"),i5e=E.union([r2e,n2e,t2e,aY,a2e,i2e,rY,iY,tY,YL,nY,oY,sY,lY,fY,dY,mY,pY,hY,uY,cY,vY,M2e,A2e,e5e,_Y,P2e,J2e,N2e,z2e,I2e,j2e,L2e,O2e,H2e,t5e,$2e,G2e,q2e,Y2e,X2e,W2e,Z2e,F2e,V2e,B2e,K2e,Q2e,n5e,o2e,m2e,p2e,d2e,v2e,h2e,s2e,g2e,y2e,S2e,w2e,yY,r5e]),xY=i5e;const a5e=Object.freeze(Object.defineProperty({__proto__:null,all_layers:wC,any_circuit_element:i5e,any_soup_element:xY,any_source_component:t2e,battery_capacity:Qxe,cad_component:r5e,capacitance:Jq,current:__t,distance:ac,frequency:Zxe,getZodPrefixedIdWithDefault:r1,inductance:Wxe,layer_ref:xg,layer_string:gY,length:kg,pcb_autorouting_error:n5e,pcb_board:H2e,pcb_component:M2e,pcb_fabrication_note_path:K2e,pcb_fabrication_note_text:Q2e,pcb_group:t5e,pcb_hole:A2e,pcb_hole_circle_or_square_shape:E_t,pcb_hole_oval_shape:T_t,pcb_keepout:J2e,pcb_manual_edit_conflict_warning:_Y,pcb_missing_footprint_error:e5e,pcb_placement_error:V2e,pcb_plated_hole:P2e,pcb_port:N2e,pcb_port_not_matched_error:B2e,pcb_route_hint:E2e,pcb_route_hints:w_t,pcb_silkscreen_circle:W2e,pcb_silkscreen_line:G2e,pcb_silkscreen_oval:Z2e,pcb_silkscreen_path:q2e,pcb_silkscreen_rect:X2e,pcb_silkscreen_text:Y2e,pcb_smtpad:L2e,pcb_smtpad_pill:D2e,pcb_solder_paste:O2e,pcb_text:z2e,pcb_trace:I2e,pcb_trace_error:F2e,pcb_trace_hint:$2e,pcb_trace_route_point:O_t,pcb_trace_route_point_via:k2e,pcb_trace_route_point_wire:U2e,pcb_via:j2e,point:M9,point3:vE,port_arrangement:f2e,position:b_t,position3:S_t,resistance:GL,rotation:mE,route_hint_point:T2e,schematic_box:o2e,schematic_component:d2e,schematic_component_port_arrangement_by_sides:u2e,schematic_component_port_arrangement_by_size:c2e,schematic_debug_line:x2e,schematic_debug_object:S2e,schematic_debug_object_base:XL,schematic_debug_point:b2e,schematic_debug_rect:_2e,schematic_error:g2e,schematic_line:p2e,schematic_manual_edit_conflict_warning:yY,schematic_net_label:y2e,schematic_path:s2e,schematic_pin_styles:l2e,schematic_port:v2e,schematic_text:m2e,schematic_trace:h2e,schematic_voltage_probe:w2e,size:eY,source_component_base:Y2,source_group:i2e,source_led:aY,source_net:a2e,source_port:n2e,source_project_metadata:vY,source_simple_battery:sY,source_simple_bug:rY,source_simple_capacitor:tY,source_simple_chip:iY,source_simple_crystal:e2e,source_simple_diode:YL,source_simple_ground:Jxe,source_simple_inductor:lY,source_simple_mosfet:hY,source_simple_pin_header:fY,source_simple_potentiometer:uY,source_simple_power_source:oY,source_simple_push_button:cY,source_simple_resistor:nY,source_simple_resonator:dY,source_simple_switch:mY,source_simple_transistor:pY,source_trace:r2e,supplier_name:Kxe,time:x_t,visible_layer:yE,voltage:qL},Symbol.toStringTag,{value:"Module"}));function bY(n){if(n.length===0)return{minX:0,maxX:0,minY:0,maxY:0};let e=1/0,t=-1/0,r=1/0,i=-1/0;const a=o=>{e=Math.min(e,o.x),t=Math.max(t,o.x),r=Math.min(r,o.y),i=Math.max(i,o.y)};return n.forEach(o=>{switch(o.type){case"path":o.points.forEach(a);break;case"text":a({x:o.x,y:o.y});break;case"circle":{const{x:s,y:l,radius:c}=o;a({x:s-c,y:l-c}),a({x:s+c,y:l+c});break}case"box":{const{x:s,y:l,width:c,height:u}=o,f=c/2,d=u/2;a({x:s-f,y:l-d}),a({x:s+f,y:l+d});break}}}),{minX:e,maxX:t,minY:r,maxY:i}}function Bm(n){let e=n.size;if(!e){const t=bY(n.primitives);e={width:t.maxX-t.minX,height:t.maxY-t.minY}}return{...n,size:e}}var z_t={paths:{path11:{type:"path",points:[{x:-.5274831500000005,y:.03018695000000049},{x:-.30105415000000013,y:.03018695000000049}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.2932119499999999,y:.03018695000000049},{x:.5339524499999997,y:.03018695000000049}],color:"primary",fill:!1},"path11-5-5":{type:"path",points:[{x:.09765764999999949,y:.12845085000000034},{x:-.0011297500000011507,y:-.06303624999999946},{x:-.10778645000000164,y:.12845085000000034}],color:"primary",fill:!1},path17:{type:"path",points:[{x:-.002934749999999875,y:-.13606674999999946},{x:.06869635000000063,y:-.11019914999999947}],color:"primary",fill:!1},path18:{type:"path",points:[{x:.06869635000000063,y:-.11019914999999947},{x:.1403274500000009,y:-.13606674999999946}],color:"primary",fill:!1},path19:{type:"path",points:[{x:-.1461968499999997,y:-.13606674999999946},{x:-.07456574999999921,y:-.11019914999999947}],color:"primary",fill:!1},path20:{type:"path",points:[{x:-.07456575000000054,y:-.11019914999999947},{x:-.0029346500000002607,y:-.13606674999999946}],color:"primary",fill:!1}},refblocks:{left1:{x:-.5413984499999998,y:.029334149999999948},right1:{x:.54139845,y:.030330549999999734}},bounds:{width:1.1391137819999997,height:.5443252999999999,centerX:11102230246251565e-32,centerY:.05499999999999999},circles:{path1:{type:"circle",x:-.0037626500000000895,y:.03731525000000002,radius:.28854213,color:"primary",fill:!1}}},{paths:U_t,bounds:WL,refblocks:o5e,circles:k_t}=z_t,s5e=Bm({primitives:[...Object.values(U_t),...Object.values(k_t),{type:"text",text:"{REF}",x:0,y:-.3594553499999995,anchor:"middle_top"},{type:"text",text:"{VAL}",x:0,y:.35,anchor:"middle_bottom"}],ports:[{...o5e.left1,labels:["1"]},{...o5e.right1,labels:["2"]}],size:{width:WL.width,height:WL.height},center:{x:WL.centerX,y:WL.centerY}}),I_t=(n,e="right")=>{switch(e){case"down":switch(n){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(n){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(n){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 n}return n},F_t=(n,e)=>{const{primitives:t,center:r,ports:i,size:a}=n,o=D3({a:1,b:0,c:0,d:-1,e:0,f:2*r.y}),s=t.map(c=>{switch(c={...c},c.type){case"path":return{...c,points:c.points.map(v=>Ir(o,v))};case"text":const u=Ir(o,{x:c.x,y:c.y}),f={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{...c,x:u.x,y:u.y,anchor:f[c.anchor]};case"circle":case"box":const d=Ir(o,{x:c.x,y:c.y});return{...c,x:d.x,y:d.y}}}),l=i.map(c=>({...c,...Ir(o,c)}));return{primitives:s,center:r,ports:l,size:a,...e}},SY=(n,e)=>{const{primitives:t,center:r,ports:i,size:a}=n,o=D3({a:-1,b:0,c:0,d:1,e:0,f:2*r.x}),s=t.map(c=>{switch(c={...c},c.type){case"path":return{...c,points:c.points.map(v=>Ir(o,v))};case"text":const u=Ir(o,{x:c.x,y:c.y}),f={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{...c,x:u.x,y:u.y,anchor:f[c.anchor]};case"circle":case"box":const d=Ir(o,{x:c.x,y:c.y});return{...c,x:d.x,y:d.y}}}),l=i.map(c=>({...c,...Ir(o,c)}));return{primitives:s,center:r,ports:l,size:a,...e}},EC=(n,e)=>{const{newOrientation:t,overrides:r}=e,i={up:Math.PI/2,right:0,down:-Math.PI/2,left:-Math.PI},a=q5(t?i[t]:Math.PI/2,n.center.x,n.center.y),{primitives:o,center:s,size:l,ports:c}=n,u=o.map(v=>{switch(v={...v},v.type){case"path":return{...v,points:v.points.map(S=>Ir(a,S))};case"text":const y=Ir(a,{x:v.x,y:v.y});return v.anchor=I_t(v.anchor,t??"right"),{...v,x:y.x,y:y.y};case"circle":const w=Ir(a,{x:v.x,y:v.y});return{...v,x:w.x,y:w.y};case"box":const b=Ir(a,{x:v.x,y:v.y});return{...v,x:b.x,y:b.y,width:v.height,height:v.width}}}),f=c.map(v=>({...v,...Ir(a,v)})),d=bY(u);return{primitives:u,center:s,ports:f,size:{width:d.maxX-d.minX,height:d.maxY-d.minY},...r}},Cl=(n,e="down",t={})=>EC(n,{newOrientation:e,overrides:t}),B_t=EC(s5e,{newOrientation:"up"}),j_t=B_t,H_t={paths:{path40:{type:"path",points:[{x:.14458890000000002,y:.0390362999999998},{x:-.1199943999999995,y:-.09325540000000054}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.1199943999999995,y:.17132800000000015},{x:.14458890000000002,y:.0390362999999998}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.1199943999999995,y:-.09325539999999921},{x:-.1199943999999995,y:.17132800000000015}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.14458890000000002,y:.17132800000000015},{x:.14458890000000002,y:-.09325539999999921}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.12219909999999956,y:.0390362999999998},{x:-.5168693999999996,y:.0390362999999998}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.5233797000000002,y:.03895110000000024},{x:.1496715999999998,y:.03895110000000024}],color:"primary",fill:!1},"path43-8":{type:"path",points:[{x:.14339119999999994,y:.17181090000000032},{x:.07768859999999966,y:.19542900000000052}],color:"primary",fill:!1},"path43-8-3":{type:"path",points:[{x:.21083259999999981,y:-.1180321000000002},{x:.14512999999999954,y:-.094414}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.0050250999999996715,y:.26884529999999995},bottom1:{type:"text",text:"{VAL}",x:-.00011179999999977319,y:-.27884529999999996}},refblocks:{left1:{x:-.5191471000000001,y:.03992070000000081},right1:{x:.5191470999999999,y:.03889609999999988}},bounds:{width:1.094611082,height:.2976905999999999,centerX:-11102230246251565e-32,centerY:.05499999999999999},circles:{}},{paths:V_t,texts:l5e,bounds:ZL,refblocks:c5e,circles:$_t}=H_t,u5e=Bm({primitives:[...Object.values(V_t),...Object.values($_t),{...l5e.top1,anchor:"middle_bottom"},{...l5e.bottom1,anchor:"middle_top"}],ports:[{...c5e.left1,labels:["1"]},{...c5e.right1,labels:["2"]}],size:{width:ZL.width,height:ZL.height},center:{x:ZL.centerX,y:ZL.centerY}}),G_t=EC(u5e,{newOrientation:"down"}),q_t=G_t,Y_t={paths:{path43:{type:"path",points:[{x:-.05901489999999909,y:.18831315000000015},{x:-.05869489999999833,y:-.11814524999999954}],color:"primary",fill:!1},"path43-6":{type:"path",points:[{x:.015375000000000805,y:.12533125000000034},{x:.016669000000000933,y:-.05562075000000033}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.06443049999999961,y:.032673549999999496},{x:-.4368029,y:.032673549999999496}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.4350822999999997,y:.03438825000000034},{x:.028285099999999952,y:.03438825000000034}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.027835099999999446,y:.26564474999999943},bottom1:{type:"text",text:"{VAL}",x:-.028373699999999502,y:-.27564474999999966}},refblocks:{left1:{x:-.4458008,y:.033557849999999334},right1:{x:.4458008,y:.03343344999999931}},bounds:{width:.947918482,height:.2912894999999991,centerX:0,centerY:.055000000000000104},circles:{}},{paths:X_t,texts:f5e,bounds:QL,refblocks:d5e,circles:W_t}=Y_t,p5e=Bm({primitives:[...Object.values(X_t),...Object.values(W_t),{...f5e.top1,anchor:"middle_bottom"},{...f5e.bottom1,anchor:"middle_top"}],ports:[{...d5e.left1,labels:["1"]},{...d5e.right1,labels:["2"]}],size:{width:QL.width,height:QL.height},center:{x:QL.centerX,y:QL.centerY}}),Z_t=EC(p5e,{newOrientation:"up"}),KL={paths:{path1:{type:"path",points:[{x:-.511850799999999,y:.04616140000000257},{x:-.24726749999999953,y:.04616140000000257}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.2818991000000013,y:.04616140000000257},{x:.5464825000000006,y:.04616140000000257}],color:"primary",fill:!1},path3:{type:"path",points:[{x:.0173157000000006,y:.17845310000000225},{x:.2818990000000001,y:.17845310000000225},{x:.2818990000000001,y:-.0861302999999971},{x:-.24726770000000053,y:-.0861302999999971},{x:-.24726770000000053,y:.17845310000000225},{x:.017315699999998824,y:.17845310000000225}],color:"primary",fill:!1}},refblocks:{left1:{x:-.5337907000000002,y:.04580520000000021},right1:{x:.5337907000000004,y:.04525870000000154}},bounds:{centerX:11102230246251565e-32,centerY:8881784197001252e-31},circles:{}},Q_t=class{constructor(e){ht(this,"symbol");this.symbol=JSON.parse(JSON.stringify(e)),this.symbol.size=this.computeSize()}changeTextAnchor(e,t){return this.symbol={...this.symbol,primitives:this.symbol.primitives.map(r=>r.type==="text"&&r.text===e?{...r,anchor:t}:r)},this}labelPort(e,t){return this.symbol={...this.symbol,ports:this.symbol.ports.map(r=>r.labels.includes(e)?{...r,labels:t}:r)},this}rotateRightFacingSymbol(e){return this.symbol=EC(this.symbol,{newOrientation:e}),this}computeSize(){const e=bY(this.symbol.primitives);return{width:e.maxX-e.minX,height:e.maxY-e.minY}}build(){return{...this.symbol,size:this.computeSize()}}},l0=n=>new Q_t({...n,primitives:n.primitives??[...Object.values(n.paths??{}),...Object.values(n.texts??{}),...Object.values(n.circles??{}),...Object.values(n.rects??{})],ports:n.ports??Object.entries(n.refblocks).flatMap(([e,t])=>[{...t,labels:[e]}]),center:n.center??{x:n.bounds.centerX,y:n.bounds.centerY}}),{paths:K_t,bounds:h5e,refblocks:m5e,circles:J_t}=KL,ext=l0({primitives:[...Object.values(K_t),...Object.values(J_t),{type:"text",text:"{REF}",x:-.16,y:.2294553499999995},{type:"text",text:"{VAL}",x:.16,y:.2294553499999995}],ports:[{...m5e.left1,labels:["1"]},{...m5e.right1,labels:["2"]}],center:{x:h5e.centerX,y:h5e.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").build(),{paths:txt,bounds:v5e,refblocks:y5e,circles:nxt}=KL,rxt=l0({primitives:[...Object.values(txt),...Object.values(nxt),{type:"text",text:"{REF}",x:0,y:.2294553499999995},{type:"text",text:"{VAL}",x:0,y:-.1594553499999995}],ports:[{...y5e.left1,labels:["1"]},{...y5e.right1,labels:["2"]}],center:{x:v5e.centerX,y:v5e.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:ixt,bounds:g5e,refblocks:_5e,circles:axt}=KL,oxt=l0({primitives:[...Object.values(ixt),...Object.values(axt),{type:"text",text:"{REF}",x:0,y:.2294553499999995},{type:"text",text:"{VAL}",x:0,y:-.1594553499999995}],ports:[{..._5e.left1,labels:["1"]},{..._5e.right1,labels:["2"]}],center:{x:g5e.centerX,y:g5e.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:sxt,bounds:x5e,refblocks:b5e,circles:lxt}=KL,cxt=l0({primitives:[...Object.values(sxt),...Object.values(lxt),{type:"text",text:"{REF}",x:-.16,y:.2294553499999995},{type:"text",text:"{VAL}",x:.16,y:.2294553499999995}],ports:[{...b5e.left1,labels:["1"]},{...b5e.right1,labels:["2"]}],center:{x:x5e.centerX,y:x5e.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").build(),JL={paths:{path27:{type:"path",points:[{x:.5229378000000002,y:.017283050000003186},{x:.07314620000000005,y:.017283050000003186}],color:"primary",fill:!1},path28:{type:"path",points:[{x:-.0856037999999999,y:.017283050000003186},{x:-.5353954999999999,y:.017283050000003186}],color:"primary",fill:!1},path29:{type:"path",points:[{x:.0731461999999996,y:.2818663500000014},{x:.07314620000000005,y:-.24730024999999856}],color:"primary",fill:!1},path30:{type:"path",points:[{x:-.0856037999999999,y:.2818663500000014},{x:-.0856037999999999,y:-.24730024999999856}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.012864500000000056,y:.4200086500000033},bottom1:{type:"text",text:"{VAL}",x:-.003850500000000423,y:-.42000864999999976}},refblocks:{left1:{x:-.5512093000000005,y:.01638025000000276},right1:{x:.5512093,y:.016926950000001995}},bounds:{minX:-.5793677410000004,maxX:.579367741,minY:-.42000864999999976,maxY:.4200086500000033,width:1.1587354820000004,height:.8400173000000031,centerX:-2220446049250313e-31,centerY:17763568394002505e-31},circles:{}},{paths:uxt,texts:$5n,bounds:eO,refblocks:S5e,circles:fxt}=JL,dxt=l0({primitives:[...Object.values(uxt),...Object.values(fxt),{type:"text",text:"{REF}",x:-.2,y:.2094553499999995},{type:"text",text:"{VAL}",x:.2,y:.2094553499999995}],ports:[{...S5e.left1,labels:["1"]},{...S5e.right1,labels:["2"]}],size:{width:eO.width,height:eO.height},center:{x:eO.centerX,y:eO.centerY}}).changeTextAnchor("{VAL}","top_left").rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","bottom_left").build(),pxt=l0(JL).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["2"]).labelPort("right1",["1"]).changeTextAnchor("{REF}","middle_bottom").build(),wY={paths:{"path27-5":{type:"path",points:[{x:.4511331000000005,y:.017283050000003186},{x:.001333100000000531,y:.017283050000003186}],color:"primary",fill:!1},"path28-5":{type:"path",points:[{x:-.08560379999999945,y:.017283050000003186},{x:-.5353954999999995,y:.017283050000003186}],color:"primary",fill:!1},"path30-7":{type:"path",points:[{x:-.0024798999999995353,y:.28420285000000334},{x:-.0024798999999995353,y:-.247479349999999}],color:"primary",fill:!1},path8704:{type:"path",points:[{x:-.1433630999999993,y:-.24400714999999806},{x:-.1433630999999993,y:-.24400714999999806},{x:-.14262848833929928,y:-.24277205092349807},{x:-.1418975396743993,y:-.2415360290679981},{x:-.14117026348109932,y:-.24029908349449816},{x:-.14044666923519933,y:-.23906121326399818},{x:-.13972676641249931,y:-.2378224174374982},{x:-.1390105644887993,y:-.23658269507599822},{x:-.13829807293989932,y:-.2353420452404983},{x:-.13758930124159935,y:-.23410046699199832},{x:-.13688425886969938,y:-.23285795939149836},{x:-.13618295529999938,y:-.23161452149999842},{x:-.13548540000829937,y:-.23037015237849842},{x:-.13479160247039934,y:-.22912485108799843},{x:-.13410157216209936,y:-.22787861668949844},{x:-.1334153185591994,y:-.22663144824399842},{x:-.13273285113749936,y:-.22538334481249844},{x:-.13205417937279937,y:-.22413430545599844},{x:-.1313793127408994,y:-.2228843292354985},{x:-.1307082607175994,y:-.22163341521199847},{x:-.13004103277869938,y:-.2203815624464985},{x:-.1293776383999994,y:-.21912876999999853},{x:-.12871808705729942,y:-.21787503693349855},{x:-.12806238822639943,y:-.21662036230799855},{x:-.12741055138309942,y:-.21536474518449858},{x:-.12676258600319942,y:-.21410818462399858},{x:-.12611850156249946,y:-.21285067968749863},{x:-.12547830753679945,y:-.21159222943599865},{x:-.12484201340189946,y:-.21033283293049862},{x:-.12420962863359947,y:-.20907248923199864},{x:-.12358116270769948,y:-.20781119740149864},{x:-.12295662509999947,y:-.20654895649999866},{x:-.12233602528629947,y:-.20528576558849868},{x:-.12171937274239948,y:-.20402162372799865},{x:-.12110667694409948,y:-.20275652997949864},{x:-.12049794736719947,y:-.2014904834039986},{x:-.11989319348749948,y:-.20022348306249865},{x:-.11929242478079949,y:-.19895552801599864},{x:-.11869565072289952,y:-.19768661732549864},{x:-.11810288078959952,y:-.19641675005199866},{x:-.11751412445669952,y:-.19514592525649863},{x:-.1169293911999995,y:-.1938741419999986},{x:-.11634869049529953,y:-.19260139934349865},{x:-.11577203181839951,y:-.1913276963479986},{x:-.11519942464509951,y:-.1900530320744986},{x:-.11463087845119951,y:-.18877740558399858},{x:-.11406640271249952,y:-.1875008159374986},{x:-.11350600690479953,y:-.18622326219599858},{x:-.11294970050389953,y:-.18494474342049858},{x:-.11239749298559953,y:-.1836652586719986},{x:-.11184939382569953,y:-.18238480701149856},{x:-.11130541249999952,y:-.18110338749999852},{x:-.11076555848429954,y:-.17982099919849853},{x:-.11022984125439952,y:-.1785376411679985},{x:-.10969827028609953,y:-.1772533124694985},{x:-.10917085505519954,y:-.17596801216399852},{x:-.10864760503749954,y:-.17468173931249847},{x:-.10812852970879953,y:-.17339449297599843},{x:-.10761363854489954,y:-.17210627221549843},{x:-.10710294102159955,y:-.17081707609199845},{x:-.10659644661469955,y:-.16952690366649845},{x:-.10609416479999954,y:-.1682357539999984},{x:-.10559610505329955,y:-.1669436261534984},{x:-.10510227685039954,y:-.1656505191879984},{x:-.10461268966709955,y:-.16435643216449838},{x:-.10412735297919956,y:-.16306136414399838},{x:-.10364627626249956,y:-.16176531418749837},{x:-.10316946899279957,y:-.16046828135599833},{x:-.10269694064589956,y:-.15917026471049833},{x:-.10222870069759955,y:-.1578712633119983},{x:-.10176475862369955,y:-.1565712762214983},{x:-.10130512389999956,y:-.1552703024999983},{x:-.10084980600229956,y:-.15396834120849828},{x:-.10039881440639958,y:-.15266539140799829},{x:-.09995215858809957,y:-.15136145215949826},{x:-.09950984802319957,y:-.15005652252399826},{x:-.09907189218749957,y:-.14875060156249825},{x:-.09863830055679956,y:-.14744368833599825},{x:-.09820908260689958,y:-.14613578190549825},{x:-.09778424781359957,y:-.14482688133199823},{x:-.09736380565269957,y:-.1435169856764982},{x:-.09694776559999957,y:-.1422060939999982},{x:-.09653613713129958,y:-.1408942053634982},{x:-.09612892972239956,y:-.13958131882799818},{x:-.09572615284909958,y:-.13826743345449818},{x:-.09532781598719958,y:-.13695254830399817},{x:-.09493392861249958,y:-.13563666243749817},{x:-.09454450020079957,y:-.13431977491599817},{x:-.09415954022789956,y:-.13300188480049818},{x:-.09377905816959958,y:-.13168299115199816},{x:-.09340306350169958,y:-.13036309303149818},{x:-.09303156569999958,y:-.12904218949999818},{x:-.09266457424029959,y:-.12772027961849816},{x:-.09230209859839958,y:-.12639736244799815},{x:-.09194414825009957,y:-.12507343704949817},{x:-.09159073267119958,y:-.12374850248399819},{x:-.09124186133749958,y:-.12242255781249818},{x:-.09089754372479958,y:-.12109560209599818},{x:-.09055778930889957,y:-.11976763439549819},{x:-.09022260756559956,y:-.11843865377199818},{x:-.08989200797069956,y:-.11710865928649819},{x:-.08956599999999959,y:-.11577764999999829},{x:-.08956599999999959,y:-.11577764999999829},{x:-.08916166532269958,y:-.1141015840276983},{x:-.08876332646159957,y:-.11242441110159831},{x:-.08837097017289958,y:-.11074614170789834},{x:-.08798458321279957,y:-.10906678633279836},{x:-.08760415233749957,y:-.10738635546249836},{x:-.08722966430319957,y:-.10570485958319836},{x:-.08686110586609956,y:-.10402230918109837},{x:-.08649846378239957,y:-.10233871474239843},{x:-.0861417248082996,y:-.10065408675329846},{x:-.08579087569999959,y:-.09896843569999846},{x:-.08544590321369959,y:-.09728177206869845},{x:-.08510679410559958,y:-.09559410634559845},{x:-.08477353513189957,y:-.09390544901689848},{x:-.08444611304879956,y:-.09221581056879849},{x:-.08412451461249956,y:-.0905252014874985},{x:-.08380872657919955,y:-.0888336322591985},{x:-.08349873570509957,y:-.08714111337009853},{x:-.08319452874639957,y:-.08544765530639854},{x:-.08289609245929955,y:-.08375326855429854},{x:-.08260341359999955,y:-.08205796359999856},{x:-.08231647892469955,y:-.08036175092969856},{x:-.08203527518959956,y:-.07866464102959857},{x:-.08175978915089956,y:-.07696664438589859},{x:-.08149000756479956,y:-.07526777148479862},{x:-.08122591718749958,y:-.07356803281249863},{x:-.08096750477519957,y:-.07186743885519864},{x:-.08071475708409956,y:-.07016600009909864},{x:-.08046766087039958,y:-.06846372703039866},{x:-.08022620289029957,y:-.06676063013529866},{x:-.07999036989999955,y:-.06505671989999867},{x:-.07976014865569958,y:-.06335200681069868},{x:-.07953552591359955,y:-.061646501353598705},{x:-.07931648842989956,y:-.0599402140148987},{x:-.07910302296079955,y:-.0582331552807987},{x:-.07889511626249955,y:-.05652533563749871},{x:-.07869275509119955,y:-.05481676557119872},{x:-.07849592620309954,y:-.053107455568098726},{x:-.07830461635439954,y:-.05139741611439873},{x:-.07811881230129955,y:-.049686657696298736},{x:-.07793850079999953,y:-.04797519079999873},{x:-.07776366860669955,y:-.04626302591169874},{x:-.07759430247759955,y:-.04455017351759874},{x:-.07743038916889955,y:-.042836644103898744},{x:-.07727191543679954,y:-.04112244815679875},{x:-.07711886803749955,y:-.039407596162498754},{x:-.07697123372719955,y:-.03769209860719875},{x:-.07682899926209953,y:-.035975965977098755},{x:-.07669215139839955,y:-.03425920875839876},{x:-.07656067689229953,y:-.032541837437298764},{x:-.07643456249999953,y:-.03082386249999876},{x:-.07631379497769952,y:-.029105294432698766},{x:-.07619836108159952,y:-.02738614372159877},{x:-.07608824756789952,y:-.02566642085289876},{x:-.07598344119279953,y:-.023946136312798766},{x:-.07588392871249951,y:-.02222530058749876},{x:-.0757896968831995,y:-.020503924163198756},{x:-.07570073246109951,y:-.01878201752609876},{x:-.07561702220239952,y:-.017059591162398753},{x:-.07553855286329951,y:-.015336655558298754},{x:-.07546531119999951,y:-.01361322119999875},{x:-.07539728396869952,y:-.011889298573698748},{x:-.07533445792559951,y:-.010164898165598747},{x:-.07527681982689952,y:-.008440030461898743},{x:-.07522435642879952,y:-.006714705948798734},{x:-.07517705448749952,y:-.004988935112498731},{x:-.07513490075919951,y:-.0032627284391987255},{x:-.07509788200009951,y:-.0015360964150987165},{x:-.07506598496639952,y:.0001909504736012889},{x:-.0750391964142995,y:.0019184017407012956},{x:-.07501750309999951,y:.003646246900001303},{x:-.07500089177969951,y:.00537447546530131},{x:-.07498934920959952,y:.00710307695040132},{x:-.0749828621458995,y:.00883204086910133},{x:-.0749814173447995,y:.010561356735201338},{x:-.07498500156249951,y:.012291014062501347},{x:-.0749936015551995,y:.014021002364801359},{x:-.07500720407909953,y:.015751311155901372},{x:-.07502579589039951,y:.017481929949601384},{x:-.0750493637452995,y:.01921284825970139},{x:-.07507789439999951,y:.0209440556000014},{x:-.0751113746106995,y:.022675541484301412},{x:-.0751497911335995,y:.024407295426401427},{x:-.07519313072489951,y:.02613930694010145},{x:-.07524138014079951,y:.027871565539201462},{x:-.07529452613749951,y:.029604060737501478},{x:-.07535255547119951,y:.031336782048801484},{x:-.0754154548980995,y:.0330697189869015},{x:-.07548321117439952,y:.03480286106560152},{x:-.07555581105629952,y:.03653619779870154},{x:-.07563324129999952,y:.038269718700001565},{x:-.07571548866169951,y:.04000341328330158},{x:-.07580253989759951,y:.04173727106240159},{x:-.07589438176389952,y:.043471281551101616},{x:-.07599100101679952,y:.04520543426320164},{x:-.07609238441249952,y:.04693971871250166},{x:-.07619851870719953,y:.048674124412801674},{x:-.07630939065709953,y:.0504086408779017},{x:-.07642498701839952,y:.05214325762160172},{x:-.07654529454729952,y:.05387796415770175},{x:-.07667029999999952,y:.055612750000001654},{x:-.07667029999999952,y:.055612750000001654},{x:-.07680210846969952,y:.05708314936460168},{x:-.07693595411759954,y:.05855396299680169},{x:-.07707186730189955,y:.06002517220420173},{x:-.07720987838079954,y:.06149675829440175},{x:-.07735001771249954,y:.06296870257500178},{x:-.07749231565519954,y:.06444098635360178},{x:-.07763680256709955,y:.0659135909378018},{x:-.07778350880639956,y:.06738649763520185},{x:-.07793246473129956,y:.06885968775340187},{x:-.07808370069999958,y:.07033314260000188},{x:-.07823724707069958,y:.07180684348260188},{x:-.07839313420159956,y:.07328077170880191},{x:-.07855139245089958,y:.07475490858620194},{x:-.07871205217679958,y:.07622923542240194},{x:-.07887514373749958,y:.07770373352500196},{x:-.07904069749119959,y:.07917838420160196},{x:-.07920874379609959,y:.080653168759802},{x:-.07937931301039959,y:.082128068507202},{x:-.07955243549229958,y:.08360306475140203},{x:-.0797281415999996,y:.085078138800002},{x:-.0799064616916996,y:.08655327196060203},{x:-.08008742612559962,y:.08802844554080204},{x:-.08027106525989962,y:.08950364084820207},{x:-.08045740945279962,y:.09097883919040207},{x:-.08064648906249965,y:.0924540218750021},{x:-.08083833444719964,y:.0939291702096021},{x:-.08103297596509963,y:.09540426550180209},{x:-.08123044397439966,y:.09687928905920212},{x:-.08143076883329967,y:.09835422218940212},{x:-.08163398089999965,y:.09982904620000212},{x:-.08184011053269966,y:.10130374239860213},{x:-.08204918808959966,y:.10277829209280215},{x:-.08226124392889968,y:.10425267659020215},{x:-.08247630840879966,y:.10572687719840214},{x:-.08269441188749967,y:.10720087522500214},{x:-.08291558472319968,y:.10867465197760214},{x:-.0831398572740997,y:.11014818876380215},{x:-.08336725989839969,y:.11162146689120216},{x:-.0835978229542997,y:.11309446766740217},{x:-.0838315767999997,y:.11456717240000215},{x:-.08406855179369971,y:.11603956239660215},{x:-.0843087782935997,y:.11751161896480215},{x:-.08455228665789971,y:.11898332341220215},{x:-.0847991072447997,y:.12045465704640215},{x:-.08504927041249971,y:.12192560117500215},{x:-.0853028065191997,y:.12339613710560214},{x:-.08555974592309973,y:.12486624614580213},{x:-.08582011898239973,y:.12633590960320215},{x:-.08608395605529973,y:.12780510878540213},{x:-.08635128749999971,y:.1292738250000021},{x:-.08662214367469973,y:.1307420395546021},{x:-.08689655493759973,y:.1322097337568021},{x:-.08717455164689972,y:.13367688891420207},{x:-.08745616416079972,y:.13514348633440207},{x:-.08774142283749972,y:.13660950732500204},{x:-.08803035803519974,y:.13807493319360203},{x:-.08832300011209973,y:.13953974524780205},{x:-.08861937942639975,y:.14100392479520202},{x:-.08891952633629974,y:.14246745314340203},{x:-.08922347119999974,y:.14393031160000203},{x:-.08953124437569973,y:.145392481472602},{x:-.08984287622159975,y:.14685394406880198},{x:-.09015839709589976,y:.148314680696202},{x:-.09047783735679976,y:.149774672662402},{x:-.09080122736249976,y:.15123390127500197},{x:-.09112859747119977,y:.15269234784160193},{x:-.09145997804109976,y:.15414999366980195},{x:-.09179539943039977,y:.15560682006720195},{x:-.09213489199729977,y:.1570628083414019},{x:-.09247848609999976,y:.1585179398000019},{x:-.09282621209669975,y:.1599721957506019},{x:-.09317810034559978,y:.1614255575008019},{x:-.09353418120489977,y:.16287800635820185},{x:-.09389448503279976,y:.16432952363040182},{x:-.09425904218749978,y:.16578009062500182},{x:-.09462788302719977,y:.1672296886496018},{x:-.09500103791009978,y:.1686782990118018},{x:-.09537853719439979,y:.17012590301920177},{x:-.09576041123829979,y:.17157248197940175},{x:-.09614669039999979,y:.17301801720000176},{x:-.09653740503769978,y:.17446248998860173},{x:-.0969325855095998,y:.17590588165280172},{x:-.09733226217389979,y:.17734817350020168},{x:-.09773646538879979,y:.1787893468384017},{x:-.0981452255124998,y:.18022938297500168},{x:-.0985585729031998,y:.18166826321760166},{x:-.09897653791909979,y:.1831059688738016},{x:-.09939915091839979,y:.1845424812512016},{x:-.0998264422592998,y:.1859777816574016},{x:-.1002584422999998,y:.1874118514000016},{x:-.1006951813986998,y:.18884467178660155},{x:-.1011366899135998,y:.19027622412480152},{x:-.10158299820289979,y:.19170648972220153},{x:-.1020341366247998,y:.1931354498864015},{x:-.1024901355374998,y:.1945630859250015},{x:-.1029510252991998,y:.19598937914560147},{x:-.10341683626809982,y:.19741431085580147},{x:-.1038875988023998,y:.19883786236320142},{x:-.1043633432602998,y:.20026001497540138},{x:-.10484409999999977,y:.2016807500000013},{x:-.10484409999999977,y:.2016807500000013},{x:-.10512829034499978,y:.20251255364660126},{x:-.10541452131999979,y:.2033439212528012},{x:-.10570279283499981,y:.2041748478182012},{x:-.10599310479999982,y:.20500532834240115},{x:-.10628545712499982,y:.20583535782500112},{x:-.10657984971999983,y:.20666493126560112},{x:-.10687628249499985,y:.2074940436638011},{x:-.10717475535999986,y:.20832269001920106},{x:-.10747526822499989,y:.2091508653314011},{x:-.1077778209999999,y:.20997856460000103},{x:-.10808241359499988,y:.21080578282460102},{x:-.10838904591999989,y:.21163251500480096},{x:-.10869771788499989,y:.212458756140201},{x:-.10900842939999988,y:.21328450123040094},{x:-.10932118037499987,y:.21410974527500093},{x:-.10963597071999989,y:.21493448327360093},{x:-.10995280034499992,y:.21575871022580093},{x:-.1102716691599999,y:.2165824211312009},{x:-.1105925770749999,y:.21740561098940095},{x:-.11091552399999992,y:.21822827480000093},{x:-.1112405098449999,y:.2190504075626009},{x:-.11156753451999993,y:.21987200427680093},{x:-.11189659793499994,y:.22069305994220095},{x:-.11222769999999993,y:.22151356955840096},{x:-.11256084062499995,y:.222333528125001},{x:-.11289601971999996,y:.223152930641601},{x:-.11323323719499996,y:.223971772107801},{x:-.11357249295999995,y:.22479004752320103},{x:-.11391378692499997,y:.22560775188740104},{x:-.11425711899999995,y:.22642488020000104},{x:-.11460248909499995,y:.22724142746060105},{x:-.11494989711999995,y:.2280573886688011},{x:-.11529934298499996,y:.22887275882420108},{x:-.11565082659999995,y:.22968753292640107},{x:-.11600434787499994,y:.23050170597500114},{x:-.11635990671999996,y:.23131527296960114},{x:-.11671750304499996,y:.23212822890980117},{x:-.11707713675999995,y:.23294056879520117},{x:-.11743880777499995,y:.2337522876254012},{x:-.11780251599999993,y:.2345633804000012},{x:-.11816826134499994,y:.23537384211860124},{x:-.11853604371999993,y:.23618366778080127},{x:-.11890586303499992,y:.2369928523862013},{x:-.11927771919999992,y:.23780139093440128},{x:-.11965161212499995,y:.23860927842500138},{x:-.12002754171999992,y:.23941650985760138},{x:-.12040550789499993,y:.24022308023180142},{x:-.12078551055999992,y:.24102898454720142},{x:-.12116754962499991,y:.24183421780340145},{x:-.12155162499999989,y:.24263877500000142},{x:-.1219377365949999,y:.2434426511366015},{x:-.1223258843199999,y:.2442458412128015},{x:-.1227160680849999,y:.24504834022820154},{x:-.12310828779999988,y:.24585014318240156},{x:-.12350254337499987,y:.24665124507500158},{x:-.12389883471999988,y:.24745164090560162},{x:-.12429716174499987,y:.24825132567380165},{x:-.12469752435999987,y:.2490502943792017},{x:-.12509992247499988,y:.2498485420214017},{x:-.12550435599999984,y:.25064606360000175},{x:-.12591082484499985,y:.25144285411460177},{x:-.12631932891999986,y:.2522389085648018},{x:-.12672986813499987,y:.25303422195020187},{x:-.12714244239999986,y:.25382878927040187},{x:-.12755705162499986,y:.25462260552500193},{x:-.12797369571999986,y:.25541566571360197},{x:-.12839237459499983,y:.256207964835802},{x:-.12881308815999984,y:.256999497891202},{x:-.12923583632499985,y:.2577902598794021},{x:-.12966061899999984,y:.2585802458000021},{x:-.13008743609499984,y:.25936945065260214},{x:-.13051628751999986,y:.2601578694368022},{x:-.13094717318499982,y:.26094549715220217},{x:-.13138009299999984,y:.26173232879840225},{x:-.13181504687499984,y:.2625183593750023},{x:-.13225203471999986,y:.2633035838816023},{x:-.13269105644499984,y:.26408799731780236},{x:-.13313211195999985,y:.26487159468320237},{x:-.13357520117499982,y:.2656543709774024},{x:-.13402032399999986,y:.26643632120000244},{x:-.13446748034499983,y:.26721744035060246},{x:-.13491667011999983,y:.26799772342880246},{x:-.13536789323499984,y:.2687771654342025},{x:-.13582114959999986,y:.2695557613664026},{x:-.13627643912499987,y:.27033350622500263},{x:-.13673376171999985,y:.27111039500960266},{x:-.13719311729499983,y:.2718864227198026},{x:-.13765450575999985,y:.2726615843552027},{x:-.13811792702499986,y:.2734358749154028},{x:-.1385833809999999,y:.2742092894000028},{x:-.13905086759499988,y:.2749818228086028},{x:-.1395203867199999,y:.2757534701408028},{x:-.1399919382849999,y:.27652422639620283},{x:-.14046552219999991,y:.27729408657440285},{x:-.1409411383749999,y:.2780630456750029},{x:-.1414187867199999,y:.2788310986976029},{x:-.14189846714499993,y:.27959824064180294},{x:-.14238017955999993,y:.2803644665072029},{x:-.1428639238749999,y:.28112977129340294},{x:-.1433496999999999,y:.28189415000000295}],color:"primary",fill:!1},"rect1577-4":{type:"path",points:[{x:.26345180000000035,y:.2455934500000012},{x:.12298460000000011,y:.2455934500000012},{x:.12298460000000011,y:.2505664500000009},{x:.26345180000000035,y:.2505664500000009}],color:"primary",fill:!0},"rect1577-4-7":{type:"path",points:[{x:.19576130000000003,y:.31834525000000014},{x:.19576130000000003,y:.17787805000000034},{x:.1907882999999999,y:.17787805000000034},{x:.1907882999999999,y:.31834525000000014}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.012864499999999612,y:.4200086500000033},bottom1:{type:"text",text:"{VAL}",x:-.003850499999999979,y:-.42000864999999976}},refblocks:{left1:{x:-.5353954999999995,y:.016380250000000984},right1:{x:.4511331000000005,y:.016926950000001995}},bounds:{minX:-.579367741,maxX:.579367741,minY:-.42000864999999976,maxY:.4200086500000033,width:1.158735482,height:.8400173000000031,centerX:0,centerY:17763568394002505e-31},circles:{}},{paths:hxt,texts:G5n,bounds:tO,refblocks:w5e,circles:mxt}=wY,vxt=l0({primitives:[...Object.values(hxt),...Object.values(mxt),{type:"text",text:"{REF}",x:-.2,y:.2094553499999995},{type:"text",text:"{VAL}",x:.3,y:.2094553499999995}],ports:[{...w5e.left1,labels:["1"]},{...w5e.right1,labels:["2"]}],size:{width:tO.width,height:tO.height},center:{x:tO.centerX,y:tO.centerY}}).changeTextAnchor("{VAL}","top_left").rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","bottom_left").build(),E5e=l0(wY).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),yxt=l0(E5e).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_top").build(),{paths:gxt,texts:q5n,bounds:nO,refblocks:T5e,circles:_xt}=wY,xxt=l0({primitives:[...Object.values(gxt),...Object.values(_xt),{type:"text",text:"{REF}",x:.1,y:-.2094553499999995},{type:"text",text:"{VAL}",x:-.2,y:-.2094553499999995}],ports:[{...T5e.left1,labels:["1"]},{...T5e.right1,labels:["2"]}],size:{width:nO.width,height:nO.height},center:{x:nO.centerX,y:nO.centerY}}).changeTextAnchor("{VAL}","top_left").rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","bottom_left").build(),bxt=l0(JL).rotateRightFacingSymbol("right").changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:Sxt,texts:Y5n,bounds:rO,refblocks:M5e,circles:wxt}=JL,Ext=l0({primitives:[...Object.values(Sxt),...Object.values(wxt),{type:"text",text:"{REF}",x:.2,y:-.2094553499999995},{type:"text",text:"{VAL}",x:-.2,y:-.2094553499999995}],ports:[{...M5e.left1,labels:["1"]},{...M5e.right1,labels:["2"]}],size:{width:rO.width,height:rO.height},center:{x:rO.centerX,y:rO.centerY}}).changeTextAnchor("{VAL}","top_left").rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","bottom_left").build(),C5e={paths:{path11:{type:"path",points:[{x:-.5274831500000005,y:.02897970000000072},{x:-.30105415000000013,y:.02897970000000072}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.2932119499999999,y:.02897970000000072},{x:.5339524499999997,y:.02897970000000072}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.2932119499999999,y:.2923763000000008},{x:.2932119499999999,y:-.23441689999999937}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.021208049999999812,y:.3692298999999999},bottom1:{type:"text",text:"{VAL}",x:-.00661455000000033,y:-.3692298999999999}},refblocks:{left1:{x:-.5413984499999998,y:.028126900000000177},right1:{x:.54139845,y:.029123299999999963}},bounds:{minX:-.5695568909999997,maxX:.569556891,minY:-.3692298999999999,maxY:.3692298999999999,width:1.1391137819999997,height:.7384597999999998,centerX:11102230246251565e-32,centerY:0},circles:{path1:{type:"circle",x:-.0037626500000000895,y:.03610800000000025,radius:.28854213,color:"primary",fill:!1}}},Txt=l0(C5e).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),Mxt=l0(C5e).rotateRightFacingSymbol("down").changeTextAnchor("{VAL}","middle_right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").build(),Cxt={paths:{path27:{type:"path",points:[{x:.52188525,y:-.010083950000000286},{x:.1314137500000001,y:-.010083950000000286}],color:"primary",fill:!1},path29:{type:"path",points:[{x:.12501034999999971,y:.25449935000000146},{x:.12501035000000016,y:-.2746672499999985}],color:"primary",fill:!1},"path29-2":{type:"path",points:[{x:.07157854999999946,y:.253778650000001},{x:.07157854999999991,y:-.27538794999999716}],color:"primary",fill:!1},path30:{type:"path",points:[{x:-.13957305000000053,y:.25449935000000146},{x:-.1395730500000001,y:-.2746672499999985}],color:"primary",fill:!1},"path29-5":{type:"path",points:[{x:-.08349325000000052,y:.25541165000000277},{x:-.08349325000000007,y:-.27375494999999894}],color:"primary",fill:!1},"path29-2-7":{type:"path",points:[{x:.07147894999999993,y:.2552525499999998},{x:-.0829032500000002,y:.2552525499999998}],color:"primary",fill:!1},"path29-2-7-6":{type:"path",points:[{x:.07107315000000014,y:-.27817384999999817},{x:-.08330905,y:-.27817384999999817}],color:"primary",fill:!1},path43:{type:"path",points:[{x:-.21327535000000042,y:.31803495000000304},{x:.19712464999999968,y:.31807695}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.003324649999999707,y:.694594949999999},{x:.003324649999999707,y:.3310069500000008},{x:.003324649999999707,y:.3209089500000015}],color:"primary",fill:!1},"path43-8":{type:"path",points:[{x:-.21327535000000042,y:.3180639499999991},{x:-.21327535000000042,y:.2498769499999991}],color:"primary",fill:!1},"path43-8-8":{type:"path",points:[{x:.19712464999999968,y:.31807695},{x:.19712464999999968,y:.24987695000000443}],color:"primary",fill:!1},"path43-9":{type:"path",points:[{x:.19226054999999942,y:-.3468980499999983},{x:-.21813945000000068,y:-.3469400500000006}],color:"primary",fill:!1},"path44-0-5":{type:"path",points:[{x:-.024339450000000262,y:-.7234580499999996},{x:-.024339450000000262,y:-.3598700499999996},{x:-.024339450000000262,y:-.34977205000000033}],color:"primary",fill:!1},"path43-8-1":{type:"path",points:[{x:.19226054999999942,y:-.3469270499999997},{x:.19226054999999942,y:-.2787400499999979}],color:"primary",fill:!1},"path43-8-8-9":{type:"path",points:[{x:-.21813955000000096,y:-.34694015},{x:-.21813955000000096,y:-.27874015000000085}],color:"primary",fill:!1},path28:{type:"path",points:[{x:-.14368304999999992,y:-.010083950000000286},{x:-.5364480500000002,y:-.010083950000000286}],color:"primary",fill:!1}},texts:{left1:{type:"text",text:"{REF}",x:-.38155925000000046,y:.09576035000000083},right1:{type:"text",text:"{VAL}",x:.3369813499999994,y:-.17868404999999754}},refblocks:{top1:{x:.0032092499999998303,y:.7114137500000002},bottom1:{x:-.02355145000000025,y:-.7114137500000002},left1:{x:-.5415391500000004,y:-.00607074999999746},right1:{x:.5415391499999997,y:-.012221549999997805}},bounds:{minX:-.5696975910000004,maxX:.5696975909999997,minY:-.7395721910000002,maxY:.7395721910000002,width:1.1393951820000001,height:1.4791443820000003,centerX:-33306690738754696e-32,centerY:0},circles:{}},R5e=l0(Cxt).labelPort("top1",["2","gnd1"]).labelPort("bottom1",["4","gnd2"]).labelPort("left1",["1"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","bottom_right").changeTextAnchor("{VAL}","top_left").build(),Rxt=l0(R5e).rotateRightFacingSymbol("up").changeTextAnchor("{REF}","top_right").changeTextAnchor("{VAL}","bottom_left").build(),A5e={paths:{path27:{type:"path",points:[{x:.5229378000000002,y:-.012283099999995883},{x:.13246630000000037,y:-.012283099999995883}],color:"primary",fill:!1},path28:{type:"path",points:[{x:-.14263049999999966,y:-.012283099999995883},{x:-.5353954999999999,y:-.012283099999995883}],color:"primary",fill:!1},path29:{type:"path",points:[{x:.12606289999999998,y:-.2768663999999976},{x:.12606290000000042,y:.2523002000000023}],color:"primary",fill:!1},"path29-2":{type:"path",points:[{x:.07263109999999973,y:-.27614569999999716},{x:.07263110000000017,y:.253020900000001}],color:"primary",fill:!1},path30:{type:"path",points:[{x:-.13852050000000027,y:-.2768663999999976},{x:-.13852049999999982,y:.2523002000000023}],color:"primary",fill:!1},"path29-5":{type:"path",points:[{x:-.08244070000000026,y:-.27777869999999893},{x:-.08244069999999981,y:.2513879000000028}],color:"primary",fill:!1},"path29-2-7":{type:"path",points:[{x:.07253150000000019,y:-.27761959999999597},{x:-.08185069999999994,y:-.27761959999999597}],color:"primary",fill:!1},"path29-2-7-6":{type:"path",points:[{x:.0721257000000004,y:.255806800000002},{x:-.08225649999999973,y:.255806800000002}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.012864500000000056,y:-.4150086999999978},bottom1:{type:"text",text:"{VAL}",x:-.003850500000000423,y:.4250087000000011}},refblocks:{left1:{x:-.5512093000000002,y:-.011380399999998403},right1:{x:.5512093,y:-.011926899999997076}},bounds:{minX:-.5793677410000002,maxX:.579367741,minY:-.5150086999999978,maxY:.4250087000000011,width:1.1587354820000002,height:1,centerX:-11102230246251565e-32,centerY:-.04499999999999832},circles:{}},Axt=l0(A5e).changeTextAnchor("{VAL}","middle_bottom").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_top").build(),Pxt=l0(A5e).rotateRightFacingSymbol("down").changeTextAnchor("{VAL}","middle_left").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_right").build(),EY={paths:{path11:{type:"path",points:[{x:1.9942486145,y:-1.6422072295000003},{x:2.0984258145,y:-1.6428272295000004}],color:"primary",fill:!1},"path40-0":{type:"path",points:[{x:2.1030704145000003,y:-1.4809259295000001},{x:2.1026604145,y:-1.8041042295}],color:"primary",fill:!1},"path40-0-5":{type:"path",points:[{x:2.2218770145,y:-1.4969414295},{x:2.1063461145,y:-1.5757354295000003}],color:"primary",fill:!1},"path40-0-5-0":{type:"path",points:[{x:2.2286252145,y:-1.7819395295000002},{x:2.1136540145000002,y:-1.7033263295}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:2.2273251145,y:-1.4948802295},{x:2.2284101145,y:-1.1518438295000002}],color:"primary",fill:!1},"path12-1-5-3":{type:"path",points:[{x:2.2276017145,y:-1.9567437295},{x:2.2281317145,y:-1.7888340295000003}],color:"primary",fill:!1},"arrow-2":{type:"path",points:[{x:2.1704797145,y:-1.6991380295000003},{x:2.1275815145,y:-1.7604028295000003},{x:2.1917009144999997,y:-1.7601828295000004},{x:2.1704797145,y:-1.6991380295000003}],color:"primary",fill:!0},path1:{type:"path",points:[{x:1.5978828145000001,y:-1.5020091295000002},{x:1.8597023145000002,y:-1.5035561295000002}],color:"primary",fill:!1},path2:{type:"path",points:[{x:1.8686937145000002,y:-1.3411936295000002},{x:1.8682837145,y:-1.6643719295000001}],color:"primary",fill:!1},path3:{type:"path",points:[{x:1.9875004145000004,y:-1.3572092295000002},{x:1.8719693145,y:-1.4360031295000002}],color:"primary",fill:!1},path4:{type:"path",points:[{x:1.9942486145,y:-1.6422072295000003},{x:1.8792773145000001,y:-1.5635940295000004}],color:"primary",fill:!1},"arrow-1":{type:"path",points:[{x:1.9361028144999999,y:-1.5594057295000003},{x:1.8932048145,y:-1.6206705295000003},{x:1.9573242144999998,y:-1.6204505295000005},{x:1.9361028144999999,y:-1.5594057295000003}],color:"primary",fill:!0},path9:{type:"path",points:[{x:1.9943087144999998,y:-1.3539494295000003},{x:2.2269582145,y:-1.3556534295000002}],color:"primary",fill:!1}},texts:{bottom1:{type:"text",text:"{VAL}",x:1.8805772145,y:-1.9423669295000003},right1:{type:"text",text:"{REF}",x:1.8845380145,y:-1.1387692295000003}},refblocks:{right1:{x:2.2278617145000004,y:-1.9651412295000004},right2:{x:1.5977076145000002,y:-1.5027827295000002},right3:{x:2.2278680145,y:-1.1403971295000002}},bounds:{minX:1.5810976555000003,maxX:2.3461148445,minY:-1.9817511885000003,maxY:-1.1237871705000002,width:.7650171889999999,height:.8579640180000001,centerX:1.9636062500000002,centerY:-1.5527691795000003},circles:{"path1-0":{type:"circle",x:2.0463372145000003,y:-1.5363384295000002,radius:.29977763,color:"primary",fill:!1}}},Nxt=l0(EY).changeTextAnchor("{VAL}","middle_top").labelPort("right2",["1"]).labelPort("right3",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_bottom").build();EY.bounds.width+=.3;var Dxt=l0(EY).rotateRightFacingSymbol("down").changeTextAnchor("{VAL}","middle_right").labelPort("right2",["1"]).labelPort("right3",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_left").build(),Lxt={paths:{path11:{type:"path",points:[{x:-.5307178,y:0},{x:-.3042887999999997,y:0}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.2899773000000003,y:0},{x:.5307178000000001,y:0}],color:"primary",fill:!1},path2:{type:"path",points:[{x:-.12447409999999959,y:.0852510999999998},{x:.11626639999999999,y:.0852510999999998}],color:"primary",fill:!1}},texts:{left1:{type:"text",text:"A",x:0,y:-.1}},refblocks:{left1:{x:-.5446330999999993,y:0},right1:{x:.5381638000000004,y:0}},bounds:{width:1.0614356000000003,height:1,centerX:5551115123125783e-32,centerY:-11102230246251565e-32},circles:{path1:{type:"circle",x:0,y:0,radius:.28854213,color:"primary",fill:!1}}},{paths:Oxt,texts:zxt,bounds:iO,refblocks:P5e,circles:Uxt}=Lxt,TY=Bm({primitives:[...Object.values(Oxt),...Object.values(Uxt),{type:"text",text:"{REF}",x:0,y:-.3594553499999995,anchor:"middle_top"},{type:"text",text:"{VAL}",x:0,y:.35,anchor:"middle_bottom"},{...zxt.left1,x:0,y:.01,anchor:"center",fontSize:.3}],ports:[{...P5e.left1,labels:["1"]},{...P5e.right1,labels:["2"]}],size:{width:iO.width,height:iO.height},center:{x:iO.centerX,y:iO.centerY}});function kxt(n){return typeof n=="object"&&n!==null&&n.type==="path"&&Array.isArray(n.points)&&typeof n.color=="string"}function Ixt(n){return typeof n=="object"&&n!==null&&n.type==="text"&&typeof n.text=="string"&&typeof n.x=="number"&&typeof n.y=="number"&&typeof n.anchor=="string"}var{6:MY,2:CY,...Fxt}=TY.primitives;kxt(CY)&&CY.points.map(n=>{n.y+=.05}),Ixt(MY)&&(MY.y+=.025);function Bxt(n){return typeof n=="object"}var N5e=Cl({...TY,primitives:Object.values(Fxt).filter(Bxt)}),jxt={...N5e,primitives:[...N5e.primitives,MY,CY]},Hxt={paths:{path11:{type:"path",points:[{x:-.5307178,y:0},{x:-.3042887999999997,y:0}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.2899773000000003,y:0},{x:.5307178000000001,y:0}],color:"primary",fill:!1},"path11-5-5":{type:"path",points:[{x:.09442299999999992,y:-.13438304999999984},{x:-.004364400000000712,y:.05710404999999996},{x:-.1110211000000012,y:-.13438304999999984}],color:"primary",fill:!1},path2:{type:"path",points:[{x:-.12447409999999959,y:.13438304999999984},{x:.11626639999999999,y:.13438304999999984}],color:"primary",fill:!1}},refblocks:{left1:{x:-.5446330999999993,y:0},right1:{x:.5381638000000004,y:0}},bounds:{width:1.0614356000000003,height:1,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:0,radius:.28854213,color:"primary",fill:!1}}},{paths:Vxt,bounds:aO,refblocks:D5e,circles:$xt}=Hxt,RY=Bm({primitives:[...Object.values(Vxt),...Object.values($xt),{type:"text",text:"{REF}",x:0,y:-.3594553499999995,anchor:"middle_top"},{type:"text",text:"{VAL}",x:0,y:.35,anchor:"middle_bottom"}],ports:[{...D5e.left1,labels:["1"]},{...D5e.right1,labels:["2"]}],size:{width:aO.width,height:aO.height},center:{x:aO.centerX,y:aO.centerY}}),{2:Gxt,3:qxt,...Yxt}=RY.primitives;function Xxt(n){return typeof n=="object"}var L5e=Cl({...RY,primitives:Object.values(Yxt).filter(Xxt)}),Wxt={...L5e,primitives:[...L5e.primitives,Gxt,qxt]},Zxt={paths:{path11:{type:"path",points:[{x:-.5176700499999997,y:.041745050000000505},{x:-.10888805000000024,y:.041745050000000505}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.1031184499999993,y:.041745050000000505},{x:.5246894499999994,y:.041745050000000505}],color:"primary",fill:!1},"path11-0":{type:"path",points:[{x:-.09343985000000021,y:-.14620634999999882},{x:-.0930998500000002,y:.2583405500000009}],color:"primary",fill:!1},"path11-0-3":{type:"path",points:[{x:.08519034999999908,y:-.14503384999999902},{x:.08553034999999909,y:.2595130500000007}],color:"primary",fill:!1},"path11-0-9":{type:"path",points:[{x:-.08315755000000014,y:.055934450000000524},{x:-.08415755000000047,y:-.14678124999999964},{x:.08653524999999984,y:-.05104664999999953},{x:-.08126175000000035,y:.05647715000000031}],color:"primary",fill:!0},"path11-0-9-0":{type:"path",points:[{x:.07661224999999927,y:.256654450000001},{x:.07761224999999983,y:.05393885000000109},{x:-.0930805500000007,y:.1496734500000012},{x:.07471644999999949,y:.25719715000000143}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.0316381500000007,y:.41683614999999996},bottom1:{type:"text",text:"{VAL}",x:-.03022294999999975,y:-.41683614999999996}},refblocks:{left1:{x:-.54139845,y:.04089205000000051},right1:{x:.5413984499999995,y:.04188845000000008}},bounds:{minX:-.569556891,maxX:.5695568909999995,minY:-.41683614999999996,maxY:.41683614999999996,width:1.1391137819999995,height:.8336722999999999,centerX:-2220446049250313e-31,centerY:0},circles:{path1:{type:"circle",x:-.0037626500000003116,y:.048873150000000365,radius:.28854213,color:"primary",fill:!1}}},O5e=l0(Zxt).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),z5e=Cl(O5e),U5e=z5e.primitives.filter(n=>n.type==="text"),Qxt=U5e.find(n=>n.text==="{REF}"),Kxt=U5e.find(n=>n.text==="{VAL}");Qxt.y=0,Kxt.y=0;var Jxt=z5e,e2t={paths:{path40:{type:"path",points:[{x:.14458890000000002,y:.04403629999999836},{x:-.1199943999999995,y:-.08825540000000132}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.1199943999999995,y:.1763280000000016},{x:.14458890000000002,y:.04403629999999836}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.1199943999999995,y:-.08825539999999776},{x:-.1199943999999995,y:.1763280000000016}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.14458890000000002,y:.1763280000000016},{x:.14458890000000002,y:-.08825539999999776}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.12219909999999956,y:.04403629999999836},{x:-.5168693999999996,y:.04403629999999836}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.5233797,y:.04395110000000102},{x:.14967160000000002,y:.04395110000000102}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.0050250999999996715,y:.27384529999999785},bottom1:{type:"text",text:"{VAL}",x:-.00011179999999999524,y:-.2738453000000014}},refblocks:{left1:{x:-.5191471000000001,y:.0449206999999987},right1:{x:.5191471000000001,y:.043896100000001326}},bounds:{minX:-.5473055410000001,maxX:.5473055410000001,minY:-.2738453000000014,maxY:.27384529999999785,width:1.0946110820000001,height:.5476905999999993,centerX:0,centerY:-17763568394002505e-31},circles:{}},oO=l0(e2t).labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),t2t=Cl(oO,"down"),n2t=Cl(oO,"left"),r2t=Cl(oO,"up"),i2t={paths:{path1:{type:"path",points:[{x:-.3543580999999998,y:.22373490000000018},{x:-.1279290999999998,y:.22373490000000018}],color:"primary",fill:!1},"path-1-2":{type:"path",points:[{x:-.07134165999999999,y:.215546000000001},{x:.1083980000000001,y:.16078}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.10434800000000011,y:.127178},{x:.345089,y:.127178}],color:"primary",fill:!1},path3:{type:"path",points:[{x:.12008600000000014,y:.36383770000000015},{x:.360827,y:.36383770000000015}],color:"primary",fill:!1},path4:{type:"path",points:[{x:-.3543580999999998,y:-.17811849999999985},{x:-.1279290999999998,y:-.17811849999999985}],color:"primary",fill:!1},"path4-5":{type:"path",points:[{x:-.07134165999999999,y:-.1867987999999997},{x:.10434800000000011,y:-.2376754}],color:"primary",fill:!1},path5:{type:"path",points:[{x:.10434800000000011,y:-.2746754},{x:.345089,y:-.2746754}],color:"primary",fill:!1},path6:{type:"path",points:[{x:.12008600000000014,y:-.038015699999999875},{x:.360827,y:-.038015699999999875}],color:"primary",fill:!1},"path1-4-join":{type:"path",points:[{x:-.001896399999999815,y:-.19827304999999998},{x:-.001896399999999815,y:.190981}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.5644774000000002},bottom1:{type:"text",text:"{VAL}",x:0,y:-.4244773999999998}},refblocks:{left1:{x:-.3682734999999999,y:.22373490000000018},left2:{x:-.3682734999999999,y:-.17811849999999985},right1:{x:.36827350000000014,y:.36383770000000015},right2:{x:.36827350000000014,y:.12717810000000007},right3:{x:.36827350000000014,y:-.038015699999999875},right5:{x:.36827350000000014,y:-.2746754}},bounds:{minX:-.3964319409999999,maxX:.3964319410000001,minY:-.4744773999999998,maxY:.5644774000000002,width:1,height:1.0389548,centerX:-11102230246251565e-32,centerY:.045000000000000207},circles:{"circle-2":{type:"circle",x:.08200307499999998,y:.127178,radius:.023193523,color:"primary",fill:!1},"circle-5":{type:"circle",x:.08200307499999998,y:-.2745079499999997,radius:.023193523,color:"primary",fill:!1},"circle-3":{type:"circle",x:.08200307499999998,y:.369178,radius:.023193523,color:"primary",fill:!1},"circle-6":{type:"circle",x:.08200307499999998,y:-.03805079499999997,radius:.023193523,color:"primary",fill:!1},"circle-1":{type:"circle",x:-.10003074999999978,y:.219178,radius:.023193523,color:"primary",fill:!1},"circle-4":{type:"circle",x:-.10003074999999978,y:-.18250794999999972,radius:.023193523,color:"primary",fill:!1}}},sO=l0(i2t).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(),AY=Cl(sO,"down"),PY=AY.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),NY=AY.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");PY.anchor="middle_bottom",NY.anchor="middle_top",PY.x=0,PY.y+=.537,NY.y-=.5375,NY.x=0;var a2t=AY,DY=Cl(sO,"left"),LY=DY.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),OY=DY.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");LY.anchor="middle_bottom",OY.anchor="middle_top",LY.x=0,LY.y+=1,OY.y-=1,OY.x=0;var o2t=DY,zY=Cl(sO,"up"),UY=zY.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),kY=zY.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");UY.anchor="middle_bottom",kY.anchor="middle_top",UY.x=0,UY.y+=.537,kY.y-=.5375,kY.x=0;var s2t=zY,l2t={paths:{path1:{type:"path",points:[{x:-.3543580999999998,y:.22373490000000018},{x:-.1279290999999998,y:.22373490000000018}],color:"primary",fill:!1},"path-1-3":{type:"path",points:[{x:-.0741659999999987,y:.2290546000000001},{x:.1091012,y:.334}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.10434800000000011,y:.127178},{x:.345089,y:.127178}],color:"primary",fill:!1},path3:{type:"path",points:[{x:.12008600000000014,y:.36383770000000015},{x:.360827,y:.36383770000000015}],color:"primary",fill:!1},path4:{type:"path",points:[{x:-.3543580999999998,y:-.17811849999999985},{x:-.1279290999999998,y:-.17811849999999985}],color:"primary",fill:!1},"path4-6":{type:"path",points:[{x:-.0741659999999987,y:-.1777987999999997},{x:.1091012,y:-.07370029999999998}],color:"primary",fill:!1},path5:{type:"path",points:[{x:.10434800000000011,y:-.2746754},{x:.345089,y:-.2746754}],color:"primary",fill:!1},path6:{type:"path",points:[{x:.12008600000000014,y:-.038015699999999875},{x:.360827,y:-.038015699999999875}],color:"primary",fill:!1},"path1-4-join":{type:"path",points:[{x:-.000896399999999815,y:-.12190304999999999},{x:-.000896399999999815,y:.2708100000000002}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.6144774000000003},bottom1:{type:"text",text:"{VAL}",x:0,y:-.5244773999999998}},refblocks:{left1:{x:-.3682734999999999,y:.22373490000000018},left2:{x:-.3682734999999999,y:-.17811849999999985},right1:{x:.36827350000000014,y:.36383770000000015},right2:{x:.36827350000000014,y:.12717810000000007},right3:{x:.36827350000000014,y:-.038015699999999875},right5:{x:.36827350000000014,y:-.2746754}},bounds:{minX:-.3964319409999999,maxX:.3964319410000001,minY:-.4744773999999998,maxY:.5644774000000002,width:1,height:1.0389548,centerX:-11102230246251565e-32,centerY:.045000000000000207},circles:{"circle-2":{type:"circle",x:.08200307499999998,y:.127178,radius:.023193523,color:"primary",fill:!1},"circle-5":{type:"circle",x:.08200307499999998,y:-.2745079499999997,radius:.023193523,color:"primary",fill:!1},"circle-3":{type:"circle",x:.08200307499999998,y:.369178,radius:.023193523,color:"primary",fill:!1},"circle-6":{type:"circle",x:.08200307499999998,y:-.03805079499999997,radius:.023193523,color:"primary",fill:!1},"circle-1":{type:"circle",x:-.10003074999999978,y:.219178,radius:.023193523,color:"primary",fill:!1},"circle-4":{type:"circle",x:-.10003074999999978,y:-.18250794999999972,radius:.023193523,color:"primary",fill:!1}}},lO=l0(l2t).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(),IY=Cl(lO,"down"),FY=IY.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),BY=IY.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");FY.anchor="middle_bottom",BY.anchor="middle_top",FY.x=0,FY.y+=.565,BY.y-=.555,BY.x=0;var c2t=IY,jY=Cl(lO,"left"),HY=jY.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),VY=jY.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");HY.anchor="middle_bottom",VY.anchor="middle_top",HY.x=0,HY.y+=1.09,VY.y-=1.09,VY.x=0;var u2t=jY,$Y=Cl(lO,"up"),GY=$Y.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),qY=$Y.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");GY.anchor="middle_bottom",qY.anchor="middle_top",GY.x=0,GY.y+=.565,qY.y-=.555,qY.x=0;var f2t=$Y,d2t={paths:{path11:{type:"path",points:[{x:-.3622268000000006,y:.06287995000000057},{x:-.1357978000000004,y:.06287995000000057}],color:"primary",fill:!1},"path11-0":{type:"path",points:[{x:-.08700995000000007,y:.06634945000000092},{x:.11099564000000006,y:.1105995000000057}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.12795640000000064,y:.06287995000000057},{x:.36869780000000096,y:.06287995000000057}],color:"primary",fill:!1},"path11-5":{type:"path",points:[{x:-.3622270999999999,y:-.16866424999999907},{x:-.1357980999999997,y:-.16866424999999907}],color:"primary",fill:!1},"path11-0-3":{type:"path",points:[{x:-.08700995000000007,y:-.17019474999999962},{x:.11099564000000006,y:-.12466424999999907}],color:"primary",fill:!1},"path12-0":{type:"path",points:[{x:.12795610000000002,y:-.16866424999999907},{x:.3686968000000006,y:-.16866424999999907}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.30716265000000004},bottom1:{type:"text",text:"{VAL}",x:0,y:-.30716265000000004}},refblocks:{left1:{x:-.37614279999999956,y:-.16951715000000012},left3:{x:-.37614279999999956,y:.06202735000000037},right1:{x:.37614279999999933,y:-.16852074999999966},right3:{x:.37614279999999933,y:.06302374999999993}},bounds:{minX:-.40430124099999953,maxX:.4043012409999993,minY:-.39716264999999984,maxY:.39716265000000006,width:.8086024819999988,height:.7943252999999999,centerX:-11102230246251565e-32,centerY:11102230246251565e-32},circles:{"circle-4":{type:"circle",x:.09900307499999998,y:.06478,radius:.023193523,color:"primary",fill:!1},"circle-2":{type:"circle",x:.09900307499999998,y:-.16978,radius:.023193523,color:"primary",fill:!1},"circle-3":{type:"circle",x:-.11003074999999977,y:.06478,radius:.023193523,color:"primary",fill:!1},"circle-1":{type:"circle",x:-.11003074999999977,y:-.16978,radius:.023193523,color:"primary",fill:!1}}},cO=l0(d2t).labelPort("left1",["1"]).labelPort("right1",["2"]).labelPort("right3",["4"]).labelPort("left3",["3"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),YY=Cl(cO,"down"),XY=YY.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),WY=YY.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");XY.anchor="middle_bottom",WY.anchor="middle_top",XY.x=.4,XY.y+=.265,WY.y-=.265,WY.x=.4;var p2t=YY,ZY=Cl(cO,"left"),QY=ZY.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),KY=ZY.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");QY.anchor="middle_bottom",KY.anchor="middle_top",QY.x=0,QY.y+=.67,KY.y-=.67,KY.x=0;var h2t=ZY,JY=Cl(cO,"up"),eX=JY.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),tX=JY.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");eX.anchor="middle_bottom",tX.anchor="middle_top",eX.x=.46,eX.y+=.265,tX.y-=.265,tX.x=.46;var m2t=JY,v2t={paths:{path11:{type:"path",points:[{x:-.3622268000000006,y:.06287995000000057},{x:-.1357978000000004,y:.06287995000000057}],color:"primary",fill:!1},"path11-0":{type:"path",points:[{x:-.08500995000000007,y:.06934945000000092},{x:.10307889999999986,y:.2010388500000011}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.12795640000000064,y:.06287995000000057},{x:.36869780000000096,y:.06287995000000057}],color:"primary",fill:!1},"path11-5":{type:"path",points:[{x:-.3622270999999999,y:-.16866424999999907},{x:-.1357980999999997,y:-.16866424999999907}],color:"primary",fill:!1},"path11-0-3":{type:"path",points:[{x:-.08500995000000007,y:-.16201947499999997},{x:.10307860000000058,y:-.03050534999999921}],color:"primary",fill:!1},"path12-0":{type:"path",points:[{x:.12795610000000002,y:-.16866424999999907},{x:.3686968000000006,y:-.16866424999999907}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.4171626500000001},bottom1:{type:"text",text:"{VAL}",x:0,y:-.41716264999999986}},refblocks:{left1:{x:-.37614279999999956,y:-.16951715000000012},left3:{x:-.37614279999999956,y:.06202735000000037},right1:{x:.37614279999999933,y:-.16852074999999966},right3:{x:.37614279999999933,y:.06302374999999993}},bounds:{minX:-.40430124099999953,maxX:.4043012409999993,minY:-.39716264999999984,maxY:.39716265000000006,width:.8086024819999988,height:.7943252999999999,centerX:-11102230246251565e-32,centerY:11102230246251565e-32},circles:{"circle-4":{type:"circle",x:.09900307499999998,y:.06478,radius:.023193523,color:"primary",fill:!1},"circle-2":{type:"circle",x:.09900307499999998,y:-.16978,radius:.023193523,color:"primary",fill:!1},"circle-3":{type:"circle",x:-.11003074999999977,y:.06478,radius:.023193523,color:"primary",fill:!1},"circle-1":{type:"circle",x:-.11003074999999977,y:-.16978,radius:.023193523,color:"primary",fill:!1}}},uO=l0(v2t).labelPort("left1",["1"]).labelPort("right1",["2"]).labelPort("right3",["4"]).labelPort("left3",["3"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),nX=Cl(uO,"down"),rX=nX.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),iX=nX.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");rX.anchor="middle_bottom",iX.anchor="middle_top",rX.x=.4,rX.y+=.295,iX.y-=.295,iX.x=.42;var y2t=nX,aX=Cl(uO,"left"),oX=aX.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),sX=aX.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");oX.anchor="middle_bottom",sX.anchor="middle_top",oX.x=0,oX.y+=.795,sX.y-=.795,sX.x=0;var g2t=aX,lX=Cl(uO,"up"),cX=lX.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),uX=lX.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");cX.anchor="middle_bottom",uX.anchor="middle_top",cX.x=.46,cX.y+=.315,uX.y-=.315,uX.x=.46;var _2t=lX,x2t={paths:{path11:{type:"path",points:[{x:-.541495829500001,y:.044368009536419395},{x:-.21998262950000114,y:.044368009536419395}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.14450697049999905,y:.052237309536419474},{x:.46379767049999976,y:.052237309536419474}],color:"primary",fill:!1},"path12-6":{type:"path",points:[{x:.13965347050000032,y:-.14937819046358025},{x:.13854747050000027,y:.2538388095364199}],color:"primary",fill:!1},"path11-0-9":{type:"path",points:[{x:-.212703829500001,y:.2732984095364195},{x:-.2147708295000006,y:-.1493854904635803},{x:.13782137049999887,y:.050231709536419755},{x:-.2087893295000005,y:.27442980953642016}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.08906882950000083,y:.38011220953641867},bottom1:{type:"text",text:"{VAL}",x:-.0685314901614209,y:-.38011220953641844},right1:{type:"text",text:"",x:.5884896704999998,y:-.3288545904635811}},refblocks:{left1:{x:-.5603312294999999,y:.04351520953641885},right1:{x:.47524967049999955,y:.05238090953641872}},bounds:{minX:-.5884896704999999,maxX:.5884896704999998,minY:-.38011220953641844,maxY:.38011220953641867,width:1.1769793409999996,height:.7602244190728371,centerX:-5551115123125783e-32,centerY:11102230246251565e-32},circles:{}},k5e=l0(x2t).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),b2t=Cl(k5e),S2t={paths:{path11:{type:"path",points:[{x:-.5307178,y:0},{x:-.3042887999999997,y:0}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.2899773000000003,y:0},{x:.5307178000000001,y:0}],color:"primary",fill:!1}},texts:{left1:{type:"text",text:"Hz",x:0,y:-.035}},refblocks:{left1:{x:-.5446330999999993,y:.000852800000000542},right1:{x:.5381638000000004,y:-.00014359999999924433}},bounds:{width:1.0614356000000003,height:1,centerX:5551115123125783e-32,centerY:0},circles:{path1:{type:"circle",x:-.006997299999999651,y:-.007128299999999532,radius:.28854213,color:"primary",fill:!1}}},{paths:w2t,texts:E2t,bounds:fO,refblocks:I5e,circles:T2t}=S2t,fX=Bm({primitives:[...Object.values(w2t),...Object.values(T2t),{type:"text",text:"{REF}",x:0,y:-.3594553499999995,anchor:"middle_top"},{type:"text",text:"{VAL}",x:0,y:.35,anchor:"middle_bottom"},{...E2t.left1,x:0,y:.01,anchor:"center",fontSize:.2}],ports:[{...I5e.left1,labels:["1"]},{...I5e.right1,labels:["2"]}],size:{width:fO.width,height:fO.height},center:{x:fO.centerX,y:fO.centerY}}),{5:M2t,...C2t}=fX.primitives;function R2t(n){return typeof n=="object"}var F5e=Cl({...fX,primitives:Object.values(C2t).filter(R2t)}),A2t={...F5e,primitives:[...F5e.primitives,M2t]},P2t={paths:{path10:{type:"path",points:[{x:-.5283037500000001,y:.036413650000000075},{x:.5300302500000003,y:.036413650000000075}],color:"primary",fill:!1},path14:{type:"path",points:[{x:.0008652499999994845,y:.16870534999999975},{x:.2654482499999995,y:.16870534999999975},{x:.2654482499999995,y:-.0958780499999996},{x:-.2637187499999998,y:-.0958780499999996},{x:-.2637187499999998,y:.16870534999999975},{x:.0008652499999994845,y:.16870534999999975}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.008263949999999909,y:.23591724999999997}},refblocks:{left1:{x:-.5345548500000001,y:.03946054999999937},right1:{x:.5345548500000001,y:.0352561499999986}},bounds:{width:1.1254265820000002,height:.47183449999999993,centerX:0,centerY:0}},{paths:N2t,texts:D2t,bounds:dO,refblocks:B5e}=P2t,j5e=Bm({primitives:[...Object.values(N2t),{...D2t.top1,anchor:"middle_bottom"},{type:"text",text:"{VAL}",x:0,y:-.2,anchor:"middle_top"}],ports:[{...B5e.left1,labels:["1"]},{...B5e.right1,labels:["2"]}],size:{width:dO.width,height:dO.height},center:{x:dO.centerX,y:dO.centerY}}),L2t=Cl(j5e),O2t={paths:{path1:{type:"path",points:[{x:-.33997010000000016,y:.4545300000000001},{x:-.03997010000000012,y:.4545300000000001}],color:"primary",fill:!1},path2:{type:"path",points:[{x:-.02032289999999981,y:.25053000000000014},{x:-.020322900000000033,y:.65053}],color:"primary",fill:!1},path3:{type:"path",points:[{x:.050000000000000044,y:.3005300000000002},{x:.050000000000000044,y:.60053}],color:"primary",fill:!1},path4:{type:"path",points:[{x:.1499999999999997,y:.40053000000000005},{x:.1499999999999997,y:.5005300000000001}],color:"primary",fill:!1}},refblocks:{top1:{x:-.33997010000000016,y:.4545300000000001}},circles:{}},{paths:z2t,circles:U2t,refblocks:k2t}=O2t,I2t=Bm({primitives:[...Object.values(z2t),...Object.values(U2t),{type:"text",text:"{REF}",x:-.1,y:.8,anchor:"middle_bottom"},{type:"text",text:"{VAL}",x:-.1,y:.1,anchor:"middle_top"}],ports:[{...k2t.top1,labels:["1"]}],size:{width:1,height:1},center:{x:0,y:.4}}),H5e=I2t,F2t=l0(H5e).rotateRightFacingSymbol("down").build(),dX={paths:{path11:{type:"path",points:[{x:-.49895505000000084,y:.035186950000000605},{x:-.177441850000001,y:.035186950000000605}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.18704774999999918,y:.043056250000000684},{x:.5063384499999999,y:.043056250000000684}],color:"primary",fill:!1},"path11-0-9":{type:"path",points:[{x:-.3067105499999998,y:.19836805000000046},{x:-.3084575500000002,y:-.10569684999999973},{x:-.01040014999999972,y:.03790115000000038},{x:-.3034011499999991,y:.1991819500000005}],color:"primary",fill:!0},"path11-0-9-5":{type:"path",points:[{x:.3324594500000002,y:.19920585000000046},{x:.33420945000000013,y:-.10485904999999973},{x:.03615254999999973,y:.03873895000000038},{x:.32915344999999974,y:.2000197500000005}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:.042716749999999415,y:.3158462499999999},bottom1:{type:"text",text:"{VAL}",x:.035355149999999336,y:-.3158462499999999}},refblocks:{left1:{x:-.5177904499999998,y:.03433415000000006},right1:{x:.5177904499999997,y:.04319984999999993}},bounds:{minX:-.5459488909999998,maxX:.5459488909999997,minY:-.3158462499999999,maxY:.3158462499999999,width:1.0918977819999993,height:.6316924999999998,centerX:-5551115123125783e-32,centerY:0},circles:{}},{paths:X5n,texts:W5n,bounds:Z5n,refblocks:Q5n,circles:K5n}=dX,B2t=l0(dX).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),j2t=l0(dX).rotateRightFacingSymbol("down").changeTextAnchor("{VAL}","middle_right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").build(),H2t={paths:{path45:{type:"path",points:[{x:.13585750000000063,y:-.003696399999999045},{x:-.12872579999999934,y:-.13598810000000228}],color:"primary",fill:!1},"path1-8":{type:"path",points:[{x:.12763670000000094,y:-.003920199999999596},{x:.3,y:-.003920199999999596}],color:"primary",fill:!1},path46:{type:"path",points:[{x:-.12872579999999934,y:.12859530000000063},{x:.13585750000000063,y:-.003696399999999045}],color:"primary",fill:!1},path47:{type:"path",points:[{x:-.12872579999999934,y:-.13598810000000228},{x:-.12872579999999934,y:.12859530000000063}],color:"primary",fill:!1},path48:{type:"path",points:[{x:.13585750000000063,y:.12859530000000063},{x:.13585750000000063,y:-.13598810000000228}],color:"primary",fill:!1},path49:{type:"path",points:[{x:-.13076959999999938,y:-.003696399999999045},{x:-.3,y:-.003696399999999045}],color:"primary",fill:!1},path25:{type:"path",points:[{x:-.1557438999999996,y:.28545279999999806},{x:-.2530861999999994,y:.3023319999999998},{x:-.21878339999999952,y:.20956920000000068}],color:"primary",fill:!0},path78:{type:"path",points:[{x:-.08000449999999937,y:.16590799999999817},{x:-.09202799999999911,y:.1748410000000007},{x:-.2137844999999996,y:.26529680000000155},{x:-.2144144999999993,y:.2662468000000011}],color:"primary",fill:!1},"path25-0":{type:"path",points:[{x:.021722400000000697,y:.30658939999999646},{x:-.07561989999999952,y:.3234685999999982},{x:-.04131709999999922,y:.23070579999999907}],color:"primary",fill:!0},"path78-6":{type:"path",points:[{x:.09746180000000093,y:.18704459999999656},{x:.08543830000000074,y:.19597759999999909},{x:-.0363181999999993,y:.28643339999999995},{x:-.03694819999999943,y:.2873833999999995}],color:"primary",fill:!1},box:{type:"path",points:[{x:-.3,y:-.4},{x:.3,y:-.4},{x:.3,y:.4},{x:-.3,y:.4},{x:-.3,y:-.4},{x:-.3,y:.4}],color:"primary",fill:!1},"path48-1":{type:"path",points:[{x:-.3,y:.1333},{x:-.5362092999999997,y:.1333}],color:"primary",fill:!1},"path48-2":{type:"path",points:[{x:-.3,y:-.1333},{x:-.5362092999999997,y:-.1333}],color:"primary",fill:!1},"path48-3":{type:"path",points:[{x:.3,y:-.1333},{x:.5362093000000003,y:-.1333}],color:"primary",fill:!1},"path48-4":{type:"path",points:[{x:.3,y:.1333},{x:.5362093000000003,y:.1333}],color:"primary",fill:!1}},texts:{bottom1:{type:"text",text:"{VAL}",x:0,y:-.43222},right1:{type:"text",text:"{REF}",x:0,y:.43222}},refblocks:{left1:{x:-.5362092999999997,y:.1333},left2:{x:-.5362092999999997,y:-.1333},right1:{x:.5362093000000003,y:-.1333},right2:{x:.5362093000000003,y:.1333}},bounds:{minX:-.5643677409999996,maxX:.5643677410000003,minY:-.3234685999999982,maxY:.3234685999999982,width:1.128735482,height:.6469371999999964,centerX:33306690738754696e-32,centerY:0},circles:{}},pO=l0(H2t).labelPort("left1",["1","DIN"]).labelPort("left2",["2","POWER"]).labelPort("right1",["4","GND"]).labelPort("right2",["3","DOUT"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),V2t=Cl(pO,"down"),$2t=SY(pO),pX=Cl(pO,"up"),G2t={...pX,primitives:pX.primitives.map(n=>n.type==="path"&&(n.points.length===3||n.points.length===4)?{...n,points:n.points.map(e=>({x:e.x,y:-e.y+2*pX.center.y}))}:n)},q2t=G2t,Y2t={paths:{path11:{type:"path",points:[{x:-.3850944445000005,y:.0010025000000009054},{x:-.006525044499999799,y:-.0016204999999989145}],color:"primary",fill:!1},path40:{type:"path",points:[{x:.07415065550000066,y:.19027400000000116},{x:.07322065550000101,y:-.17787549999999852}],color:"primary",fill:!1},path42:{type:"path",points:[{x:.01002445549999953,y:-.12022799999999911},{x:.01002445549999953,y:.1443554000000009}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.28374995550000004,y:-.2462579999999992},{x:.2831499554999999,y:-.5425888999999995}],color:"primary",fill:!1},"path12-1":{type:"path",points:[{x:.28423665550000043,y:.5370061000000012},{x:.2836366555000003,y:.2678117000000011}],color:"primary",fill:!1},path15:{type:"path",points:[{x:.1731829554999995,y:-.2153930999999989},{x:.2780310554999992,y:-.23045039999999894},{x:.2324710554999987,y:-.14155709999999888}],color:"primary",fill:!0},path17:{type:"path",points:[{x:.07704605550000054,y:-.08544359999999895},{x:.2325688555000005,y:-.19774119999999895}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.07425025549999931,y:.11255990000000127},{x:.28369465549999884,y:.2606293000000013}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.006566644499999885,y:.35624680000000075},bottom1:{type:"text",text:"{VAL}",x:.020614555499999687,y:-.4202180999999998}},refblocks:{top1:{x:.2843894554999997,y:.5566011000000001},bottom1:{x:.2823318555000005,y:-.5566010999999997},left1:{x:-.3990097444999998,y:.00014970000000036343}},bounds:{minX:-.4271681854999998,maxX:.42716818549999985,minY:-.5847595409999997,maxY:.584759541,width:.8543363709999996,height:1.1695190819999999,centerX:27755575615628914e-33,centerY:16653345369377348e-32},circles:{path1:{type:"circle",x:.13862605549999985,y:.008130800000000438,radius:.28854213,color:"primary",fill:!1}}},V5e=l0(Y2t).changeTextAnchor("{VAL}","middle_right").labelPort("left1",["3"]).labelPort("top1",["2"]).labelPort("bottom1",["1"]).changeTextAnchor("{REF}","middle_right").build(),hX=Cl(V5e),mX=hX.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),$5e=hX.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");mX.anchor="middle_left",$5e.anchor="middle_right",mX.x=.45,mX.y+=.065,$5e.y+=.065;var X2t=hX,W2t={paths:{"path12-1-8-6-9":{type:"path",points:[{x:.023137150000000162,y:-.022408499999999165},{x:.023137150000000162,y:-.10240850000000101}],color:"primary",fill:!1},"path12-1-5-6":{type:"path",points:[{x:-.48740694999999956,y:-.18547949999999958},{x:-.1731006500000003,y:-.18547949999999958}],color:"primary",fill:!1},"path12-1-5-6-8":{type:"path",points:[{x:.023792949999999813,y:.17183650000000128},{x:.023792949999999813,y:.10518850000000057}],color:"primary",fill:!1},"path12-1-8-0":{type:"path",points:[{x:-.14922445000000018,y:-.032671500000001075},{x:.19549865000000022,y:-.18509050000000116}],color:"primary",fill:!1},"path12-1-0":{type:"path",points:[{x:.19549885000000078,y:-.18509050000000116},{x:.4881437499999999,y:-.18509050000000116}],color:"primary",fill:!1},"path12-1-8-6-9-4":{type:"path",points:[{x:.023137150000000162,y:.11939749999999982},{x:.023137150000000162,y:.017597499999999044}],color:"primary",fill:!1},"path12-1-8-6-9-4-3":{type:"path",points:[{x:.08312335000000015,y:.10724749999999972},{x:.08312335000000015,y:.050463500000001105}],color:"primary",fill:!1},"path12-1-8-6-9-4-3-1":{type:"path",points:[{x:-.03684904999999983,y:.10724749999999972},{x:-.03684904999999983,y:.050463500000001105}],color:"primary",fill:!1},"path12-1-8-6-9-4-4":{type:"path",points:[{x:.08312335000000015,y:.10724749999999972},{x:-.03684904999999983,y:.10724749999999972}],color:"primary",fill:!1},"path14-5":{type:"path",points:[{x:-.011640198644880861,y:.2824489119921765},{x:.01182744133211866,y:.25421423950368016},{x:.035295081309120846,y:.22597956701517674},{x:.05876272128612037,y:.19774489452667865}],color:"primary",fill:!0},"path14-5-3":{type:"path",points:[{x:-.011818241440559873,y:.19775449269853418},{x:.01171692178543804,y:.22592735480803405},{x:.03525208501144128,y:.25410021691753926},{x:.058787248237439194,y:.2822730790270338}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:.010987250000000337,y:.3808714999999978},bottom1:{type:"text",text:"{VAL}",x:.05578094999999994,y:-.3808714999999996}},refblocks:{left1:{x:-.4717985499999999,y:-.1854504999999982},right1:{x:.4717985499999999,y:-.18547650000000182}},bounds:{minX:-.4999569909999999,maxX:.4999569909999999,minY:-.3808714999999996,maxY:.3808714999999978,width:.9999139819999998,height:.7617429999999974,centerX:0,centerY:-8881784197001252e-31},circles:{path9:{type:"circle",x:.02379285000000042,y:.24000550000000054,radius:.059920847,color:"primary",fill:!1}}},G5e=l0(W2t).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),q5e=Cl(G5e),Y5e=q5e.primitives.filter(n=>n.type==="text"),vX=Y5e.find(n=>n.text==="{VAL}");vX.x=-.35,vX.y=0,vX.anchor="middle_right";var yX=Y5e.find(n=>n.text==="{REF}");yX.y=0,yX.x=.35,yX.anchor="middle_left";var Z2t=q5e,Q2t={paths:{path8698:{type:"path",points:[{x:-.20003504999999944,y:-.023826854587889912},{x:-.20252458999999945,y:-.018993393814014044},{x:-.20501412999999943,y:-.014174384106555204},{x:-.2075036699999995,y:-.009384187436300498},{x:-.20999320999999949,y:-.004636988132081332},{x:-.2124827499999995,y:5329457033053167e-20},{x:-.2149722899999995,y:.004673092344940186},{x:-.2174618299999995,y:.009209271428771242},{x:-.21995136999999956,y:.013649213595881985},{x:-.22244090999999955,y:.01798089395292432},{x:-.22493044999999956,y:.022192955076609913},{x:-.22741998999999957,y:.02627477703600152},{x:-.22990952999999958,y:.030216542867918667},{x:-.2323990699999996,y:.03400929910178016},{x:-.2348886099999996,y:.03764501096072756},{x:-.23737814999999962,y:.04111661189869628},{x:-.23986768999999963,y:.04441804716802203},{x:-.24235722999999965,y:.04754431114897349},{x:-.24484676999999966,y:.05049147821106258},{x:-.24733630999999967,y:.053256726915861724},{x:-.24982584999999968,y:.05583835741211009},{x:-.2523153899999997,y:.05823580191586174},{x:-.2548049299999997,y:.060449628211062575},{x:-.2572944699999997,y:.0624815361489735},{x:-.25978400999999973,y:.06433434716802203},{x:-.26227354999999974,y:.06601198689869628},{x:-.26476308999999976,y:.06751946096072757},{x:-.26725262999999977,y:.06886282410178016},{x:-.2697421699999998,y:.07004914286791866},{x:-.2722317099999998,y:.0710864520360015},{x:-.2747212499999998,y:.07198370507660991},{x:-.2772107899999998,y:.07275071895292433},{x:-.27970032999999983,y:.07339811359588198},{x:-.28218986999999984,y:.07393724642877124},{x:-.28467940999999986,y:.07438014234494018},{x:-.28716894999999987,y:.07473941957033053},{x:-.2896584899999999,y:.07502821186791866},{x:-.2921480299999999,y:.07526008756369952},{x:-.2946375699999999,y:.07544896589344477},{x:-.2971271099999999,y:.07560903118598594},{x:-.29961664999999993,y:.07575464541211008},{x:-.3021061874999999,y:.07560903118598594},{x:-.30459572499999993,y:.07544896589344477},{x:-.3070852624999999,y:.07526008756369951},{x:-.30957479999999993,y:.07502821186791866},{x:-.31206433749999984,y:.07473941957033052},{x:-.3145538749999998,y:.07438014234494018},{x:-.31704341249999984,y:.07393724642877124},{x:-.31953294999999987,y:.07339811359588198},{x:-.32202248749999984,y:.07275071895292431},{x:-.3245120249999998,y:.07198370507660991},{x:-.3270015624999998,y:.0710864520360015},{x:-.32949109999999976,y:.07004914286791866},{x:-.33198063749999984,y:.06886282410178016},{x:-.33447017499999976,y:.06751946096072757},{x:-.3369597124999998,y:.06601198689869628},{x:-.33944924999999976,y:.06433434716802203},{x:-.34193878749999973,y:.06248153614897349},{x:-.34442832499999976,y:.06044962821106258},{x:-.3469178624999997,y:.05823580191586174},{x:-.3494073999999997,y:.05583835741211009},{x:-.35189693749999973,y:.053256726915861724},{x:-.35438647499999965,y:.050491478211062576},{x:-.3568760124999997,y:.0475443111489735},{x:-.35936554999999964,y:.04441804716802203},{x:-.3618550874999996,y:.04111661189869628},{x:-.36434462499999964,y:.03764501096072756},{x:-.36683416249999967,y:.03400929910178016},{x:-.3693236999999996,y:.030216542867918673},{x:-.3718132374999996,y:.02627477703600152},{x:-.3743027749999996,y:.022192955076609917},{x:-.37679231249999956,y:.017980893952924324},{x:-.3792818499999996,y:.013649213595881985},{x:-.3817713874999995,y:.00920927142877125},{x:-.38426092499999953,y:.004673092344940191},{x:-.38675046249999956,y:5329457033053514e-20},{x:-.38923999999999953,y:-.004636988132081328},{x:-.39172953749999956,y:-.009384187436300498},{x:-.3942190749999995,y:-.014174384106555197},{x:-.3967086124999995,y:-.01899339381401404},{x:-.3991981499999995,y:-.023826854587889912}],color:"primary",fill:!1},path8700:{type:"path",points:[{x:-.000872049999999458,y:-.02382615458789039},{x:-.0033615874999994412,y:-.01899269131401453},{x:-.0058511249999994245,y:-.014173679106555696},{x:-.008340662499999407,y:-.009383479936300985},{x:-.010830199999999391,y:-.004636278132081827},{x:-.013319737499999373,y:5400707033003174e-20},{x:-.015809274999999356,y:.004673807344939683},{x:-.018298812499999338,y:.009209988928770731},{x:-.020788349999999324,y:.013649933595881476},{x:-.023277887499999306,y:.017981616452923805},{x:-.02576742499999929,y:.022193680076609393},{x:-.02825696249999927,y:.026275504536001},{x:-.030746499999999254,y:.030217272867918137},{x:-.03323603749999924,y:.034010031601779636},{x:-.03572557499999922,y:.03764574596072702},{x:-.038215112499999204,y:.04111734939869574},{x:-.04070464999999919,y:.04441878716802149},{x:-.04319418749999917,y:.04754505364897295},{x:-.045683724999999155,y:.05049222321106203},{x:-.048173262499999134,y:.05325747441586117},{x:-.05066279999999912,y:.055839107412109526},{x:-.053152337499999106,y:.05823655441586117},{x:-.055641874999999084,y:.06045038321106201},{x:-.05813141249999907,y:.06248229364897292},{x:-.06062094999999905,y:.06433510716802145},{x:-.06311048749999904,y:.0660127493986957},{x:-.06560002499999902,y:.06752022596072697},{x:-.068089562499999,y:.06886359160177957},{x:-.07057909999999898,y:.07004991286791806},{x:-.07306863749999896,y:.07108722453600091},{x:-.07555817499999895,y:.0719844800766093},{x:-.07804771249999894,y:.07275149645292371},{x:-.08053724999999892,y:.07339889359588138},{x:-.0830267874999989,y:.07393802892877062},{x:-.08551632499999888,y:.07438092734493956},{x:-.08800586249999887,y:.07474020707032991},{x:-.09049539999999885,y:.07502900186791804},{x:-.09298493749999884,y:.07526088006369888},{x:-.09547447499999881,y:.07544976089344414},{x:-.0979640124999988,y:.0756098286859853},{x:-.10045354999999878,y:.07575544541210943},{x:-.1029430899999988,y:.0756098286859853},{x:-.1054326299999988,y:.07544976089344414},{x:-.10792216999999882,y:.07526088006369887},{x:-.11041170999999883,y:.07502900186791804},{x:-.11290124999999884,y:.0747402070703299},{x:-.11539078999999886,y:.07438092734493956},{x:-.11788032999999885,y:.07393802892877062},{x:-.1203698699999989,y:.07339889359588138},{x:-.12285940999999889,y:.07275149645292371},{x:-.1253489499999989,y:.0719844800766093},{x:-.12783848999999892,y:.07108722453600091},{x:-.13032802999999893,y:.07004991286791806},{x:-.13281756999999894,y:.06886359160177957},{x:-.13530710999999895,y:.06752022596072697},{x:-.13779664999999897,y:.0660127493986957},{x:-.14028618999999898,y:.06433510716802145},{x:-.142775729999999,y:.06248229364897291},{x:-.145265269999999,y:.06045038321106202},{x:-.14775480999999901,y:.05823655441586117},{x:-.15024434999999903,y:.055839107412109526},{x:-.15273388999999904,y:.05325747441586117},{x:-.15522342999999905,y:.05049222321106202},{x:-.15771296999999906,y:.047545053648972956},{x:-.16020250999999908,y:.04441878716802149},{x:-.1626920499999991,y:.04111734939869574},{x:-.1651815899999991,y:.03764574596072702},{x:-.16767112999999914,y:.034010031601779636},{x:-.1701606699999991,y:.03021727286791814},{x:-.17265020999999914,y:.026275504536001},{x:-.17513974999999915,y:.022193680076609396},{x:-.17762928999999916,y:.017981616452923805},{x:-.1801188299999992,y:.013649933595881474},{x:-.18260836999999916,y:.00920998892877074},{x:-.1850979099999992,y:.0046738073449396865},{x:-.1875874499999992,y:5400707033003521e-20},{x:-.19007698999999922,y:-.004636278132081827},{x:-.19256652999999926,y:-.009383479936300985},{x:-.19505606999999922,y:-.01417367910655569},{x:-.19754560999999926,y:-.018992691314014522},{x:-.20003514999999927,y:-.02382615458789039}],color:"primary",fill:!1},path8702:{type:"path",points:[{x:.19829105000000036,y:-.02382615458789039},{x:.19580151000000035,y:-.01899269131401453},{x:.1933119700000003,y:-.014173679106555696},{x:.19082243000000035,y:-.009383479936300985},{x:.1883328900000003,y:-.004636278132081827},{x:.1858433500000003,y:5400707033003174e-20},{x:.18335381000000028,y:.004673807344939683},{x:.18086427000000024,y:.009209988928770731},{x:.1783747300000003,y:.013649933595881476},{x:.17588519000000025,y:.017981616452923805},{x:.17339565000000023,y:.022193680076609393},{x:.17090611000000022,y:.026275504536001},{x:.16841657000000018,y:.030217272867918137},{x:.16592703000000023,y:.034010031601779636},{x:.16343749000000019,y:.03764574596072702},{x:.16094795000000017,y:.04111734939869574},{x:.15845841000000016,y:.04441878716802149},{x:.15596887000000015,y:.04754505364897295},{x:.15347933000000014,y:.05049222321106203},{x:.15098979000000012,y:.05325747441586117},{x:.1485002500000001,y:.055839107412109526},{x:.1460107100000001,y:.05823655441586117},{x:.1435211700000001,y:.06045038321106201},{x:.14103163000000007,y:.06248229364897292},{x:.13854209000000006,y:.06433510716802145},{x:.13605255000000005,y:.0660127493986957},{x:.13356301000000004,y:.06752022596072697},{x:.13107347000000003,y:.06886359160177957},{x:.12858393,y:.07004991286791806},{x:.12609439,y:.07108722453600091},{x:.12360484999999999,y:.0719844800766093},{x:.12111530999999998,y:.07275149645292371},{x:.11862576999999996,y:.07339889359588138},{x:.11613622999999995,y:.07393802892877062},{x:.11364668999999994,y:.07438092734493956},{x:.11115714999999993,y:.07474020707032991},{x:.10866760999999991,y:.07502900186791804},{x:.1061780699999999,y:.07526088006369888},{x:.10368852999999989,y:.07544976089344414},{x:.10119898999999988,y:.0756098286859853},{x:.09870944999999987,y:.07575544541210943},{x:.09621991249999988,y:.0756098286859853},{x:.0937303749999999,y:.07544976089344414},{x:.09124083749999992,y:.07526088006369887},{x:.08875129999999994,y:.07502900186791804},{x:.08626176249999995,y:.0747402070703299},{x:.08377222499999996,y:.07438092734493956},{x:.08128268749999998,y:.07393802892877062},{x:.07879315,y:.07339889359588138},{x:.07630361250000002,y:.07275149645292371},{x:.07381407500000003,y:.0719844800766093},{x:.07132453750000005,y:.07108722453600091},{x:.06883500000000006,y:.07004991286791806},{x:.06634546250000009,y:.06886359160177957},{x:.0638559250000001,y:.06752022596072697},{x:.06136638750000012,y:.0660127493986957},{x:.05887685000000013,y:.06433510716802145},{x:.05638731250000015,y:.06248229364897291},{x:.053897775000000175,y:.06045038321106202},{x:.05140823750000019,y:.05823655441586117},{x:.048918700000000204,y:.055839107412109526},{x:.04642916250000022,y:.05325747441586117},{x:.04393962500000023,y:.05049222321106202},{x:.04145008750000026,y:.047545053648972956},{x:.038960550000000274,y:.04441878716802149},{x:.03647101250000029,y:.04111734939869574},{x:.0339814750000003,y:.03764574596072702},{x:.03149193750000032,y:.034010031601779636},{x:.02900240000000034,y:.03021727286791814},{x:.02651286250000036,y:.026275504536001},{x:.024023325000000373,y:.022193680076609396},{x:.021533787500000387,y:.017981616452923805},{x:.019044250000000405,y:.013649933595881474},{x:.016554712500000426,y:.00920998892877074},{x:.014065175000000442,y:.0046738073449396865},{x:.011575637500000457,y:5400707033003521e-20},{x:.009086100000000473,y:-.004636278132081827},{x:.006596562500000487,y:-.009383479936300985},{x:.004107025000000513,y:-.01417367910655569},{x:.0016174875000005274,y:-.018992691314014522},{x:-.000872049999999458,y:-.02382615458789039}],color:"primary",fill:!1},path8704:{type:"path",points:[{x:.39745405000000034,y:-.02382615458789039},{x:.3949645125000003,y:-.01899269131401453},{x:.39247497500000034,y:-.014173679106555696},{x:.3899854375000004,y:-.009383479936300985},{x:.38749590000000045,y:-.004636278132081827},{x:.3850063625000004,y:5400707033003174e-20},{x:.3825168250000004,y:.004673807344939683},{x:.3800272875000004,y:.009209988928770731},{x:.3775377500000005,y:.013649933595881476},{x:.37504821250000053,y:.017981616452923805},{x:.3725586750000005,y:.022193680076609393},{x:.3700691375000005,y:.026275504536001},{x:.3675796000000005,y:.030217272867918137},{x:.3650900625000006,y:.034010031601779636},{x:.3626005250000006,y:.03764574596072702},{x:.3601109875000006,y:.04111734939869574},{x:.35762145000000056,y:.04441878716802149},{x:.3551319125000006,y:.04754505364897295},{x:.3526423750000007,y:.05049222321106203},{x:.3501528375000007,y:.05325747441586117},{x:.3476633000000007,y:.055839107412109526},{x:.34517376250000065,y:.05823655441586117},{x:.34268422500000073,y:.06045038321106201},{x:.3401946875000007,y:.06248229364897292},{x:.3377051500000008,y:.06433510716802145},{x:.33521561250000076,y:.0660127493986957},{x:.33272607500000073,y:.06752022596072697},{x:.3302365375000008,y:.06886359160177957},{x:.3277470000000008,y:.07004991286791806},{x:.3252574625000008,y:.07108722453600091},{x:.32276792500000084,y:.0719844800766093},{x:.32027838750000087,y:.07275149645292371},{x:.3177888500000009,y:.07339889359588138},{x:.3152993125000009,y:.07393802892877062},{x:.3128097750000009,y:.07438092734493956},{x:.31032023750000093,y:.07474020707032991},{x:.30783070000000096,y:.07502900186791804},{x:.305341162500001,y:.07526088006369888},{x:.30285162500000096,y:.07544976089344414},{x:.300362087500001,y:.0756098286859853},{x:.297872550000001,y:.07575544541210943},{x:.29538301000000095,y:.0756098286859853},{x:.292893470000001,y:.07544976089344414},{x:.290403930000001,y:.07526088006369887},{x:.287914390000001,y:.07502900186791804},{x:.28542485000000095,y:.0747402070703299},{x:.2829353100000009,y:.07438092734493956},{x:.2804457700000009,y:.07393802892877062},{x:.2779562300000009,y:.07339889359588138},{x:.2754666900000009,y:.07275149645292371},{x:.2729771500000009,y:.0719844800766093},{x:.2704876100000009,y:.07108722453600091},{x:.26799807000000087,y:.07004991286791806},{x:.26550853000000085,y:.06886359160177957},{x:.26301899000000084,y:.06752022596072697},{x:.26052945000000083,y:.0660127493986957},{x:.2580399100000008,y:.06433510716802145},{x:.2555503700000008,y:.06248229364897291},{x:.2530608300000008,y:.06045038321106202},{x:.2505712900000008,y:.05823655441586117},{x:.24808175000000077,y:.055839107412109526},{x:.24559221000000075,y:.05325747441586117},{x:.24310267000000074,y:.05049222321106202},{x:.24061313000000073,y:.047545053648972956},{x:.23812359000000072,y:.04441878716802149},{x:.2356340500000007,y:.04111734939869574},{x:.2331445100000007,y:.03764574596072702},{x:.23065497000000068,y:.034010031601779636},{x:.22816543000000067,y:.03021727286791814},{x:.22567589000000066,y:.026275504536001},{x:.22318635000000064,y:.022193680076609396},{x:.22069681000000063,y:.017981616452923805},{x:.21820727000000062,y:.013649933595881474},{x:.2157177300000006,y:.00920998892877074},{x:.2132281900000006,y:.0046738073449396865},{x:.21073865000000058,y:5400707033003521e-20},{x:.20824911000000057,y:-.004636278132081827},{x:.20575957000000056,y:-.009383479936300985},{x:.20327003000000055,y:-.01417367910655569},{x:.20078049000000053,y:-.018992691314014522},{x:.19829095000000052,y:-.02382615458789039}],color:"primary",fill:!1},path8706:{type:"path",points:[{x:-.4023286499999996,y:-.022544054587890106},{x:-.5293590499999994,y:-.022544054587890106}],color:"primary",fill:!1},"path8706-5":{type:"path",points:[{x:.5261604500000003,y:-.027111054587890093},{x:.39913004999999946,y:-.027111054587890093}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.0040821499999992295,y:.22997364541210996},bottom1:{type:"text",text:"{VAL}",x:-.004252755294839927,y:-.22997364541210996}},refblocks:{left1:{x:-.5504428500000003,y:-.021272154587890446},right1:{x:.5504428500000005,y:-.026521254587889898}},bounds:{width:1.1572025820000007,height:.4599472908242199,centerX:11102230246251565e-32,centerY:0},circles:{}},{paths:K2t,texts:X5e,bounds:hO,refblocks:W5e,circles:J2t}=Q2t,gX=Bm({primitives:[...Object.values(K2t),...Object.values(J2t),{...X5e.top1,anchor:"middle_bottom"},{...X5e.bottom1,anchor:"middle_top"}],ports:[{...W5e.left1,labels:["1"]},{...W5e.right1,labels:["2"]}],size:{width:hO.width,height:hO.height},center:{x:hO.centerX,y:hO.centerY}}),Z5e=Cl(gX,"up"),e5t=F_t(Z5e),t5t=SY(gX),Q5e={paths:{path11:{type:"path",points:[{x:-.5274831500000006,y:-.05991764999999982},{x:-.14891374999999996,y:-.06254064999999964}],color:"primary",fill:!1},path40:{type:"path",points:[{x:.13221874999999983,y:-.048856449999999496},{x:-.13236425000000063,y:-.18114814999999918}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.13236425000000063,y:.08343525000000018},{x:.13221874999999983,y:-.048856449999999496}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.13236425000000063,y:-.18114814999999984},{x:-.13236425000000063,y:.08343525000000018}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.13221874999999983,y:.08343525000000018},{x:.13221874999999983,y:-.18114814999999984}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.13582535000000018,y:-.04942524999999942},{x:.533952450000001,y:-.059917649999999156}],color:"primary",fill:!1},"path25-0-9-8":{type:"path",points:[{x:-.02944535000000048,y:.39378525000000053},{x:-.05325954999999993,y:.4660362500000006},{x:-.07725114999999949,y:.39386225000000086}],color:"primary",fill:!0},"path78-6-5-5":{type:"path",points:[{x:-.05361965000000035,y:.27387525000000035},{x:-.053592050000000446,y:.2865022500000003},{x:-.05330205000000077,y:.41436425000000066},{x:-.05311205000000019,y:.4152642500000008}],color:"primary",fill:!1},"path25-0-9-8-2":{type:"path",points:[{x:.06865195000000024,y:.39378525000000053},{x:.044837750000000565,y:.4660362500000006},{x:.02084615000000123,y:.39386225000000086}],color:"primary",fill:!0},"path78-6-5-5-7":{type:"path",points:[{x:.044477650000000146,y:.27387525000000035},{x:.044505250000000274,y:.2865022500000003},{x:.04479524999999995,y:.41436425000000066},{x:.04498525000000053,y:.4152642500000008}],color:"primary",fill:!1},"path43-1":{type:"path",points:[{x:.03124844999999965,y:.05895145000000013},{x:.03124844999999965,y:-.16452955000000036}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:.25206924999999947,y:.3769550499999994},bottom1:{type:"text",text:"{VAL}",x:-.006614550000000552,y:-.4660362500000004}},refblocks:{left1:{x:-.54139845,y:-.060770450000000364},right1:{x:.5413984499999995,y:-.0597740500000008}},bounds:{minX:-.569556891,maxX:.5695568909999995,minY:-.4660362500000004,maxY:.4660362500000006,width:1.1391137819999995,height:.932072500000001,centerX:-2220446049250313e-31,centerY:11102230246251565e-32},circles:{path1:{type:"circle",x:-.0037626500000003116,y:-.05278935000000051,radius:.28854213,color:"primary",fill:!1}}};Q5e.bounds.width+=.2;var K5e=l0(Q5e).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),J5e=Cl(K5e),n5t=J5e.primitives.filter(n=>n.type==="text"),ebe=n5t.find(n=>n.text==="{VAL}");ebe.x=-.52,ebe.anchor="middle_right";var r5t=J5e,i5t={paths:{path45:{type:"path",points:[{x:.13585750000000063,y:-.003696399999999045},{x:-.12872579999999934,y:-.13598810000000228}],color:"primary",fill:!1},"path1-8":{type:"path",points:[{x:.12763670000000094,y:-.003920199999999596},{x:.5265564000000009,y:-.003920199999999596}],color:"primary",fill:!1},path46:{type:"path",points:[{x:-.12872579999999934,y:.12859530000000063},{x:.13585750000000063,y:-.003696399999999045}],color:"primary",fill:!1},path47:{type:"path",points:[{x:-.12872579999999934,y:-.13598810000000228},{x:-.12872579999999934,y:.12859530000000063}],color:"primary",fill:!1},path48:{type:"path",points:[{x:.13585750000000063,y:.12859530000000063},{x:.13585750000000063,y:-.13598810000000228}],color:"primary",fill:!1},path49:{type:"path",points:[{x:-.13076959999999938,y:-.003696399999999045},{x:-.5256007999999994,y:-.003696399999999045}],color:"primary",fill:!1},path25:{type:"path",points:[{x:-.1557438999999996,y:.28545279999999806},{x:-.2530861999999994,y:.3023319999999998},{x:-.21878339999999952,y:.20956920000000068}],color:"primary",fill:!0},path78:{type:"path",points:[{x:-.08000449999999937,y:.16590799999999817},{x:-.09202799999999911,y:.1748410000000007},{x:-.2137844999999996,y:.26529680000000155},{x:-.2144144999999993,y:.2662468000000011}],color:"primary",fill:!1},"path25-0":{type:"path",points:[{x:.021722400000000697,y:.30658939999999646},{x:-.07561989999999952,y:.3234685999999982},{x:-.04131709999999922,y:.23070579999999907}],color:"primary",fill:!0},"path78-6":{type:"path",points:[{x:.09746180000000093,y:.18704459999999656},{x:.08543830000000074,y:.19597759999999909},{x:-.0363181999999993,y:.28643339999999995},{x:-.03694819999999943,y:.2873833999999995}],color:"primary",fill:!1}},texts:{bottom1:{type:"text",text:"{VAL}",x:-.009561699999999451,y:-.3234685999999982},right1:{type:"text",text:"{REF}",x:.31464070000000044,y:.22386570000000106}},refblocks:{left1:{x:-.5362092999999997,y:-.004432900000001183},right1:{x:.5362093000000003,y:-.004886400000003732}},bounds:{width:1.128735482,height:.6469371999999964,centerX:33306690738754696e-32,centerY:0},circles:{}},{paths:a5t,texts:tbe,bounds:mO,refblocks:nbe,circles:o5t}=i5t,vO=Bm({primitives:[...Object.values(a5t),...Object.values(o5t),{...tbe.bottom1,anchor:"middle_top"},{...tbe.right1,anchor:"middle_bottom"}],ports:[{...nbe.left1,labels:["1"]},{...nbe.right1,labels:["2"]}],size:{width:mO.width,height:mO.height},center:{x:mO.centerX,y:mO.centerY}}),s5t=Cl(vO,"down"),l5t=SY(vO),_X=Cl(vO,"up"),c5t={..._X,primitives:_X.primitives.map(n=>n.type==="path"&&(n.points.length===3||n.points.length===4)?{...n,points:n.points.map(e=>({x:e.x,y:-e.y+2*_X.center.y}))}:n)},u5t=c5t,f5t={paths:{path11:{type:"path",points:[{x:-.5053201665812097,y:-.010839730805804138},{x:-.1829962316128657,y:-.010839730805804138}],color:"primary",fill:!1},"path11-2":{type:"path",points:[{x:-.1674747072814866,y:-.11471502212593476},{x:-.1674747072814866,y:.07736981415388478}],color:"primary",fill:!1},"path11-5":{type:"path",points:[{x:-.1674747072814866,y:-.11632056223474518},{x:.16018133830019532,y:-.11632056223474518}],color:"primary",fill:!1},"path11-5-5":{type:"path",points:[{x:-.1674747072814866,y:.07736981415388478},{x:.16018133830019532,y:.07736981415388478}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.17205869804197382,y:-.010839950577224311},{x:.5116721586832798,y:-.010839950577224311}],color:"primary",fill:!1},"path11-2-1":{type:"path",points:[{x:.16064490317338742,y:-.11622177498145403},{x:.16064490317338742,y:.07727135655772521}],color:"primary",fill:!1},"path25-0-9":{type:"path",points:[{x:-.40391896081308554,y:-.2111951150487743},{x:-.32538818309991635,y:-.1776462385858042},{x:-.33843942905204627,y:-.26928059146906413}],color:"primary",fill:!0},"path78-6-5":{type:"path",points:[{x:-.4470989190253618,y:-.3351265263866847},{x:-.4385525777085817,y:-.32468848279378437},{x:-.3520048317368336,y:-.21897414423109507},{x:-.3516268465799328,y:-.21798517284109487}],color:"primary",fill:!1},"path25-0-9-0":{type:"path",points:[{x:-.30220674110432255,y:-.3403193953841548},{x:-.22367596339115314,y:-.30677051892118534},{x:-.23672720934328306,y:-.3984048718044453}],color:"primary",fill:!0},"path78-6-5-9":{type:"path",points:[{x:-.3453866993165988,y:-.464250806722065},{x:-.3368403579998187,y:-.45381276312916397},{x:-.2502926120280704,y:-.34809842456647466},{x:-.24991462687116983,y:-.34710945317647446}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.1679477702432366,y:-.40859918889256375},bottom1:{type:"text",text:"{VAL}",x:-.006410773639930811,y:.464250806722065}},refblocks:{left1:{x:-.5247194309452994,y:-.009902515585214156},right1:{x:.5247194309452992,y:-.010997416799653603}},bounds:{width:1.1040207733749288,height:.6228499956146287,centerX:-11102230246251565e-32,centerY:-.022174191085249373},circles:{path1:{type:"circle",x:-.003646732950281173,y:-.018672603986024328,radius:.2796529289238723,color:"primary",fill:!1}}},{paths:d5t,texts:rbe,bounds:yO,refblocks:ibe,circles:p5t}=f5t,abe=Bm({primitives:[...Object.values(d5t),...Object.values(p5t),{...rbe.top1,anchor:"middle_left",x:0},{...rbe.bottom1,anchor:"middle_left",x:0}],ports:[{...ibe.left1,labels:["1"]},{...ibe.right1,labels:["2"]}],size:{width:yO.width,height:yO.height},center:{x:yO.centerX,y:yO.centerY}}),obe=Cl(abe),sbe=obe.primitives.filter(n=>n.type==="text"),xX=sbe.find(n=>n.text==="{VAL}");xX.x=-.35,xX.y=0,xX.anchor="middle_right";var bX=sbe.find(n=>n.text==="{REF}");bX.y=0,bX.x=.35,bX.anchor="middle_left";var h5t=obe,m5t={paths:{path208:{type:"path",points:[{x:.3843021704999998,y:.13154093999999894},{x:.5165938705000004,y:-.13304206000000107}],color:"primary",fill:!1},path209:{type:"path",points:[{x:.25201047050000014,y:-.13304206000000107},{x:.3843021704999998,y:.13154093999999894}],color:"primary",fill:!1},path210:{type:"path",points:[{x:.5165938705000004,y:-.13304206000000107},{x:.25201047050000014,y:-.13304206000000107}],color:"primary",fill:!1},path211:{type:"path",points:[{x:.25201047050000014,y:.13154093999999894},{x:.5165938705000004,y:.13154093999999894}],color:"primary",fill:!1},path212:{type:"path",points:[{x:.11971887050000074,y:-.39762406000000006},{x:.3843021704999998,y:-.39762406000000006}],color:"primary",fill:!1},path213:{type:"path",points:[{x:.3843021704999998,y:.39612494},{x:.11971887050000074,y:.39612494}],color:"primary",fill:!1},path214:{type:"path",points:[{x:.11971887050000074,y:.5284169399999996},{x:.11971887050000074,y:.18445994}],color:"primary",fill:!1},path215:{type:"path",points:[{x:.11971887050000074,y:-.5299150600000004},{x:.11971887050000074,y:-.0007480600000011606}],color:"primary",fill:!1},path216:{type:"path",points:[{x:.3843021704999998,y:-.39762469000000067},{x:.3843021704999998,y:.3961256399999993}],color:"primary",fill:!1},path217:{type:"path",points:[{x:-.1448644295000001,y:.2638359399999999},{x:-.1448644295000001,y:-.26533006000000015}],color:"primary",fill:!1},path218:{type:"path",points:[{x:-.22423942949999898,y:-.2653310599999994},{x:-.22423942949999898,y:.26383493999999885}],color:"primary",fill:!1},path219:{type:"path",points:[{x:-.5417394294999998,y:-.26533006000000015},{x:-.22423942949999898,y:-.2653320600000004}],color:"primary",fill:!1},path220:{type:"path",points:[{x:-.1448644295000001,y:-.18595506000000128},{x:.11971897050000013,y:-.18595506000000128}],color:"primary",fill:!1},path221:{type:"path",points:[{x:-.1448644295000001,y:.18446093999999924},{x:.11971897050000013,y:.18446093999999924}],color:"primary",fill:!1},path222:{type:"path",points:[{x:-.06548942950000036,y:-.0007480600000011606},{x:.11971887050000074,y:-.0007480600000011606}],color:"primary",fill:!1}},texts:{right1:{type:"text",text:"{VAL}",x:.5715500704999998,y:.02044358999999929},right2:{type:"text",text:"{REF}",x:.5701646705000005,y:.2085436499999993}},refblocks:{top1:{x:.12018067049999992,y:.5432738300000004},bottom1:{x:.11982247050000083,y:-.5432738300000004},left1:{x:-.5433916295000003,y:-.2663988600000007}},bounds:{width:1.1431001410000001,height:1.1428645420000008,centerX:-2220446049250313e-31,centerY:0}},{paths:v5t,texts:lbe,bounds:gO,refblocks:SX}=m5t,cbe=Bm({primitives:[...Object.values(v5t),{...lbe.right1,anchor:"middle_left"},{...lbe.right2,anchor:"middle_left"}],ports:[{...SX.top1,labels:["1"]},{...SX.bottom1,labels:["2"]},{...SX.left1,labels:["3"]}],size:{width:gO.width+.4,height:gO.height},center:{x:gO.centerX+.2,y:gO.centerY}}),wX=Cl(cbe),ube=wX.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),EX=wX.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");ube.anchor="middle_top",EX.anchor="middle_top",ube.x=EX.x,EX.y+=.15;var y5t=wX,g5t={paths:{"path12-1-8-6-9":{type:"path",points:[{x:.005962250000000502,y:.06921149999999976},{x:.005962250000000502,y:-.005086499999999106}],color:"primary",fill:!1},"path12-1-5-6":{type:"path",points:[{x:-.48740705000000073,y:-.09299450000000142},{x:-.17310075000000058,y:-.09299450000000142}],color:"primary",fill:!1},"path12-1-8-0":{type:"path",points:[{x:-.16008695000000017,y:-.010660500000000184},{x:.1719709499999995,y:-.010660500000000184}],color:"primary",fill:!1},"path12-1-0":{type:"path",points:[{x:.1954987499999996,y:-.09260549999999945},{x:.4881436499999996,y:-.09260549999999945}],color:"primary",fill:!1},path2:{type:"path",points:[{x:-.09950044999999985,y:.05839450000000035},{x:-.09950104999999976,y:.06197449999999982},{x:-.09932044999999956,y:.06550449999999941},{x:-.09896044999999987,y:.0690104999999992},{x:-.09860045000000017,y:.07250049999999852},{x:-.09806045000000019,y:.07593049999999835},{x:-.09735344999999995,y:.07929949999999941},{x:-.09663345000000056,y:.08265950000000011},{x:-.09578045000000035,y:.08599949999999978},{x:-.09475245000000054,y:.08924949999999932},{x:-.09379245000000047,y:.09255949999999835},{x:-.09254545000000025,y:.09567949999999925},{x:-.09120844999999989,y:.09877950000000091},{x:-.08986644999999971,y:.10186950000000117},{x:-.08839545000000015,y:.10492949999999901},{x:-.08675845000000049,y:.10783949999999898},{x:-.08506245000000057,y:.11069950000000084},{x:-.08334244999999996,y:.11360950000000081},{x:-.08146945000000017,y:.11638949999999859},{x:-.0795824500000002,y:.11916949999999993},{x:-.07752845000000086,y:.12180949999999946},{x:-.07546944999999994,y:.12442949999999975},{x:-.07325945000000011,y:.12693950000000065},{x:-.07104145000000006,y:.129449499999998},{x:-.06867544999999975,y:.13182950000000027},{x:-.06628845000000005,y:.1341695000000005},{x:-.06379544999999975,y:.1364194999999988},{x:-.06114145000000004,y:.13848950000000038},{x:-.05848745000000033,y:.1405694999999998},{x:-.05584345000000024,y:.14261950000000034},{x:-.05306845000000049,y:.14449950000000022},{x:-.05029345000000074,y:.14639950000000113},{x:-.04738844999999969,y:.14811950000000174},{x:-.04437445000000029,y:.14969949999999876},{x:-.04134744999999995,y:.1513194999999996},{x:-.038316449999999946,y:.15275949999999838},{x:-.03515645000000056,y:.15407949999999992},{x:-.03204444999999989,y:.15536950000000083},{x:-.028770450000000558,y:.15655950000000018},{x:-.025468450000000864,y:.15757949999999887},{x:-.02213745000000067,y:.15863950000000138},{x:-.018790450000000014,y:.15942949999999811},{x:-.01536325000000005,y:.16012949999999826},{x:-.011980249999999693,y:.16082950000000018},{x:-.008442250000000762,y:.16141949999999916},{x:-.004890650000000107,y:.1617494999999991},{x:-.0013406500000003874,y:.16204949999999663},{x:.002252350000000014,y:.16214949999999817},{x:.005893849999999645,y:.16214949999999817},{x:.009534849999998762,y:.16214949999999817},{x:.013136849999999534,y:.16204949999999663},{x:.016683149999999536,y:.1617494999999991},{x:.020231149999998976,y:.1614494999999998},{x:.023727149999999142,y:.16104949999999896},{x:.02715474999999934,y:.16012949999999826},{x:.03057874999999921,y:.15952949999999966},{x:.03395574999999962,y:.15867949999999986},{x:.03725995000000015,y:.15758950000000027},{x:.0405679499999998,y:.15652949999999954},{x:.04379994999999948,y:.15541949999999893},{x:.04695294999999966,y:.15409950000000094},{x:.050101949999999285,y:.15280950000000004},{x:.053191949999999544,y:.1513194999999996},{x:.05617794999999948,y:.1497395000000008},{x:.05916694999999983,y:.14811950000000174},{x:.06206694999999929,y:.14639950000000113},{x:.06487294999999982,y:.1445595000000015},{x:.06767095000000012,y:.14269950000000264},{x:.07038294999999994,y:.14069950000000198},{x:.07299194999999958,y:.1385795000000023},{x:.07560095000000011,y:.13645950000000262},{x:.07809294999999938,y:.13420950000000254},{x:.08047994999999997,y:.13187950000000193},{x:.08287894999999956,y:.1295395000000017},{x:.08515495000000062,y:.12706950000000106},{x:.08729294999999926,y:.12451950000000167},{x:.08944594999999911,y:.12192950000000202},{x:.0914679499999993,y:.11930950000000173},{x:.09337295000000001,y:.1165295000000004},{x:.0971669499999992,y:.11101949999999938},{x:.10043494999999947,y:.10512450000000229},{x:.10311494999999926,y:.09890950000000132},{x:.10444094999999987,y:.09581950000000106},{x:.10564094999999973,y:.09262950000000103},{x:.10667494999999949,y:.08935950000000226},{x:.10769994999999977,y:.08610950000000273},{x:.1085699499999997,y:.08279950000000369},{x:.10927795000000007,y:.07942950000000337},{x:.10999794999999946,y:.07605950000000128},{x:.11051994999999959,y:.07262950000000146},{x:.11088394999999984,y:.06913950000000213},{x:.11124394999999954,y:.0656495000000028},{x:.11142394999999983,y:.062099500000002195},{x:.11142394999999983,y:.05854350000000075},{x:.10483595000000001,y:.05853049999999982},{x:.0982479500000002,y:.058516500000001415},{x:.09164495000000006,y:.058518500000001694},{x:.08505695000000024,y:.05850850000000207},{x:.078453950000001,y:.058509500000001324},{x:.07186595000000029,y:.058496500000000395},{x:.06526295000000104,y:.05849750000000142},{x:.058674950000001225,y:.058485499999999746},{x:.05208695000000052,y:.058473499999999845},{x:.04548395000000127,y:.058475500000000125},{x:.038895950000001456,y:.05846150000000172},{x:.03230795000000075,y:.058448499999999015},{x:.025704950000001503,y:.058453499999998826},{x:.019101950000001366,y:.05845449999999808},{x:.01251395000000155,y:.05844149999999715},{x:.005925950000001734,y:.058427499999998744},{x:-.0006560499999990199,y:.05842149999999968},{x:-.007240049999999165,y:.05841449999999959},{x:-.01382404999999931,y:.05840850000000053},{x:-.020406049999999176,y:.05840250000000147},{x:-.02699004999999932,y:.058394500000002125},{x:-.03357404999999947,y:.05838950000000409},{x:-.04015604999999933,y:.05838350000000503},{x:-.04674004999999948,y:.05837450000000466},{x:-.05332205000000023,y:.058368500000005596},{x:-.05990605000000038,y:.058360500000006255},{x:-.06649005000000052,y:.058355500000006444},{x:-.07307205000000039,y:.05834950000000738},{x:-.07965605000000053,y:.05834150000000804},{x:-.08624005000000068,y:.05833550000000898},{x:-.09282205000000143,y:.05833050000001094}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:.01254745000000046,y:.26612850000000243},bottom1:{type:"text",text:"{VAL}",x:-.16130964999999975,y:-.2661284999999989}},refblocks:{left1:{x:-.4717985499999999,y:-.09296750000000031},right1:{x:.4717985499999999,y:-.09299249999999937}},bounds:{width:.9999139819999998,height:.5322570000000013,centerX:0,centerY:17763568394002505e-31},circles:{}},{paths:_5t,texts:fbe,bounds:_O,refblocks:dbe,circles:x5t}=g5t,pbe=Bm({primitives:[...Object.values(_5t),...Object.values(x5t),{...fbe.top1,anchor:"middle_bottom",x:0},{...fbe.bottom1,anchor:"middle_top",x:0}],ports:[{...dbe.left1,labels:["1"]},{...dbe.right1,labels:["2"]}],size:{width:_O.width,height:_O.height},center:{x:_O.centerX+.006,y:_O.centerY+.06}}),TX=Cl(pbe),TC=TX.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),xO=TX.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");TC.anchor="middle_left",xO.anchor="middle_right",TC.x=TC.x-.03,TC.y=TC.y,xO.x=xO.x,xO.y=0;var b5t=TX,S5t={paths:{path11:{type:"path",points:[{x:-.39274354450000026,y:-.10329954999999957},{x:.05111245549999932,y:-.1059225499999994}],color:"primary",fill:!1},path40:{type:"path",points:[{x:.09373835550000087,y:.18559775000000034},{x:.09280835550000122,y:-.18255174999999935}],color:"primary",fill:!1},"path12-1":{type:"path",points:[{x:.30382435550000064,y:.53233025},{x:.3032243555000005,y:.10600584999999985}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:.3108281555000003,y:-.5323308500000001},{x:.31142815550000025,y:-.005876249999999805}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.09383795549999951,y:.10788365000000044},{x:.31104975549999936,y:.10659565000000004}],color:"primary",fill:!1},"path2-5":{type:"path",points:[{x:.09383795549999951,y:-.10232114999999986},{x:.31104975549999936,y:-.10360915000000026}],color:"primary",fill:!1},path15:{type:"path",points:[{x:.27419885550000034,y:-.04077644999999963},{x:.27419885550000034,y:.030615650000000327},{x:.2024438555000001,y:-.004662050000000084},{x:.27419885550000034,y:-.04077644999999963}],color:"primary",fill:!0},"path2-0":{type:"path",points:[{x:.09383795549999951,y:-.004018049999999551},{x:.31104975549999936,y:-.005306049999999729}],color:"primary",fill:!1},"path12-1-0":{type:"path",points:[{x:.05171245550000081,y:.16715385000000005},{x:.05111245550000065,y:-.10592255000000006}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.13197254449999907,y:.36092494999999936},bottom1:{type:"text",text:"{VAL}",x:.05891105550000031,y:-.42489435000000064}},refblocks:{top1:{x:.30397715549999993,y:.5519248499999992},bottom1:{x:.31067575550000126,y:-.5519248499999994},left1:{x:-.41859744450000025,y:-.10250625000000024}},bounds:{width:.8935117710000002,height:1.1601665819999987,centerX:-8326672684688674e-32,centerY:-5551115123125783e-32},circles:{path1:{type:"circle",x:.15821375550000005,y:.003454549999999612,radius:.28854213,color:"primary",fill:!1}}},{paths:w5t,texts:hbe,bounds:bO,refblocks:MX,circles:E5t}=S5t,mbe=Bm({primitives:[...Object.values(w5t),...Object.values(E5t),{...hbe.top1,anchor:"middle_right",x:0},{...hbe.bottom1,anchor:"middle_right",x:0}],ports:[{...MX.top1,labels:["1","drain"]},{...MX.bottom1,labels:["2","source"]},{...MX.left1,labels:["3","gate"]}],size:{width:bO.width,height:bO.height},center:{x:bO.centerX,y:bO.centerY}}),vbe=Cl(mbe),ybe=vbe.primitives.filter(n=>n.type==="text"),CX=ybe.find(n=>n.text==="{VAL}");CX.x=-.35,CX.y=0,CX.anchor="middle_right";var RX=ybe.find(n=>n.text==="{REF}");RX.y=0,RX.x=.35,RX.anchor="middle_left";var T5t=vbe,M5t={paths:{path11:{type:"path",points:[{x:-.39274354450000026,y:-.10329954999999957},{x:.05111245549999932,y:-.1059225499999994}],color:"primary",fill:!1},"path12-1":{type:"path",points:[{x:.30382435550000064,y:.53233025},{x:.3032243555000005,y:.10600584999999985}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:.3108281555000003,y:-.5323308500000001},{x:.31142815550000025,y:-.005876249999999805}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.09383795549999951,y:.10788365000000044},{x:.31104975549999936,y:.10659565000000004}],color:"primary",fill:!1},"path2-8-3-7":{type:"path",points:[{x:.09448295549999952,y:.14677165000000048},{x:.09319295549999951,y:.06899565000000041}],color:"primary",fill:!1},"path2-5":{type:"path",points:[{x:.09383795549999951,y:-.10232114999999986},{x:.31104975549999936,y:-.10360915000000026}],color:"primary",fill:!1},"path2-8-3":{type:"path",points:[{x:.09440455549999993,y:-.07703174999999951},{x:.09311455549999992,y:-.15480774999999958}],color:"primary",fill:!1},"path2-8-3-2":{type:"path",points:[{x:.09448295549999952,y:.03486995000000048},{x:.09319295549999951,y:-.042906049999999585}],color:"primary",fill:!1},path15:{type:"path",points:[{x:.2741991554999996,y:-.040776550000000134},{x:.2741991554999996,y:.030615549999999825},{x:.2024441554999994,y:-.004662350000000037},{x:.2741991554999996,y:-.040776550000000134}],color:"primary",fill:!0},"path2-0":{type:"path",points:[{x:.09383795549999951,y:-.004018049999999551},{x:.31104975549999936,y:-.005306049999999729}],color:"primary",fill:!1},"path12-1-0":{type:"path",points:[{x:.05171245550000081,y:.10847375000000059},{x:.05111245550000065,y:-.1059225499999994}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.13197254449999907,y:.36092494999999936},bottom1:{type:"text",text:"{VAL}",x:.05891105550000031,y:-.42489435000000064}},refblocks:{top1:{x:.30397715549999993,y:.5519248499999992},bottom1:{x:.31067575550000126,y:-.5519248499999994},left1:{x:-.41859744450000025,y:-.10250625000000024}},bounds:{width:.8935117710000002,height:1.1601665819999987,centerX:-8326672684688674e-32,centerY:-5551115123125783e-32},circles:{path1:{type:"circle",x:.15821375550000005,y:.003454549999999612,radius:.28854213,color:"primary",fill:!1}}},{paths:C5t,texts:gbe,bounds:SO,refblocks:AX,circles:R5t}=M5t,_be=Bm({primitives:[...Object.values(C5t),...Object.values(R5t),{...gbe.top1,anchor:"middle_right",x:0},{...gbe.bottom1,anchor:"middle_right",x:0}],ports:[{...AX.top1,labels:["1","drain"]},{...AX.bottom1,labels:["2","source"]},{...AX.left1,labels:["3","gate"]}],size:{width:SO.width,height:SO.height},center:{x:SO.centerX,y:SO.centerY}}),xbe=Cl(_be),bbe=xbe.primitives.filter(n=>n.type==="text"),PX=bbe.find(n=>n.text==="{VAL}");PX.x=-.35,PX.y=0,PX.anchor="middle_right";var NX=bbe.find(n=>n.text==="{REF}");NX.y=0,NX.x=.35,NX.anchor="middle_left";var A5t=xbe,P5t={paths:{path11:{type:"path",points:[{x:-.38509374449999945,y:-.00367374999999992},{x:.05876225550000025,y:-.00629674999999974}],color:"primary",fill:!1},path40:{type:"path",points:[{x:.07415065550000066,y:.18559775000000034},{x:.07322065550000101,y:-.18255174999999935}],color:"primary",fill:!1},"path12-1":{type:"path",points:[{x:.28423665550000043,y:.53233025},{x:.2836366555000003,y:.10600584999999985}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:.2912404555000001,y:-.5298821500000002},{x:.29184045550000004,y:-.10355795000000012}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.07425025549999931,y:.10788365000000044},{x:.29146205549999915,y:.10659565000000004}],color:"primary",fill:!1},"path2-5":{type:"path",points:[{x:.07425025549999931,y:-.10232114999999986},{x:.29146205549999915,y:-.10360915000000026}],color:"primary",fill:!1},path15:{type:"path",points:[{x:-.0829488445000004,y:.06153284999999986},{x:-.0829488445000004,y:-.06535114999999969},{x:.005945155500000077,y:-.0026521499999998532},{x:-.0829488445000004,y:.06153284999999986}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.15156024449999927,y:.36092494999999936},bottom1:{type:"text",text:"{VAL}",x:.0393233555000001,y:-.42489435000000064}},refblocks:{top1:{x:.2843894554999997,y:.5519248499999992},bottom1:{x:.29108805550000105,y:-.5519248499999994},left1:{x:-.3990097444999998,y:-.004526550000000462}},bounds:{width:.8543363709999996,height:1.1601665819999987,centerX:27755575615628914e-33,centerY:-5551115123125783e-32},circles:{path1:{type:"circle",x:.13862605549999985,y:.003454549999999612,radius:.28854213,color:"primary",fill:!1}}},{paths:N5t,texts:Sbe,bounds:wO,refblocks:DX,circles:D5t}=P5t,wbe=Bm({primitives:[...Object.values(N5t),...Object.values(D5t),{...Sbe.top1,anchor:"middle_right",x:0},{...Sbe.bottom1,anchor:"middle_right",x:0}],ports:[{...DX.top1,labels:["1","drain"]},{...DX.bottom1,labels:["2","source"]},{...DX.left1,labels:["3","gate"]}],size:{width:wO.width,height:wO.height},center:{x:wO.centerX,y:wO.centerY}}),Ebe=Cl(wbe),Tbe=Ebe.primitives.filter(n=>n.type==="text"),LX=Tbe.find(n=>n.text==="{VAL}");LX.x=-.35,LX.y=0,LX.anchor="middle_right";var OX=Tbe.find(n=>n.text==="{REF}");OX.y=0,OX.x=.35,OX.anchor="middle_left";var L5t=Ebe,zX={paths:{path11:{type:"path",points:[{x:-.3850939444999988,y:-.0036735999999999436},{x:.0587620555000008,y:-.0062965999999997635}],color:"primary",fill:!1},"path40-0":{type:"path",points:[{x:.07400475550000118,y:.2689528999999997},{x:.07335475550000092,y:-.2789230000000007}],color:"primary",fill:!1},"path40-0-5":{type:"path",points:[{x:.2754149555000005,y:.24180210000000013},{x:.07955815550000045,y:.10822479999999968}],color:"primary",fill:!1},"path40-0-5-0":{type:"path",points:[{x:.2868554555000009,y:-.24134789999999984},{x:.09194705550000082,y:-.10807689999999992}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:.2851204555,y:.25311099999999964},{x:.2860204555000001,y:.5377640999999995}],color:"primary",fill:!1},"path12-1-5-3":{type:"path",points:[{x:.2851204555,y:-.5376890000000012},{x:.2860204555000001,y:-.25303590000000065}],color:"primary",fill:!1},path15:{type:"path",points:[{x:.1882816555000013,y:-.10097660000000008},{x:.11555775550000158,y:-.20483720000000027},{x:.22425775550000182,y:-.20446720000000007},{x:.1882816555000013,y:-.10097660000000008}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.07802354449999971,y:.3596647999999991},bottom1:{type:"text",text:"{VAL}",x:-.0679100444999996,y:-.4129789000000006}},refblocks:{top1:{x:.28556045550000064,y:.5519250999999994},bottom1:{x:.285560455500002,y:-.5519250999999992},left1:{x:-.3990097444999998,y:-.004526300000000871}},bounds:{minX:-.4271681854999998,maxX:.4271681855000001,minY:-.5800835409999991,maxY:.5800835409999994,width:.8543363709999998,height:1.1601670819999985,centerX:13877787807814457e-32,centerY:11102230246251565e-32},circles:{"path1-0":{type:"circle",x:.13862605550000007,y:.003454799999999203,radius:.28854213,color:"primary",fill:!1}}},{paths:J5n,texts:ebn,bounds:tbn,refblocks:nbn,circles:rbn}=zX,Mbe=l0(zX).changeTextAnchor("{VAL}","middle_right").labelPort("left1",["3"]).labelPort("top1",["2"]).labelPort("bottom1",["1"]).changeTextAnchor("{REF}","middle_right").build(),O5t=Cl(Mbe),z5t=O5t.primitives.filter(n=>n.type==="text"),U5t=z5t.find(n=>n.text==="{REF}");U5t.anchor="middle_left";var k5t=l0(zX).rotateRightFacingSymbol("down").changeTextAnchor("{VAL}","middle_right").labelPort("left1",["3"]).labelPort("top1",["2"]).labelPort("bottom1",["1"]).changeTextAnchor("{REF}","middle_left").build(),I5t={paths:{path40:{type:"path",points:[{x:.14458890000000002,y:.0390362999999998},{x:-.3199943999999995,y:-.21132800000000015}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.3199943999999995,y:.31132800000000016},{x:.14458890000000002,y:.0390362999999998}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.3199943999999995,y:-.21132800000000015},{x:-.3199943999999995,y:.31132800000000016}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.3199943999999995,y:.1790362999999998},{x:-.58168694,y:.1790362999999998}],color:"primary",fill:!1},path45:{type:"path",points:[{x:-.3199943999999995,y:-.0890362999999998},{x:-.58168694,y:-.0890362999999998}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.4233797000000002,y:.03895110000000024},{x:.1496715999999998,y:.03895110000000024}],color:"primary",fill:!1},"rect1577-3":{type:"path",points:[{x:-.19898460000000012,y:.1790362999999998},{x:-.26995180000000035,y:.1790362999999998}],color:"primary",fill:!0},"rect1577-4":{type:"path",points:[{x:-.19898460000000012,y:-.0890362999999998},{x:-.26995180000000035,y:-.0890362999999998}],color:"primary",fill:!0},"rect1577-4-7":{type:"path",points:[{x:-.23480170000000036,y:-.05337805000000034},{x:-.23480170000000036,y:-.12434525000000014}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.0050250999999996715,y:.4188453},bottom1:{type:"text",text:"{VAL}",x:-.00011179999999977319,y:-.29994529999999997}},refblocks:{left1:{x:-.56868694,y:.1790362999999998},left2:{x:-.56868694,y:-.0890362999999998},right1:{x:.4291470999999999,y:.03889609999999988}},bounds:{minX:-.5473055410000001,maxX:.5473055409999998,minY:-.37884529999999994,maxY:.26884529999999995,width:1.094611082,height:.2976905999999999,centerX:-11102230246251565e-32,centerY:.05499999999999999},circles:{}},EO=l0(I5t).labelPort("left1",["1","inp1"]).labelPort("left2",["2","inp2"]).labelPort("right1",["3","out"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),F5t=Cl(EO,"down"),B5t=Cl(EO,"left"),j5t=Cl(EO,"up"),H5t={paths:{path40:{type:"path",points:[{x:.14458890000000002,y:.0390362999999998},{x:-.3199943999999995,y:-.21132800000000015}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.3199943999999995,y:.31132800000000016},{x:.14458890000000002,y:.0390362999999998}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.3199943999999995,y:-.21132800000000015},{x:-.3199943999999995,y:.31132800000000016}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.3199943999999995,y:.1790362999999998},{x:-.58168694,y:.1790362999999998}],color:"primary",fill:!1},path45:{type:"path",points:[{x:-.3199943999999995,y:-.0890362999999998},{x:-.58168694,y:-.0890362999999998}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.4233797000000002,y:.03895110000000024},{x:.1496715999999998,y:.03895110000000024}],color:"primary",fill:!1},"path44-1":{type:"path",points:[{x:-.09945180000000035,y:.43895110000000026},{x:-.09945180000000035,y:.1790362999999998}],color:"primary",fill:!1},"path44-2":{type:"path",points:[{x:-.09345180000000035,y:-.3389511000000002},{x:-.09345180000000035,y:-.0890362999999998}],color:"primary",fill:!1},"rect1577-3":{type:"path",points:[{x:-.19898460000000012,y:.1790362999999998},{x:-.26995180000000035,y:.1790362999999998}],color:"primary",fill:!0},"rect1577-4":{type:"path",points:[{x:-.19898460000000012,y:-.0890362999999998},{x:-.26995180000000035,y:-.0890362999999998}],color:"primary",fill:!0},"rect1577-4-7":{type:"path",points:[{x:-.23485180000000036,y:.14405005000000035},{x:-.23485180000000036,y:.2150405000000014}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:.2502509999999967,y:.31884529999999994},bottom1:{type:"text",text:"{VAL}",x:.2502509999999967,y:-.23599529999999996}},refblocks:{left1:{x:-.56868694,y:.1790362999999998},left2:{x:-.56868694,y:-.0890362999999998},right1:{x:.4291470999999999,y:.03889609999999988},top2:{x:-.09945180000000035,y:.43895110000000026},bottom1:{x:-.09345180000000035,y:-.3389511000000002}},bounds:{minX:-.5473055410000001,maxX:.5473055409999998,minY:-.37884529999999994,maxY:.26884529999999995,width:1.094611082,height:.2976905999999999,centerX:-11102230246251565e-32,centerY:.05499999999999999},circles:{}},TO=l0(H5t).labelPort("left1",["1","inp1"]).labelPort("left2",["2","inp2"]).labelPort("right1",["3","out"]).labelPort("top2",["4","V+"]).labelPort("bottom1",["5","V-"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),V5t=Cl(TO,"down"),$5t=Cl(TO,"left"),G5t=Cl(TO,"up"),q5t={paths:{path11:{type:"path",points:[{x:-.39274354450000026,y:-.10329954999999957},{x:.05111245549999932,y:-.1059225499999994}],color:"primary",fill:!1},path40:{type:"path",points:[{x:.09373835550000087,y:.18559775000000034},{x:.09280835550000122,y:-.18255174999999935}],color:"primary",fill:!1},"path12-1":{type:"path",points:[{x:.30382435550000064,y:.53233025},{x:.3032243555000005,y:.10600584999999985}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:.3108281555000003,y:-.5323308500000001},{x:.31142815550000025,y:-.005876249999999805}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.09383795549999951,y:.10788365000000044},{x:.31104975549999936,y:.10659565000000004}],color:"primary",fill:!1},"path2-5":{type:"path",points:[{x:.09383795549999951,y:-.10232114999999986},{x:.31104975549999936,y:-.10360915000000026}],color:"primary",fill:!1},path15:{type:"path",points:[{x:.20244405549999955,y:.03061555000000049},{x:.20244405549999955,y:-.04077654999999947},{x:.2741990554999998,y:-.0054987499999992195},{x:.20244405549999955,y:.03061555000000049}],color:"primary",fill:!0},"path2-0":{type:"path",points:[{x:.09383795549999951,y:-.004018049999999551},{x:.31104975549999936,y:-.005306049999999729}],color:"primary",fill:!1},"path12-1-0":{type:"path",points:[{x:.05171245550000081,y:.16715385000000005},{x:.05111245550000065,y:-.10592255000000006}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.13197254449999907,y:.36092494999999936},bottom1:{type:"text",text:"{VAL}",x:.05891105550000031,y:-.42489435000000064}},refblocks:{top1:{x:.30397715549999993,y:.5519248499999992},bottom1:{x:.31067575550000126,y:-.5519248499999994},left1:{x:-.41859744450000025,y:-.10250625000000024}},bounds:{width:.8935117710000002,height:1.1601665819999987,centerX:-8326672684688674e-32,centerY:-5551115123125783e-32},circles:{path1:{type:"circle",x:.15821375550000005,y:.003454549999999612,radius:.28854213,color:"primary",fill:!1}}},{paths:Y5t,texts:Cbe,bounds:MO,refblocks:UX,circles:X5t}=q5t,Rbe=Bm({primitives:[...Object.values(Y5t),...Object.values(X5t),{...Cbe.top1,anchor:"middle_right",x:0},{...Cbe.bottom1,anchor:"middle_right",x:0}],ports:[{...UX.top1,labels:["1","drain"]},{...UX.bottom1,labels:["2","source"]},{...UX.left1,labels:["3","gate"]}],size:{width:MO.width,height:MO.height},center:{x:MO.centerX,y:MO.centerY}}),Abe=Cl(Rbe),Pbe=Abe.primitives.filter(n=>n.type==="text"),kX=Pbe.find(n=>n.text==="{VAL}");kX.x=-.35,kX.y=0,kX.anchor="middle_right";var IX=Pbe.find(n=>n.text==="{REF}");IX.y=0,IX.x=.35,IX.anchor="middle_left";var W5t=Abe,Z5t={paths:{path11:{type:"path",points:[{x:-.39274354450000026,y:-.10329954999999957},{x:.05111245549999932,y:-.1059225499999994}],color:"primary",fill:!1},"path12-1":{type:"path",points:[{x:.30382435550000064,y:.53233025},{x:.3032243555000005,y:.10600584999999985}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:.3108281555000003,y:-.5323308500000001},{x:.31142815550000025,y:-.005876249999999805}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.09383795549999951,y:.10788365000000044},{x:.31104975549999936,y:.10659565000000004}],color:"primary",fill:!1},"path2-8-3-7":{type:"path",points:[{x:.09448295549999952,y:.14677165000000048},{x:.09319295549999951,y:.06899565000000041}],color:"primary",fill:!1},"path2-5":{type:"path",points:[{x:.09383795549999951,y:-.10232114999999986},{x:.31104975549999936,y:-.10360915000000026}],color:"primary",fill:!1},"path2-8-3":{type:"path",points:[{x:.09440455549999993,y:-.07703174999999951},{x:.09311455549999992,y:-.15480774999999958}],color:"primary",fill:!1},"path2-8-3-2":{type:"path",points:[{x:.09448295549999952,y:.03486995000000048},{x:.09319295549999951,y:-.042906049999999585}],color:"primary",fill:!1},path15:{type:"path",points:[{x:.20244405549999955,y:.03061555000000049},{x:.20244405549999955,y:-.04077654999999947},{x:.2741990554999998,y:-.0054987499999992195},{x:.20244405549999955,y:.03061555000000049}],color:"primary",fill:!0},"path2-0":{type:"path",points:[{x:.09383795549999951,y:-.004018049999999551},{x:.31104975549999936,y:-.005306049999999729}],color:"primary",fill:!1},"path12-1-0":{type:"path",points:[{x:.05171245550000081,y:.10847375000000059},{x:.05111245550000065,y:-.1059225499999994}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.13197254449999907,y:.36092494999999936},bottom1:{type:"text",text:"{VAL}",x:.05891105550000031,y:-.42489435000000064}},refblocks:{top1:{x:.30397715549999993,y:.5519248499999992},bottom1:{x:.31067575550000126,y:-.5519248499999994},left1:{x:-.41859744450000025,y:-.10250625000000024}},bounds:{width:.8935117710000002,height:1.1601665819999987,centerX:-8326672684688674e-32,centerY:-5551115123125783e-32},circles:{path1:{type:"circle",x:.15821375550000005,y:.003454549999999612,radius:.28854213,color:"primary",fill:!1}}},{paths:Q5t,texts:Nbe,bounds:CO,refblocks:FX,circles:K5t}=Z5t,Dbe=Bm({primitives:[...Object.values(Q5t),...Object.values(K5t),{...Nbe.top1,anchor:"middle_right",x:0},{...Nbe.bottom1,anchor:"middle_right",x:0}],ports:[{...FX.top1,labels:["1","drain"]},{...FX.bottom1,labels:["2","source"]},{...FX.left1,labels:["3","gate"]}],size:{width:CO.width,height:CO.height},center:{x:CO.centerX,y:CO.centerY}}),Lbe=Cl(Dbe),Obe=Lbe.primitives.filter(n=>n.type==="text"),BX=Obe.find(n=>n.text==="{VAL}");BX.x=-.35,BX.y=0,BX.anchor="middle_right";var jX=Obe.find(n=>n.text==="{REF}");jX.y=0,jX.x=.35,jX.anchor="middle_left";var J5t=Lbe,ebt={paths:{path11:{type:"path",points:[{x:-.5274831500000005,y:-.012413549999999773},{x:-.14891374999999973,y:-.015036549999999593}],color:"primary",fill:!1},path40:{type:"path",points:[{x:.13221874999999983,y:-.001352349999999447},{x:-.1323642500000004,y:-.13364404999999913}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.1323642500000004,y:.13093935000000023},{x:.13221874999999983,y:-.001352349999999447}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.1323642500000004,y:-.1336440499999998},{x:-.1323642500000004,y:.13093935000000023}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.13221874999999983,y:.13093935000000023},{x:.13221874999999983,y:-.1336440499999998}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.1358253500000004,y:-.001921149999999372},{x:.533952450000001,y:-.012413549999999107}],color:"primary",fill:!1},"path25-0":{type:"path",points:[{x:.19839785000000076,y:.37576625000000075},{x:.16262485000000027,y:.28367475000000053},{x:.26033484999999956,y:.2989800500000006}],color:"primary",fill:!0},"path78-6":{type:"path",points:[{x:.3305468500000004,y:.4264014500000006},{x:.31941585000000017,y:.4163797500000006},{x:.20669285000000048,y:.3148875500000008},{x:.20564285000000115,y:.31448755000000084}],color:"primary",fill:!1},"path25-0-9":{type:"path",points:[{x:.34573984999999974,y:.3493283500000002},{x:.30996684999999946,y:.25723684999999996},{x:.40767644999999963,y:.27254215000000004}],color:"primary",fill:!0},"path78-6-5":{type:"path",points:[{x:.47788845000000046,y:.39996355000000006},{x:.46675745000000024,y:.38994185000000003},{x:.35403445000000033,y:.2884496500000002},{x:.352984450000001,y:.2880496500000005}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.10246254999999982,y:.34693914999999986},bottom1:{type:"text",text:"{VAL}",x:.0012544500000004621,y:-.4264014500000004}},refblocks:{left1:{x:-.5413984499999998,y:-.013266350000000315},right1:{x:.54139845,y:-.012269950000000529}},bounds:{minX:-.5695568909999997,maxX:.569556891,minY:-.4264014500000004,maxY:.4264014500000006,width:1.1391137819999997,height:.852802900000001,centerX:11102230246251565e-32,centerY:11102230246251565e-32},circles:{path1:{type:"circle",x:-.0037626500000000895,y:-.005285250000000241,radius:.28854213,color:"primary",fill:!1}}},zbe=l0(ebt).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),Ube=Cl(zbe),tbt=Ube.primitives.filter(n=>n.type==="text"),kbe=tbt.find(n=>n.text==="{REF}");kbe.y=0,kbe.anchor="middle_left";var nbt=Ube,rbt={paths:{path11:{type:"path",points:[{x:-.38509374449999945,y:-.00367374999999992},{x:.05876225550000025,y:-.00629674999999974}],color:"primary",fill:!1},path40:{type:"path",points:[{x:.07415065550000066,y:.18559775000000034},{x:.07322065550000101,y:-.18255174999999935}],color:"primary",fill:!1},"path12-1":{type:"path",points:[{x:.28423665550000043,y:.53233025},{x:.2836366555000003,y:.10600584999999985}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:.2912404555000001,y:-.5298821500000002},{x:.29184045550000004,y:-.10355795000000012}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.07425025549999931,y:.10788365000000044},{x:.29146205549999915,y:.10659565000000004}],color:"primary",fill:!1},"path2-5":{type:"path",points:[{x:.07425025549999931,y:-.10232114999999986},{x:.29146205549999915,y:-.10360915000000026}],color:"primary",fill:!1},path15:{type:"path",points:[{x:.005945155500000077,y:-.06535114999999969},{x:.005945155500000077,y:.06153284999999986},{x:-.0829488445000004,y:-.001166149999999977},{x:.005945155500000077,y:-.06535114999999969}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.15156024449999927,y:.36092494999999936},bottom1:{type:"text",text:"{VAL}",x:.0393233555000001,y:-.42489435000000064}},refblocks:{top1:{x:.2843894554999997,y:.5519248499999992},bottom1:{x:.29108805550000105,y:-.5519248499999994},left1:{x:-.3990097444999998,y:-.004526550000000462}},bounds:{width:.8543363709999996,height:1.1601665819999987,centerX:27755575615628914e-33,centerY:-5551115123125783e-32},circles:{path1:{type:"circle",x:.13862605549999985,y:.003454549999999612,radius:.28854213,color:"primary",fill:!1}}},{paths:ibt,texts:Ibe,bounds:RO,refblocks:HX,circles:abt}=rbt,Fbe=Bm({primitives:[...Object.values(ibt),...Object.values(abt),{...Ibe.top1,anchor:"middle_right",x:0},{...Ibe.bottom1,anchor:"middle_right"}],ports:[{...HX.top1,labels:["1","drain"]},{...HX.bottom1,labels:["2","source"]},{...HX.left1,labels:["3","gate"]}],size:{width:RO.width,height:RO.height},center:{x:RO.centerX,y:RO.centerY}}),Bbe=Cl(Fbe),jbe=Bbe.primitives.filter(n=>n.type==="text"),VX=jbe.find(n=>n.text==="{VAL}");VX.x=-.35,VX.y=0,VX.anchor="middle_right";var $X=jbe.find(n=>n.text==="{REF}");$X.y=0,$X.x=.35,$X.anchor="middle_left";var obt=Bbe,Hbe={paths:{path11:{type:"path",points:[{x:-.3850939444999988,y:-.0036735999999999436},{x:.0587620555000008,y:-.0062965999999997635}],color:"primary",fill:!1},"path40-0":{type:"path",points:[{x:.07400475550000118,y:.2689528999999997},{x:.07335475550000092,y:-.2789230000000007}],color:"primary",fill:!1},"path40-0-5":{type:"path",points:[{x:.2754149555000005,y:.24180210000000013},{x:.07955815550000045,y:.10822479999999968}],color:"primary",fill:!1},"path40-0-5-0":{type:"path",points:[{x:.2868554555000009,y:-.24134789999999984},{x:.09194705550000082,y:-.10807689999999992}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:.2851204555,y:.25311099999999964},{x:.2860204555000001,y:.5377640999999995}],color:"primary",fill:!1},"path12-1-5-3":{type:"path",points:[{x:.2851204555,y:-.5376890000000012},{x:.2860204555000001,y:-.25303590000000065}],color:"primary",fill:!1},path15:{type:"path",points:[{x:.15155145550000038,y:-.2268796000000004},{x:.2242753555000001,y:-.12301900000000021},{x:.11557535549999942,y:-.12338900000000042},{x:.15155145550000038,y:-.2268796000000004}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.08351674449999891,y:.37335419999999897},bottom1:{type:"text",text:"{VAL}",x:-.0679100444999996,y:-.4129789000000006}},refblocks:{top1:{x:.28556045550000064,y:.5519250999999994},bottom1:{x:.285560455500002,y:-.5519250999999992},left1:{x:-.3990097444999998,y:-.004526300000000871}},bounds:{minX:-.4271681854999998,maxX:.4271681855000001,minY:-.5800835409999991,maxY:.5800835409999994,width:.8543363709999998,height:1.1601670819999985,centerX:13877787807814457e-32,centerY:11102230246251565e-32},circles:{"path1-0":{type:"circle",x:.13862605550000007,y:.003454799999999203,radius:.28854213,color:"primary",fill:!1}}},Vbe=l0(Hbe).changeTextAnchor("{VAL}","middle_right").labelPort("left1",["3"]).labelPort("bottom1",["2"]).labelPort("top1",["1"]).changeTextAnchor("{REF}","middle_right").build(),sbt=Cl(Vbe),lbt=sbt.primitives.filter(n=>n.type==="text"),cbt=lbt.find(n=>n.text==="{REF}");cbt.anchor="middle_left";var ubt=l0(Hbe).rotateRightFacingSymbol("down").changeTextAnchor("{VAL}","middle_right").labelPort("left1",["3"]).labelPort("bottom1",["2"]).labelPort("top1",["1"]).changeTextAnchor("{REF}","middle_left").build(),fbt={paths:{path40:{type:"path",points:[{x:-.19250837381256392,y:.32749349347032286},{x:-.25568957329611974,y:.13794979950157282}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.38205206778131373,y:.26431229398676837},{x:-.19250837381256392,y:.32749349347032286}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.2556895732961204,y:.13794979950157416},{x:-.38205206778131373,y:.26431229398676837}],color:"primary",fill:!1},path43:{type:"path",points:[{x:-.2556896210551609,y:.39067474071292196},{x:-.12932712656996737,y:.26431224622772653}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.3199237641156438,y:.2000781031672434},{x:-.5084145145074668,y:.011587352775420667}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:-.011560829633404435,y:.5083596562436202},{x:-.19004023433272543,y:.3298802515442989}],color:"primary",fill:!1},"path40-4":{type:"path",points:[{x:-.19250813152967883,y:-.3220463011874377},{x:-.38205182549842887,y:-.2588651017038819}],color:"primary",fill:!1},"path41-1":{type:"path",points:[{x:-.2556893310132333,y:-.13250260721868767},{x:-.19250813152967883,y:-.3220463011874377}],color:"primary",fill:!1},"path42-7":{type:"path",points:[{x:-.38205182549842753,y:-.258865101703881},{x:-.2556893310132333,y:-.13250260721868767}],color:"primary",fill:!1},"path43-1":{type:"path",points:[{x:-.12932688428707984,y:-.2588650539448407},{x:-.25568937877227516,y:-.38522754843003404}],color:"primary",fill:!1},"path44-8":{type:"path",points:[{x:-.3199235218327583,y:-.19463091088435758},{x:-.508414272224581,y:-.006140160492534852}],color:"primary",fill:!1},"path44-0-7":{type:"path",points:[{x:-.011641968756381349,y:-.5029938453665972},{x:-.1901213734557028,y:-.3245144406672762}],color:"primary",fill:!1},"path40-4-0":{type:"path",points:[{x:.322578868470321,y:.19315369881256328},{x:.13303517450157099,y:.2563348982961191}],color:"primary",fill:!1},"path41-1-2":{type:"path",points:[{x:.2593976689867663,y:.3826973927813131},{x:.322578868470321,y:.19315369881256328}],color:"primary",fill:!1},"path42-7-1":{type:"path",points:[{x:.13303517450157232,y:.2563348982961198},{x:.2593976689867663,y:.3826973927813131}],color:"primary",fill:!1},"path43-1-8":{type:"path",points:[{x:.38576011571292,y:.2563349460551603},{x:.2593976212277247,y:.12997245156996673}],color:"primary",fill:!1},"path44-8-7":{type:"path",points:[{x:.19516347816724133,y:.3205690891156432},{x:.006672727775418608,y:.509059839507466}],color:"primary",fill:!1},"path44-0-7-1":{type:"path",points:[{x:.5034450312436185,y:.012206154633403798},{x:.32496562654429706,y:.19068555933272457}],color:"primary",fill:!1},"path40-4-8":{type:"path",points:[{x:.3220220261874358,y:-.19326390652967795},{x:.25884082670387976,y:-.382807600498428}],color:"primary",fill:!1},"path41-1-4":{type:"path",points:[{x:.13247833221868577,y:-.25644510601323245},{x:.3220220261874358,y:-.19326390652967795}],color:"primary",fill:!1},"path42-7-0":{type:"path",points:[{x:.2588408267038793,y:-.38280760049842666},{x:.13247833221868577,y:-.25644510601323245}],color:"primary",fill:!1},"path43-1-0":{type:"path",points:[{x:.2588407789448386,y:-.13008265928707896},{x:.38520327343003213,y:-.2564451537722743}],color:"primary",fill:!1},"path44-8-9":{type:"path",points:[{x:.19460663588435567,y:-.3206792968327574},{x:.0061158854925329464,y:-.5091700472245801}],color:"primary",fill:!1},"path44-0-7-3":{type:"path",points:[{x:.5029695703665951,y:-.012397743756380697},{x:.3244901656672745,y:-.19087714845570192}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.2872803000000015,y:.4564494249999992},bottom1:{type:"text",text:"{VAL}",x:-.2872803000000015,y:-.4960514750000007}},refblocks:{left1:{x:-.5191472999999998,y:.0005123250000014234},right1:{x:.5191473000000002,y:-.0005123749999977889}},bounds:{width:1.094611482,height:1.0946118820000001,centerX:2220446049250313e-31,centerY:-5551115123125783e-32}},{paths:dbt,texts:$be,bounds:AO,refblocks:Gbe}=fbt,qbe=Bm({primitives:[...Object.values(dbt),{...$be.bottom1,y:.35,anchor:"middle_top"},{...$be.top1,anchor:"middle_left"}],ports:[{...Gbe.left1,labels:["1"]},{...Gbe.right1,labels:["2"]}],size:{width:AO.width+.05,height:AO.height},center:{x:AO.centerX,y:AO.centerY}}),pbt=Cl(qbe),hbt=pbt,mbt={paths:{path18:{type:"path",points:[{x:-.53224045,y:-.0008545000000008685},{x:-.26765715000000023,y:-.0008545000000008685}],color:"primary",fill:!1},path19:{type:"path",points:[{x:.2615098499999995,y:-.0008545000000008685},{x:.5260934499999994,y:-.0008545000000008685}],color:"primary",fill:!1},path20:{type:"path",points:[{x:-.0030722500000006647,y:.1314371999999988},{x:.2615107499999998,y:.1314371999999988},{x:.2615107499999998,y:-.13314619999999877},{x:-.26765624999999993,y:-.13314619999999877},{x:-.26765624999999993,y:.1314371999999988},{x:-.0030722499999988884,y:.1314371999999988}],color:"primary",fill:!1},path23:{type:"path",points:[{x:.2782993499999993,y:-.2822274},{x:.17598844999999885,y:-.25486950000000164},{x:.25094144999999823,y:-.1799165000000027}],color:"primary",fill:!0},path24:{type:"path",points:[{x:.2882692499999995,y:-.2921307000000013},{x:.25467554999999953,y:-.16634940000000142},{x:.16229264999999948,y:-.25853690000000284}],color:"primary",fill:!0},path26:{type:"path",points:[{x:-.2985911500000009,y:.2921307000000013},{x:.22988164999999938,y:-.2328032000000011}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:.055041669999999154,y:.2009376800000009},bottom1:{type:"text",text:"{VAL}",x:-.10019643000000089,y:-.27857531999999985}},refblocks:{left1:{x:-.5346914500000006,y:-.0013439000000019519},right1:{x:.5346914500000004,y:-.001956599999999753}},bounds:{width:1.125699782000001,height:.5842614000000026,centerX:-11102230246251565e-32,centerY:0}},{paths:vbt,texts:Ybe,bounds:PO,refblocks:Xbe}=mbt,Wbe=Bm({primitives:[...Object.values(vbt),{...Ybe.bottom1,anchor:"middle_top"},{...Ybe.top1,anchor:"middle_bottom"}],ports:[{...Xbe.left1,labels:["1"]},{...Xbe.right1,labels:["2"]}],size:{width:PO.width,height:PO.height},center:{x:PO.centerX,y:PO.centerY}}),Zbe=Cl(Wbe),Qbe=Zbe.primitives.filter(n=>n.type==="text"),ybt=Qbe.find(n=>n.text==="{VAL}");ybt.anchor="middle_right";var gbt=Qbe.find(n=>n.text==="{REF}");gbt.anchor="middle_left";var _bt=Zbe,xbt={paths:{path1:{type:"path",points:[{x:-.4,y:0},{x:-.3,y:0}],color:"primary",fill:!1},"path1-2-1":{type:"path",points:[{x:-.3,y:0},{x:-.25,y:.1},{x:-.15,y:-.1},{x:-.05,y:.1},{x:.05,y:-.1},{x:.15,y:.1},{x:.25,y:-.1},{x:.3,y:0}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.3,y:0},{x:.4,y:0}],color:"primary",fill:!1},path3:{type:"path",points:[{x:0,y:-.17},{x:0,y:-.4}],color:"primary",fill:!1},path15:{type:"path",points:[{x:0,y:-.12},{x:.05,y:-.2},{x:-.05,y:-.2},{x:0,y:-.12}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:.3,y:.25},bottom1:{type:"text",text:"{VAL}",x:.3,y:-.25}},refblocks:{left:{x:-.42,y:0},right:{x:.42,y:0},bottom:{x:0,y:-.4}},bounds:{minX:-.42,maxX:.42,minY:-.2,maxY:.2,width:.84,height:.4,centerX:0,centerY:0},circles:{}},NO=l0(xbt).labelPort("left",["1"]).labelPort("right",["3"]).labelPort("bottom",["2"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),bbt=Cl(NO,"down"),Sbt=Cl(NO,"left"),wbt=Cl(NO,"up"),Ebt={paths:{path11:{type:"path",points:[{x:-.5274831500000005,y:.02812460000000061},{x:-.30105415000000013,y:.02812460000000061}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.2932119499999999,y:.02812460000000061},{x:.5339524499999997,y:.02812460000000061}],color:"primary",fill:!1}},refblocks:{left1:{x:-.5413984499999998,y:.027271800000000068},right1:{x:.54139845,y:.028268199999999855}},bounds:{width:1.1391137819999997,height:.7903522000000003,centerX:11102230246251565e-32,centerY:11102230246251565e-32},circles:{path1:{type:"circle",x:-.0037626500000000895,y:.03525290000000014,radius:.28854213,color:"primary",fill:!1}}},{paths:Tbt,bounds:DO,refblocks:Kbe,circles:Mbt}=Ebt,Jbe=Bm({primitives:[...Object.values(Tbt),...Object.values(Mbt),{type:"text",text:"{REF}",x:-.15,y:-.42330070000000064,anchor:"middle_top"},{type:"text",text:"{VAL}",x:-.15,y:.42330070000000064,anchor:"middle_bottom"},{type:"text",text:"COS φ",x:0,y:.014279000000000375,anchor:"center"}],ports:[{...Kbe.left1,labels:["1"]},{...Kbe.right1,labels:["2"]}],size:{width:DO.width,height:DO.height},center:{x:DO.centerX,y:DO.centerY}}),e3e=Cl(Jbe),GX=e3e.primitives.filter(n=>n.type==="text"),qX=GX.find(n=>n.text==="{REF}"),YX=GX.find(n=>n.text==="{VAL}"),XX=GX.find(n=>n.text==="COS φ");qX.x=.35,qX.y=0,qX.anchor="middle_left",YX.anchor="middle_right",YX.x=-.35,YX.y=0,XX.x=0,XX.y=0,XX.anchor="center";var Cbt=e3e,Rbt={paths:{"path12-1-8-6-9-9":{type:"path",points:[{x:.013196749999999646,y:.030446500000000043},{x:.013196749999999646,y:-.0859464999999986}],color:"primary",fill:!1},"path12-1-5-6-4":{type:"path",points:[{x:-.4867871500000014,y:-.0510704999999998},{x:-.17248085000000124,y:-.0510704999999998}],color:"primary",fill:!1},"path12-1-8-0-0":{type:"path",points:[{x:-.15916995000000078,y:-.0915204999999979},{x:.1810634499999999,y:-.0915204999999979}],color:"primary",fill:!1},"path12-1-0-1":{type:"path",points:[{x:.19611864999999984,y:-.05109549999999885},{x:.48876354999999894,y:-.05109549999999885}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:.007320949999999549,y:.22461850000000005},bottom1:{type:"text",text:"{VAL}",x:-.1606897500000004,y:-.22461849999999828}},refblocks:{left1:{x:-.47241845000000104,y:-.05104349999999869},right1:{x:.47241845000000016,y:-.051482499999998765}},bounds:{width:1.0011537820000012,height:.44923699999999833,centerX:-4440892098500626e-31,centerY:8881784197001252e-31},circles:{"circle-2":{type:"circle",x:-.14387115000000072,y:-.05130149999999922,radius:.023193523,color:"primary",fill:!1},circle:{type:"circle",x:.16803074999999978,y:-.05007949999999717,radius:.023193523,color:"primary",fill:!1}}},{paths:Abt,texts:t3e,bounds:LO,refblocks:n3e,circles:Pbt}=Rbt,r3e=Bm({primitives:[...Object.values(Abt),...Object.values(Pbt),{...t3e.top1,anchor:"middle_left"},{...t3e.bottom1,anchor:"middle_left"}],ports:[{...n3e.left1,labels:["1"]},{...n3e.right1,labels:["2"]}],size:{width:LO.width,height:LO.height},center:{x:LO.centerX,y:LO.centerY}}),Nbt=Cl(r3e,"up"),Dbt={paths:{"path12-1-8-6-9-9":{type:"path",points:[{x:-.04575882,y:.08981650000000013},{x:-.04575882,y:.039523500000001495}],color:"primary",fill:!1},"path12-1-8-7-9-9":{type:"path",points:[{x:-.04575882,y:.08981650000000013},{x:.06765231,y:.08981650000000013}],color:"primary",fill:!1},"path12-1-8-6-9-10":{type:"path",points:[{x:.06765231,y:.08981650000000013},{x:.06765231,y:.039523500000001495}],color:"primary",fill:!1},"path12-1-5-6-4":{type:"path",points:[{x:-.4867871500000014,y:-.0510704999999998},{x:-.17248085000000124,y:-.0510704999999998}],color:"primary",fill:!1},"path12-1-8-0-0":{type:"path",points:[{x:-.15916995000000078,y:.03984950000000042},{x:.1810634499999999,y:.03984950000000042}],color:"primary",fill:!1},"path12-1-0-1":{type:"path",points:[{x:.19611864999999984,y:-.05109549999999885},{x:.48876354999999894,y:-.05109549999999885}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:.007320949999999549,y:.29461850000000006},bottom1:{type:"text",text:"{VAL}",x:-.1606897500000004,y:-.22461849999999828}},refblocks:{left1:{x:-.47241845000000104,y:-.05104349999999869},right1:{x:.47241845000000016,y:-.051482499999998765}},bounds:{width:1.0011537820000012,height:.44923699999999833,centerX:-4440892098500626e-31,centerY:8881784197001252e-31},circles:{"circle-2":{type:"circle",x:-.14387115000000072,y:-.05130149999999922,radius:.023193523,color:"primary",fill:!1},circle:{type:"circle",x:.16803074999999978,y:-.05007949999999717,radius:.023193523,color:"primary",fill:!1}}},{paths:Lbt,texts:i3e,bounds:OO,refblocks:a3e,circles:Obt}=Dbt,o3e=Bm({primitives:[...Object.values(Lbt),...Object.values(Obt),{...i3e.top1,anchor:"middle_left"},{...i3e.bottom1,anchor:"middle_left"}],ports:[{...a3e.left1,labels:["1"]},{...a3e.right1,labels:["2"]}],size:{width:OO.width,height:OO.height},center:{x:OO.centerX,y:OO.centerY}}),zbt=Cl(o3e,"up"),Ubt={paths:{path40:{type:"path",points:[{x:-.19250837381256392,y:-.32749349347032286},{x:-.25568957329611974,y:-.13794979950157282}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.38205206778131373,y:-.26431229398676837},{x:-.19250837381256392,y:-.32749349347032286}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.2556895732961204,y:-.13794979950157416},{x:-.38205206778131373,y:-.26431229398676837}],color:"primary",fill:!1},path43:{type:"path",points:[{x:-.2556896210551609,y:-.39067474071292196},{x:-.12932712656996737,y:-.26431224622772653}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.3199237641156438,y:-.2000781031672434},{x:-.5084145145074668,y:-.011587352775420667}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:-.011560829633404435,y:-.5083596562436202},{x:-.19004023433272543,y:-.3298802515442989}],color:"primary",fill:!1},"path40-4":{type:"path",points:[{x:-.19250813152967883,y:.3220463011874377},{x:-.38205182549842887,y:.2588651017038819}],color:"primary",fill:!1},"path41-1":{type:"path",points:[{x:-.2556893310132333,y:.13250260721868767},{x:-.19250813152967883,y:.3220463011874377}],color:"primary",fill:!1},"path42-7":{type:"path",points:[{x:-.38205182549842753,y:.258865101703881},{x:-.2556893310132333,y:.13250260721868767}],color:"primary",fill:!1},"path43-1":{type:"path",points:[{x:-.12932688428707984,y:.2588650539448407},{x:-.25568937877227516,y:.38522754843003404}],color:"primary",fill:!1},"path44-8":{type:"path",points:[{x:-.3199235218327583,y:.19463091088435758},{x:-.508414272224581,y:.006140160492534852}],color:"primary",fill:!1},"path44-0-7":{type:"path",points:[{x:-.011641968756381349,y:.5029938453665972},{x:-.1901213734557028,y:.3245144406672762}],color:"primary",fill:!1},"path40-4-0":{type:"path",points:[{x:.322578868470321,y:-.19315369881256328},{x:.13303517450157099,y:-.2563348982961191}],color:"primary",fill:!1},"path41-1-2":{type:"path",points:[{x:.2593976689867663,y:-.3826973927813131},{x:.322578868470321,y:-.19315369881256328}],color:"primary",fill:!1},"path42-7-1":{type:"path",points:[{x:.13303517450157232,y:-.2563348982961198},{x:.2593976689867663,y:-.3826973927813131}],color:"primary",fill:!1},"path43-1-8":{type:"path",points:[{x:.38576011571292,y:-.2563349460551603},{x:.2593976212277247,y:-.12997245156996673}],color:"primary",fill:!1},"path44-8-7":{type:"path",points:[{x:.19516347816724133,y:-.3205690891156432},{x:.006672727775418608,y:-.509059839507466}],color:"primary",fill:!1},"path44-0-7-1":{type:"path",points:[{x:.5034450312436185,y:-.012206154633403798},{x:.32496562654429706,y:-.19068555933272457}],color:"primary",fill:!1},"path40-4-8":{type:"path",points:[{x:.3220220261874358,y:.19326390652967795},{x:.25884082670387976,y:.382807600498428}],color:"primary",fill:!1},"path41-1-4":{type:"path",points:[{x:.13247833221868577,y:.25644510601323245},{x:.3220220261874358,y:.19326390652967795}],color:"primary",fill:!1},"path42-7-0":{type:"path",points:[{x:.2588408267038793,y:.38280760049842666},{x:.13247833221868577,y:.25644510601323245}],color:"primary",fill:!1},"path43-1-0":{type:"path",points:[{x:.2588407789448386,y:.13008265928707896},{x:.38520327343003213,y:.2564451537722743}],color:"primary",fill:!1},"path44-8-9":{type:"path",points:[{x:.19460663588435567,y:.3206792968327574},{x:.0061158854925329464,y:.5091700472245801}],color:"primary",fill:!1},"path44-0-7-3":{type:"path",points:[{x:.5029695703665951,y:.012397743756380697},{x:.3244901656672745,y:.19087714845570192}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.2872803000000015,y:-.4564494249999992},bottom1:{type:"text",text:"{VAL}",x:-.2872803000000015,y:.4960514750000007}},refblocks:{top1:{x:.0005126999999993664,y:-.5191475},bottom1:{x:-.0005123000000009093,y:.5191475000000001},left1:{x:-.5191472999999998,y:-.0005123250000014234},right1:{x:.5191473000000002,y:.0005123749999977889}},bounds:{width:1.094611482,height:1.1037553659999992,centerX:2220446049250313e-31,centerY:-.004571741999999546},circles:{}},{paths:kbt,texts:s3e,bounds:zO,refblocks:UO,circles:Ibt}=Ubt,l3e=Bm({primitives:[...Object.values(kbt),...Object.values(Ibt),{...s3e.top1,anchor:"middle_right"},{...s3e.bottom1,anchor:"middle_right"}],ports:[{...UO.top1,labels:["1"]},{...UO.bottom1,labels:["2"]},{...UO.left1,labels:["3"]},{...UO.right1,labels:["4"]}],size:{width:zO.width,height:zO.height},center:{x:zO.centerX,y:zO.centerY}}),WX=Cl(l3e),Fbt=WX.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),Bbt=WX.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");Fbt.anchor="middle_left",Bbt.anchor="middle_right";var jbt=WX,Hbt={paths:{path27:{type:"path",points:[{x:.7635944500000007,y:-.2799544500000035},{x:.3138028500000005,y:-.2799544500000035}],color:"primary",fill:!1},path28:{type:"path",points:[{x:-.301017949999999,y:-.01524775000000389},{x:-.7508096499999994,y:-.01524775000000389}],color:"primary",fill:!1},path30:{type:"path",points:[{x:-.3010179499999994,y:.3480486499999973},{x:-.301017949999999,y:-.2798310500000021}],color:"primary",fill:!1},"path27-3":{type:"path",points:[{x:.7729788499999999,y:.3512451499999969},{x:.32318725000000015,y:.3512451499999969}],color:"primary",fill:!1},"path29-5":{type:"path",points:[{x:-.07279374999999932,y:-.27981925000000274},{x:-.2983350499999995,y:-.27981925000000274}],color:"primary",fill:!1},"path29-5-7":{type:"path",points:[{x:.33114835000000076,y:-.2798404500000018},{x:.10560705000000059,y:-.2798404500000018}],color:"primary",fill:!1},"path29-5-7-6":{type:"path",points:[{x:-.055820049999999455,y:-.1676584500000029},{x:-.055820049999999455,y:-.3931997500000026}],color:"primary",fill:!1},"path29-5-7-6-6":{type:"path",points:[{x:.09396265000000081,y:-.16768285000000382},{x:.09396265000000081,y:-.39322415000000355}],color:"primary",fill:!1},"path29-5-9":{type:"path",points:[{x:-.07296184999999955,y:.3513701499999957},{x:-.2985031499999997,y:.3513701499999957}],color:"primary",fill:!1},"path29-5-7-2":{type:"path",points:[{x:.33098025000000053,y:.35134894999999844},{x:.10543895000000036,y:.35134894999999844}],color:"primary",fill:!1},"path29-5-7-6-0":{type:"path",points:[{x:-.05598814999999968,y:.46353094999999733},{x:-.05598814999999968,y:.23798964999999583}],color:"primary",fill:!1},"path29-5-7-6-6-2":{type:"path",points:[{x:.09379455000000014,y:.4635065499999982},{x:.09379455000000014,y:.23796524999999846}],color:"primary",fill:!1},"path29-5-92":{type:"path",points:[{x:.3315317500000008,y:.12563884999999786},{x:.33153175000000035,y:.3511801499999976}],color:"primary",fill:!1},"path29-5-7-28":{type:"path",points:[{x:.3315105500000004,y:-.2783032500000022},{x:.3315105500000004,y:-.0527619500000025}],color:"primary",fill:!1},"path29-5-7-6-9":{type:"path",points:[{x:.44369255000000063,y:.10866514999999843},{x:.21815125000000046,y:.10866514999999843}],color:"primary",fill:!1},"path29-5-7-6-6-7":{type:"path",points:[{x:.4436681500000006,y:-.04111755000000272},{x:.21812685000000043,y:-.04111755000000272}],color:"primary",fill:!1},"path29-5-7-6-9-2":{type:"path",points:[{x:.44235445000000073,y:.07167004999999627},{x:.21681315000000057,y:.07167004999999627}],color:"primary",fill:!1},"path29-5-7-6-9-2-4":{type:"path",points:[{x:.4429695500000004,y:-.0025598500000008073},{x:.4430214500000007,y:.07134914999999609}],color:"primary",fill:!1},"path29-5-7-6-9-2-4-6":{type:"path",points:[{x:.21634305000000031,y:-.0035468500000046532},{x:.21639495000000064,y:.07036214999999935}],color:"primary",fill:!1},"path29-5-7-6-9-2-9":{type:"path",points:[{x:.4429537500000005,y:-.004130850000002795},{x:.21741245000000076,y:-.004130850000002795}],color:"primary",fill:!1}},refblocks:{left1:{x:-.7666234499999998,y:-.01615045000000137},right1:{x:.7572390499999999,y:-.28185235000000297},right2:{x:.7666234500000004,y:.3493472499999992}},bounds:{width:1.5895637820000001,height:1.0717002999999998,centerX:33306690738754696e-32,centerY:-17763568394002505e-31},circles:{}},{paths:Vbt,bounds:kO,refblocks:ZX,circles:$bt}=Hbt,c3e=Bm({primitives:[...Object.values(Vbt),...Object.values($bt),{type:"text",text:"{REF}",x:.01596175000000022,y:-.5308501500000009,anchor:"middle_top"},{type:"text",text:"{VAL}",x:.013116750000000454,y:.5408501499999989,anchor:"middle_bottom"}],ports:[{...ZX.left1,labels:["1"]},{...ZX.right1,labels:["2"]},{...ZX.right2,labels:["3"]}],size:{width:kO.width,height:kO.height},center:{x:kO.centerX,y:kO.centerY}}),Gbt=Cl(c3e),qbt={paths:{path40:{type:"path",points:[{x:.14458930000000048,y:.04403649999999937},{x:-.11999399999999905,y:-.0882552000000012}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.11999400000000038,y:.1763281999999997},{x:.14458929999999914,y:.04403649999999937}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.11999400000000038,y:-.0882552000000012},{x:-.11999400000000038,y:.17632819999999816}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.1435300000000006,y:.17844679999999968},{x:.14458899999999986,y:-.08825519999999965}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.12219870000000044,y:.04403649999999937},{x:-.5168690000000005,y:.04403649999999937}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.5233800999999991,y:.043951299999999804},{x:.14967199999999892,y:.043951299999999804}],color:"primary",fill:!1},"path43-7":{type:"path",points:[{x:.2075533999999999,y:.17973149999999904},{x:.14341080000000028,y:.17864949999999946}],color:"primary",fill:!1},"path43-7-9":{type:"path",points:[{x:.2093444999999996,y:.1301679},{x:.20797049999999984,y:.17950350000000048}],color:"primary",fill:!1},"path43-7-2":{type:"path",points:[{x:.07978989999999953,y:-.09023340000000024},{x:.14313979999999948,y:-.09001340000000013}],color:"primary",fill:!1},"path43-7-9-3":{type:"path",points:[{x:.07764390000000043,y:-.04104850000000004},{x:.0790179000000002,y:-.09038410000000074}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.0050250999999994495,y:.27384530000000007},bottom1:{type:"text",text:"{VAL}",x:-.00011179999999977319,y:-.27384530000000007}},refblocks:{left1:{x:-.5191471,y:.044920799999999206},right1:{x:.5191470999999999,y:.04389609999999999}},bounds:{minX:-.547305541,maxX:.5473055409999998,minY:-.27384530000000007,maxY:.27384530000000007,width:1.0946110819999997,height:.5476906000000001,centerX:-5551115123125783e-32,centerY:0},circles:{}},u3e=l0(qbt).labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{VAL}","middle_top").changeTextAnchor("{REF}","middle_bottom").build(),QX=Cl(u3e),Ybt=QX.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),Xbt=QX.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");Ybt.anchor="middle_left",Xbt.anchor="middle_right";var Wbt=QX,f3e={paths:{path11:{type:"path",points:[{x:-.49895505000000084,y:.04174485000000061},{x:-.177441850000001,y:.04174485000000061}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.18704774999999918,y:.04961415000000069},{x:.5063384499999999,y:.04961415000000069}],color:"primary",fill:!1},"path12-6":{type:"path",points:[{x:.18219425000000045,y:-.15200134999999904},{x:.1810882500000004,y:.2512156500000011}],color:"primary",fill:!1},"path12-2":{type:"path",points:[{x:.18646324999999986,y:.0047866500000004475},{x:.34602244999999954,y:-.13539324999999924}],color:"primary",fill:!1},"path12-2-9":{type:"path",points:[{x:.3463884499999992,y:-.14077354999999936},{x:.3447284499999994,y:-.3343437499999993}],color:"primary",fill:!1},"path11-0-9":{type:"path",points:[{x:-.17016305000000087,y:.2706752500000007},{x:-.17223005000000047,y:-.15200864999999908},{x:.180362149999999,y:.04760855000000097},{x:-.16624855000000038,y:.27180665000000137}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.22312565000000006,y:.38273545},bottom1:{type:"text",text:"{VAL}",x:.11142554999999987,y:-.38273544999999976}},refblocks:{bottom1:{x:.3445824499999999,y:-.34953845000000006},left1:{x:-.5177904499999998,y:.04089205000000007},right1:{x:.5177904499999997,y:.049757749999999934}},bounds:{minX:-.5459488909999998,maxX:.5459488909999997,minY:-.38273544999999976,maxY:.38273545,width:1.0918977819999993,height:.7654708999999997,centerX:-5551115123125783e-32,centerY:11102230246251565e-32},circles:{}},{paths:ibn,texts:abn,bounds:obn,refblocks:sbn,circles:lbn}=f3e,d3e=l0(f3e).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).labelPort("bottom1",["3"]).changeTextAnchor("{REF}","middle_bottom").build(),p3e=Cl(d3e),Zbt=p3e.primitives.filter(n=>n.type==="text"),h3e=Zbt.find(n=>n.text==="{REF}");h3e.y=0,h3e.anchor="middle_left";var Qbt=p3e,Kbt={paths:{path1:{type:"path",points:[{x:-.3543583500000005,y:.03204385000000087},{x:-.12792935000000005,y:.03204385000000087}],color:"primary",fill:!1},"path-1-3":{type:"path",points:[{x:-.0733669500000003,y:.0261987500000005},{x:.10908324999999996,y:-.029100155000000048}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.1043477500000003,y:-.0645130499999993},{x:.34508875000000017,y:-.0645130499999993}],color:"primary",fill:!1},path3:{type:"path",points:[{x:.12008575000000055,y:.17214665000000062},{x:.3608267500000004,y:.17214665000000062}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.3716265000000006},bottom1:{type:"text",text:"{VAL}",x:0,y:-.3716264999999984}},refblocks:{left1:{x:-.3682737499999995,y:.03204385000000021},right1:{x:.3682737499999995,y:-.06451304999999996},right2:{x:.3682737499999995,y:.17214665000000062}},bounds:{minX:-.3964321909999995,maxX:.3964321909999995,minY:-.39716264999999984,maxY:.39716265000000006,width:.792864381999999,height:.7943252999999999,centerX:0,centerY:11102230246251565e-32},circles:{"circle-3":{type:"circle",x:.08200307499999998,y:-.06518,radius:.023193523,color:"primary",fill:!1},"circle-1":{type:"circle",x:-.09900307499999998,y:.02848,radius:.023193523,color:"primary",fill:!1},"circle-2":{type:"circle",x:.08200307499999998,y:.172848,radius:.023193523,color:"primary",fill:!1}}},IO=l0(Kbt).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right2",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_bottom").build(),KX=Cl(IO,"down"),JX=KX.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),eW=KX.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");JX.anchor="middle_bottom",eW.anchor="middle_top",JX.x=.44,JX.y+=.28,eW.y-=.28,eW.x=.44;var Jbt=KX,tW=Cl(IO,"left"),nW=tW.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),rW=tW.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");nW.anchor="middle_bottom",rW.anchor="middle_top",nW.x=0,nW.y+=.625,rW.y-=.695,rW.x=0;var e3t=tW,iW=Cl(IO,"up"),aW=iW.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),oW=iW.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");aW.anchor="middle_bottom",oW.anchor="middle_top",aW.x=.4,aW.y+=.28,oW.y-=.28,oW.x=.4;var t3t=iW,m3e={paths:{path1:{type:"path",points:[{x:-.3543583500000005,y:.03204385000000087},{x:-.12792935000000005,y:.03204385000000087}],color:"primary",fill:!1},"path-1-3":{type:"path",points:[{x:-.1133669500000003,y:.0321987500000005},{x:.11208324999999997,y:.14600155000000048}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.1043477500000003,y:-.0645130499999993},{x:.34508875000000017,y:-.0645130499999993}],color:"primary",fill:!1},path3:{type:"path",points:[{x:.12008575000000055,y:.17214665000000062},{x:.3608267500000004,y:.17214665000000062}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.17853294999999947,y:.39716265000000006},bottom1:{type:"text",text:"{VAL}",x:-.011861250000000378,y:-.39716264999999984}},refblocks:{left1:{x:-.3682737499999995,y:.03204385000000021},right1:{x:.3682737499999995,y:-.06451304999999996},right2:{x:.3682737499999995,y:.17214665000000062}},bounds:{width:.792864381999999,height:.7943252999999999,centerX:0,centerY:11102230246251565e-32},circles:{}};m3e.bounds.width+=.2;var{paths:n3t,texts:v3e,bounds:FO,refblocks:sW,circles:r3t}=m3e,y3e=Bm({primitives:[...Object.values(n3t),...Object.values(r3t),{...v3e.top1,anchor:"middle_bottom",x:-.01},{...v3e.bottom1,anchor:"middle_top",x:-.01}],ports:[{...sW.left1,labels:["1"]},{...sW.right1,labels:["3"]},{...sW.right2,labels:["2"]}],size:{width:FO.width,height:FO.height},center:{x:FO.centerX,y:FO.centerY}}),g3e=Cl(y3e),_3e=g3e.primitives.filter(n=>n.type==="text"),lW=_3e.find(n=>n.text==="{VAL}");lW.anchor="middle_right",lW.x=-.3,lW.y=0;var cW=_3e.find(n=>n.text==="{REF}");cW.anchor="middle_left",cW.x=.3,cW.y=0;var i3t=g3e,BO={paths:{path11:{type:"path",points:[{x:-.3622273500000006,y:-.0018583499999986763},{x:-.13579835000000018,y:-.0018583499999986763}],color:"primary",fill:!1},"path11-0":{type:"path",points:[{x:-.07410005000000046,y:-.0003888499999992217},{x:.11030783499999999,y:.04830055000000119}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.12795584999999932,y:-.0018583499999986763},{x:.3686967499999996,y:-.0018583499999986763}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.31026835},bottom1:{type:"text",text:"{VAL}",x:0,y:-.28026835000000005}},refblocks:{left1:{x:-.12356015000000009,y:-.006648049999999239},left2:{x:-.37614274999999964,y:-.002711249999999721},right1:{x:.11531695000000042,y:-.006648049999999239},right2:{x:.37614274999999964,y:-.0017148499999992683}},bounds:{minX:-.4043011909999996,maxX:.4043011909999996,minY:-.25026835000000003,maxY:.25026835000000003,width:.8086023819999992,height:.5005367000000001,centerX:0,centerY:0},circles:{"circle-2":{type:"circle",x:.09900307499999998,y:.00148,radius:.023193523,color:"primary",fill:!1},"circle-1":{type:"circle",x:-.09900307499999998,y:.00148,radius:.023193523,color:"primary",fill:!1}}};delete BO.refblocks.left1,delete BO.refblocks.right1,BO.bounds.width+=.2;var jO=l0(BO).changeTextAnchor("{VAL}","middle_top").labelPort("left2",["1"]).labelPort("right2",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),uW=Cl(jO,"down"),fW=uW.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),dW=uW.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");fW.anchor="middle_bottom",dW.anchor="middle_top",fW.x=.3,fW.y+=.265,dW.y-=.265,dW.x=.3;var a3t=uW,pW=Cl(jO,"left"),hW=pW.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),mW=pW.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");hW.anchor="middle_bottom",mW.anchor="middle_top",hW.x=0,hW.y+=.57,mW.y-=.57,mW.x=0;var o3t=pW,vW=Cl(jO,"up"),yW=vW.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),gW=vW.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");yW.anchor="middle_bottom",gW.anchor="middle_top",yW.x=.3,yW.y+=.265,gW.y-=.265,gW.x=.3;var s3t=vW,HO={paths:{path11:{type:"path",points:[{x:-.3622273500000006,y:-.0018583499999986763},{x:-.13579835000000018,y:-.0018583499999986763}],color:"primary",fill:!1},"path11-0":{type:"path",points:[{x:-.12010005000000046,y:-.0033888499999992217},{x:.10307834999999987,y:.13630055000000119}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.12795584999999932,y:-.0018583499999986763},{x:.3686967499999996,y:-.0018583499999986763}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.03688484999999986,y:.25026835000000003},bottom1:{type:"text",text:"{VAL}",x:-.02235315000000071,y:-.25026835000000003}},refblocks:{left1:{x:-.12356015000000009,y:-.006648049999999239},left2:{x:-.37614274999999964,y:-.002711249999999721},right1:{x:.11531695000000042,y:-.006648049999999239},right2:{x:.37614274999999964,y:-.0017148499999992683}},bounds:{minX:-.4043011909999996,maxX:.4043011909999996,minY:-.25026835000000003,maxY:.25026835000000003,width:.8086023819999992,height:.5005367000000001,centerX:0,centerY:0},circles:{}};delete HO.refblocks.left1,delete HO.refblocks.right1,HO.bounds.width+=.2;var x3e=l0(HO).changeTextAnchor("{VAL}","middle_top").labelPort("left2",["1"]).labelPort("right2",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),b3e=Cl(x3e),S3e=b3e.primitives.filter(n=>n.type==="text"),_W=S3e.find(n=>n.text==="{VAL}");_W.anchor="middle_right",_W.x=-.3,_W.y=0;var xW=S3e.find(n=>n.text==="{REF}");xW.anchor="middle_left",xW.x=.3,xW.y=0;var l3t=b3e,w3e={paths:{path40:{type:"path",points:[{x:.14458890000000002,y:.04403629999999836},{x:-.1199943999999995,y:-.08825540000000132}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.1199943999999995,y:.1763280000000016},{x:.14458890000000002,y:.04403629999999836}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.1199943999999995,y:-.08825539999999776},{x:-.1199943999999995,y:.1763280000000016}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.14458890000000002,y:.1763280000000016},{x:.14458890000000002,y:-.08825539999999776}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.12219909999999956,y:.04403629999999836},{x:-.5168693999999996,y:.04403629999999836}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.5233797,y:.04395110000000102},{x:.14967160000000002,y:.04395110000000102}],color:"primary",fill:!1},"path43-5":{type:"path",points:[{x:.19156529999999972,y:-.0884020999999997},{x:.14591529999999908,y:-.08876210000000029}],color:"primary",fill:!1},"path43-5-2":{type:"path",points:[{x:.19233440000000046,y:-.1355493999999986},{x:.19197439999999988,y:-.08989940000000018}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.0050250999999996715,y:.27384529999999785},bottom1:{type:"text",text:"{VAL}",x:-.00011179999999999524,y:-.2738453000000014}},refblocks:{left1:{x:-.5191471000000001,y:.0449206999999987},right1:{x:.5191471000000001,y:.043896100000001326}},bounds:{minX:-.5473055410000001,maxX:.5473055410000001,minY:-.2738453000000014,maxY:.27384529999999785,width:1.0946110820000001,height:.5476905999999993,centerX:0,centerY:-17763568394002505e-31},circles:{}},{paths:cbn,texts:ubn,bounds:fbn,refblocks:dbn,circles:pbn}=w3e,E3e=l0(w3e).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),c3t=Cl(E3e),u3t={paths:{path11:{type:"path",points:[{x:-.5307178,y:0},{x:-.3042887999999997,y:0}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.2899773000000003,y:0},{x:.5307178000000001,y:0}],color:"primary",fill:!1}},texts:{left1:{type:"text",text:"RPM",x:0,y:-.025}},refblocks:{left1:{x:-.5446330999999993,y:.000852800000000542},right1:{x:.5381638000000004,y:-.00014359999999924433}},bounds:{width:1.0614356000000003,height:1,centerX:5551115123125783e-32,centerY:0},circles:{path1:{type:"circle",x:-.006997299999999651,y:-.007128299999999532,radius:.28854213,color:"primary",fill:!1}}},{paths:f3t,texts:d3t,bounds:VO,refblocks:T3e,circles:p3t}=u3t,bW=Bm({primitives:[...Object.values(f3t),...Object.values(p3t),{type:"text",text:"{REF}",x:0,y:-.3594553499999995,anchor:"middle_top"},{type:"text",text:"{VAL}",x:0,y:.35,anchor:"middle_bottom"},{...d3t.left1,y:.01,anchor:"center",fontSize:.2}],ports:[{...T3e.left1,labels:["1"]},{...T3e.right1,labels:["2"]}],size:{width:VO.width,height:VO.height},center:{x:VO.centerX,y:VO.centerY}}),{5:h3t,...m3t}=bW.primitives;function v3t(n){return typeof n=="object"}var M3e=Cl({...bW,primitives:Object.values(m3t).filter(v3t)}),y3t={...M3e,primitives:[...M3e.primitives,h3t]},C3e={paths:{path11:{type:"path",points:[{x:-.5176700499999997,y:.041745050000000505},{x:-.10888805000000024,y:.041745050000000505}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.1031184499999993,y:.041745050000000505},{x:.5246894499999994,y:.041745050000000505}],color:"primary",fill:!1},"path11-0":{type:"path",points:[{x:-.09343985000000021,y:-.14620634999999882},{x:-.0930998500000002,y:.2583405500000009}],color:"primary",fill:!1},"path11-0-3":{type:"path",points:[{x:.08519034999999908,y:-.14503384999999902},{x:.08553034999999909,y:.2595130500000007}],color:"primary",fill:!1},"path11-0-9":{type:"path",points:[{x:-.08315755000000014,y:.055934450000000524},{x:-.08415755000000047,y:-.14678124999999964},{x:.08653524999999984,y:-.05104664999999953},{x:-.08126175000000035,y:.05647715000000031}],color:"primary",fill:!0},"path11-0-9-0":{type:"path",points:[{x:.07661224999999927,y:.256654450000001},{x:.07761224999999983,y:.05393885000000109},{x:-.0930805500000007,y:.1496734500000012},{x:.07471644999999949,y:.25719715000000143}],color:"primary",fill:!0},"path12-2":{type:"path",points:[{x:.09001085000000009,y:-.05964874999999914},{x:.2707999499999998,y:-.1711147499999992}],color:"primary",fill:!1},"path12-2-9":{type:"path",points:[{x:.27291134999999955,y:-.17591894999999935},{x:.27124034999999935,y:-.30168314999999923}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:.0077081499999991365,y:.41683614999999996},bottom1:{type:"text",text:"{VAL}",x:-.03022294999999975,y:-.41683614999999996}},refblocks:{bottom1:{x:.27223905000000026,y:-.3087962499999999},left1:{x:-.54139845,y:.04089205000000051},right1:{x:.5413984499999995,y:.04188845000000008}},bounds:{minX:-.569556891,maxX:.5695568909999995,minY:-.41683614999999996,maxY:.41683614999999996,width:1.1391137819999995,height:.8336722999999999,centerX:-2220446049250313e-31,centerY:0},circles:{path1:{type:"circle",x:-.0037626500000003116,y:.048873150000000365,radius:.28854213,color:"primary",fill:!1}}},{paths:hbn,texts:mbn,bounds:vbn,refblocks:ybn,circles:gbn}=C3e,R3e=l0(C3e).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).labelPort("bottom1",["3"]).changeTextAnchor("{REF}","middle_bottom").build(),A3e=Cl(R3e),P3e=A3e.primitives.filter(n=>n.type==="text"),g3t=P3e.find(n=>n.text==="{REF}"),_3t=P3e.find(n=>n.text==="{VAL}");g3t.y=0,_3t.y=0;var x3t=A3e,b3t={paths:{path40:{type:"path",points:[{x:.14458890000000002,y:.04403629999999992},{x:-.1199943999999995,y:-.08825540000000043}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.1199943999999995,y:.17632800000000026},{x:.14458890000000002,y:.04403629999999992}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.1199943999999995,y:-.0882553999999991},{x:-.1199943999999995,y:.17632800000000026}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.14458890000000002,y:.17632800000000026},{x:.14458890000000002,y:-.0882553999999991}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.12219909999999956,y:.04403629999999992},{x:-.5168693999999996,y:.04403629999999992}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.5233797000000002,y:.043951100000000354},{x:.1496715999999998,y:.043951100000000354}],color:"primary",fill:!1},"path43-8":{type:"path",points:[{x:.14339119999999994,y:.17681090000000044},{x:.07728679999999954,y:.17632089999999967}],color:"primary",fill:!1},"path43-8-8":{type:"path",points:[{x:.1446069000000001,y:-.08908179999999888},{x:.0785024999999997,y:-.08957179999999942}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.0050250999999996715,y:.27384530000000007},bottom1:{type:"text",text:"{VAL}",x:-.00011179999999977319,y:-.27384529999999985}},refblocks:{left1:{x:-.5191471000000001,y:.044920700000000924},right1:{x:.5191470999999999,y:.04389609999999999}},bounds:{width:1.094611082,height:.5476905999999999,centerX:-11102230246251565e-32,centerY:11102230246251565e-32},circles:{}},{paths:S3t,texts:N3e,bounds:$O,refblocks:D3e,circles:w3t}=b3t,L3e=Bm({primitives:[...Object.values(S3t),...Object.values(w3t),{...N3e.top1,anchor:"middle_bottom"},{...N3e.bottom1,anchor:"middle_top"}],ports:[{...D3e.left1,labels:["1"]},{...D3e.right1,labels:["2"]}],size:{width:$O.width,height:$O.height},center:{x:$O.centerX,y:$O.centerY}}),SW=Cl(L3e),E3t=SW.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),T3t=SW.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");E3t.anchor="middle_left",T3t.anchor="middle_right";var M3t=SW,C3t={paths:{path11:{type:"path",points:[{x:-.3274461945,y:.20527883627037657},{x:-.021085194500000348,y:.007570136270376837}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.2331163055000003,y:.1251673362703769},{x:.2320633055000001,y:.3759855362703768}],color:"primary",fill:!1},"path12-2":{type:"path",points:[{x:.23221610549999938,y:-.0818845637296235},{x:.2311631054999992,y:-.33270276372962315}],color:"primary",fill:!1},"path11-0":{type:"path",points:[{x:-.013263894499999873,y:-.1792007637296229},{x:-.012923894499999866,y:.2253461362703768}],color:"primary",fill:!1},"path11-0-3":{type:"path",points:[{x:.23222970550000066,y:.12047013627037662},{x:-.011307094499999115,y:.11996013627037683}],color:"primary",fill:!1},"path11-0-9":{type:"path",points:[{x:-.1124341944999998,y:.131359936270377},{x:-.16993279449999954,y:.039004036270377185},{x:-.05822649449999928,y:.03212003627037707},{x:-.11133889449999979,y:.13104553627037707}],color:"primary",fill:!0},"path11-0-3-8":{type:"path",points:[{x:.23230320549999983,y:-.08329316372962325},{x:-.011233594499999944,y:-.07900616372962332}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.19541139450000045,y:.389088136270376},bottom1:{type:"text",text:"{VAL}",x:-.031363394499999364,y:-.42359956372962415}},refblocks:{top1:{x:.2317438004035266,y:.3954411227296242},bottom1:{x:.2308431668082036,y:-.35215823360635445},left1:{x:-.34055979449999985,y:.21512343627037622}},bounds:{width:.7374364709999996,height:.8471991274592483,centerX:27755575615628914e-33,centerY:0},circles:{path1:{type:"circle",x:.08017610549999987,y:.006746336270376352,radius:.28854213,color:"primary",fill:!1}}},{paths:R3t,texts:O3e,bounds:GO,refblocks:wW,circles:A3t}=C3t,z3e=Bm({primitives:[...Object.values(R3t),...Object.values(A3t),{...O3e.top1,anchor:"middle_left"},{...O3e.bottom1,anchor:"middle_right"}],ports:[{...wW.top1,labels:["1"]},{...wW.bottom1,labels:["2"]},{...wW.left1,labels:["3"]}],size:{width:GO.width,height:GO.height},center:{x:GO.centerX,y:GO.centerY}}),U3e=Cl(z3e),k3e=U3e.primitives.filter(n=>n.type==="text"),P3t=k3e.find(n=>n.text==="{REF}");P3t.y=.1;var I3e=k3e.find(n=>n.text==="{VAL}");I3e.y=.1,I3e.x=-.4;var N3t=U3e,D3t={paths:{path11:{type:"path",points:[{x:-.5307178,y:0},{x:-.3042887999999997,y:0}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.2899773000000003,y:0},{x:.5307178000000001,y:0}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.17652089999999898,y:-.36197569999999946},bottom1:{type:"text",text:"{VAL}",x:-.009849199999999891,y:.43234960000000044},left1:{type:"text",text:"Var",x:-.19436529999999896,y:.07249430000000023}},refblocks:{left1:{x:-.5446330999999993,y:.000852800000000542},right1:{x:.5381638000000004,y:-.00014359999999924433}},bounds:{width:1.0614356000000003,height:1,centerX:5551115123125783e-32,centerY:0},circles:{path1:{type:"circle",x:-.006997299999999651,y:-.007128299999999532,radius:.28854213,color:"primary",fill:!1}}},{paths:L3t,texts:EW,bounds:qO,refblocks:F3e,circles:O3t}=D3t,B3e=Bm({primitives:[...Object.values(L3t),...Object.values(O3t),{...EW.top1,x:0,y:-.3594553499999995,anchor:"middle_top"},{...EW.bottom1,x:0,y:.35,anchor:"middle_bottom"},{...EW.left1,x:-.02,y:.01,fontSize:.2,anchor:"center"}],ports:[{...F3e.left1,labels:["1"]},{...F3e.right1,labels:["2"]}],size:{width:qO.width,height:qO.height},center:{x:qO.centerX,y:qO.centerY}}),z3t=Cl(B3e),U3t={paths:{path40:{type:"path",points:[{x:.08342510000000014,y:.04403649999999937},{x:-.18115819999999938,y:-.0882552000000012}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.1811582000000007,y:.1763281999999997},{x:.08342509999999881,y:.04403649999999937}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.1811582000000007,y:-.0882552000000012},{x:-.1811582000000007,y:.17632819999999816}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.0949504999999995,y:.17485119999999976},{x:.09600949999999897,y:-.09185079999999957}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.1954338999999996,y:.04403649999999937},{x:-.5191807000000004,y:.04403649999999937}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.5253116,y:.043951299999999804},{x:.20527070000000047,y:.043951299999999804}],color:"primary",fill:!1},"path43-6":{type:"path",points:[{x:.1854899999999995,y:.1748848999999999},{x:.18654899999999874,y:-.09181709999999943}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.0050250999999994495,y:.27384530000000007},bottom1:{type:"text",text:"{VAL}",x:-.00011179999999977319,y:-.27384530000000007}},refblocks:{left1:{x:-.5191471,y:.044920799999999206},right1:{x:.5191470999999999,y:.04389609999999999}},bounds:{width:1.0946110819999997,height:.5476906000000001,centerX:-5551115123125783e-32,centerY:0},circles:{}},{paths:k3t,texts:j3e,bounds:YO,refblocks:H3e,circles:I3t}=U3t,V3e=Bm({primitives:[...Object.values(k3t),...Object.values(I3t),{...j3e.top1,anchor:"middle_bottom"},{...j3e.bottom1,anchor:"middle_top"}],ports:[{...H3e.left1,labels:["1"]},{...H3e.right1,labels:["2"]}],size:{width:YO.width,height:YO.height},center:{x:YO.centerX,y:YO.centerY}}),TW=Cl(V3e),F3t=TW.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),B3t=TW.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");F3t.anchor="middle_left",B3t.anchor="middle_right";var j3t=TW,H3t={paths:{path5:{type:"path",points:[{x:-.5245830500000004,y:.004659100000001359},{x:-.25999975000000086,y:.004659100000001359}],color:"primary",fill:!1},path6:{type:"path",points:[{x:.2691672500000002,y:.004659100000001359},{x:.5337505499999997,y:.004659100000001359}],color:"primary",fill:!1},path7:{type:"path",points:[{x:.2691672500000002,y:-.23346590000000056},{x:-.25999974999999953,y:.2427841000000015}],color:"primary",fill:!1},path8:{type:"path",points:[{x:.37500025000000026,y:-.23346590000000056},{x:.2691672500000002,y:-.23346590000000056}],color:"primary",fill:!1},path9:{type:"path",points:[{x:.004585150000000482,y:.13695090000000043},{x:.26916815000000094,y:.13695090000000043},{x:.26916815000000094,y:-.1276325000000007},{x:-.2599988499999988,y:-.1276325000000007},{x:-.2599988499999988,y:.13695090000000043},{x:.004585150000001814,y:.13695090000000043}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.05849044999999986,y:.25166549999999965},bottom1:{type:"text",text:"{VAL}",x:.008507150000000685,y:-.25166549999999965}},refblocks:{left1:{x:-.5392315500000002,y:.002969399999999567},right1:{x:.5392315500000002,y:.005339799999999784}},bounds:{width:1.1347799820000004,height:.5033309999999993,centerX:0,centerY:0}},{paths:V3t,texts:$3e,bounds:XO,refblocks:G3e}=H3t,q3e=Bm({primitives:[...Object.values(V3t),{...$3e.top1,anchor:"middle_left"},{...$3e.bottom1,anchor:"middle_right"}],ports:[{...G3e.left1,labels:["1","-"]},{...G3e.right1,labels:["2","+"]}],size:{width:XO.width,height:XO.height},center:{x:XO.centerX,y:XO.centerY}}),$3t=Cl(q3e),G3t={paths:{path11:{type:"path",points:[{x:-.5307178,y:0},{x:-.3042887999999997,y:0}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.2899773000000003,y:0},{x:.5307178000000001,y:0}],color:"primary",fill:!1}},texts:{left1:{type:"text",text:"Var",x:0,y:-.025}},refblocks:{left1:{x:-.5446330999999993,y:.000852800000000542},right1:{x:.5381638000000004,y:-.00014359999999924433}},bounds:{width:1.0614356000000003,height:1,centerX:5551115123125783e-32,centerY:0},circles:{path1:{type:"circle",x:-.006997299999999651,y:-.007128299999999532,radius:.28854213,color:"primary",fill:!1}}},{paths:q3t,texts:Y3t,bounds:WO,refblocks:Y3e,circles:X3t}=G3t,MW=Bm({primitives:[...Object.values(q3t),...Object.values(X3t),{type:"text",text:"{REF}",x:0,y:-.3594553499999995,anchor:"middle_top"},{type:"text",text:"{VAL}",x:0,y:.35,anchor:"middle_bottom"},{...Y3t.left1,anchor:"center",y:.02,fontSize:.2}],ports:[{...Y3e.left1,labels:["1"]},{...Y3e.right1,labels:["2"]}],size:{width:WO.width,height:WO.height},center:{x:WO.centerX,y:WO.centerY}}),{5:W3t,...Z3t}=MW.primitives;function Q3t(n){return typeof n=="object"}var X3e=Cl({...MW,primitives:Object.values(Z3t).filter(Q3t)}),K3t={...X3e,primitives:[...X3e.primitives,W3t]},W3e={paths:{path11:{type:"path",points:[{x:-.5274831500000005,y:.031252300000000455},{x:-.30105415000000013,y:.031252300000000455}],color:"primary",fill:!1},"path11-5-5":{type:"path",points:[{x:.09765764999999949,y:.1295162000000003},{x:-.0011297500000011507,y:-.061970899999999496},{x:-.10778645000000164,y:.1295162000000003}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.2932119499999999,y:.031252300000000455},{x:.5339524499999997,y:.031252300000000455}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.021146249999999478,y:.4010973},bottom1:{type:"text",text:"{VAL}",x:-.00661455000000033,y:-.4010973}},refblocks:{left1:{x:-.5413984499999998,y:.030399499999999913},right1:{x:.54139845,y:.0313958999999997}},bounds:{minX:-.5695568909999997,maxX:.569556891,minY:-.4010973,maxY:.4010973,width:1.1391137819999997,height:.8021946,centerX:11102230246251565e-32,centerY:0},circles:{path1:{type:"circle",x:-.0037626500000000895,y:.03838059999999999,radius:.28854213,color:"primary",fill:!1}}},{paths:_bn,texts:xbn,bounds:bbn,circles:Sbn,refblocks:wbn}=W3e,Z3e=l0(W3e).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),J3t=Cl(Z3e),e4t={paths:{path11:{type:"path",points:[{x:-.5307178,y:0},{x:-.3042887999999997,y:0}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.2899773000000003,y:0},{x:.5307178000000001,y:0}],color:"primary",fill:!1}},texts:{left1:{type:"text",text:"Wh",x:0,y:-.025}},refblocks:{left1:{x:-.5446330999999993,y:.000852800000000542},right1:{x:.5381638000000004,y:-.00014359999999924433}},bounds:{width:1.0614356000000003,height:1,centerX:5551115123125783e-32,centerY:0},circles:{path1:{type:"circle",x:-.006997299999999651,y:-.007128299999999532,radius:.28854213,color:"primary",fill:!1}}},{paths:t4t,texts:n4t,bounds:ZO,refblocks:Q3e,circles:r4t}=e4t,CW=Bm({primitives:[...Object.values(t4t),...Object.values(r4t),{type:"text",text:"{REF}",x:0,y:-.3594553499999995,anchor:"middle_top"},{type:"text",text:"{VAL}",x:0,y:.35,anchor:"middle_bottom"},{...n4t.left1,anchor:"center",y:.01,fontSize:.2}],ports:[{...Q3e.left1,labels:["1"]},{...Q3e.right1,labels:["2"]}],size:{width:ZO.width,height:ZO.height},center:{x:ZO.centerX,y:ZO.centerY}}),{5:i4t,...a4t}=CW.primitives;function o4t(n){return typeof n=="object"}var K3e=Cl({...CW,primitives:Object.values(a4t).filter(o4t)}),s4t={...K3e,primitives:[...K3e.primitives,i4t]},l4t={paths:{path11:{type:"path",points:[{x:-.5307178,y:0},{x:-.3042887999999997,y:0}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.2899773000000003,y:0},{x:.5307178000000001,y:0}],color:"primary",fill:!1}},texts:{left1:{type:"text",text:"W",x:0,y:-.025}},refblocks:{left1:{x:-.5446330999999993,y:.000852800000000542},right1:{x:.5381638000000004,y:-.00014359999999924433}},bounds:{width:1.0614356000000003,height:1,centerX:5551115123125783e-32,centerY:0},circles:{path1:{type:"circle",x:-.006997299999999651,y:-.007128299999999532,radius:.28854213,color:"primary",fill:!1}}},{paths:c4t,texts:u4t,bounds:QO,refblocks:J3e,circles:f4t}=l4t,RW=Bm({primitives:[...Object.values(c4t),...Object.values(f4t),{type:"text",text:"{REF}",x:0,y:-.3594553499999995,anchor:"middle_top"},{type:"text",text:"{VAL}",x:0,y:.35,anchor:"middle_bottom"},{...u4t.left1,anchor:"center",y:.01,fontSize:.3}],ports:[{...J3e.left1,labels:["1"]},{...J3e.right1,labels:["2"]}],size:{width:QO.width,height:QO.height},center:{x:QO.centerX,y:QO.centerY}}),{5:d4t,...p4t}=RW.primitives;function h4t(n){return typeof n=="object"}var e4e=Cl({...RW,primitives:Object.values(p4t).filter(h4t)}),m4t={...e4e,primitives:[...e4e.primitives,d4t]},v4t={paths:{path40:{type:"path",points:[{x:.14458890000000002,y:.04403629999999992},{x:-.1199943999999995,y:-.08825540000000043}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.1199943999999995,y:.17632800000000026},{x:.14458890000000002,y:.04403629999999992}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.1199943999999995,y:-.0882553999999991},{x:-.1199943999999995,y:.17632800000000026}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.14458890000000002,y:.17632800000000026},{x:.14458890000000002,y:-.0882553999999991}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.12219909999999956,y:.04403629999999992},{x:-.5168693999999996,y:.04403629999999992}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.5233797000000002,y:.043951100000000354},{x:.1496715999999998,y:.043951100000000354}],color:"primary",fill:!1},"path43-8":{type:"path",points:[{x:.14339119999999994,y:.17681090000000044},{x:.07728679999999954,y:.17632089999999967}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.0050250999999996715,y:.27384530000000007},bottom1:{type:"text",text:"{VAL}",x:-.00011179999999977319,y:-.27384529999999985}},refblocks:{left1:{x:-.5191471000000001,y:.044920700000000924},right1:{x:.5191470999999999,y:.04389609999999999}},bounds:{width:1.094611082,height:.5476905999999999,centerX:-11102230246251565e-32,centerY:11102230246251565e-32},circles:{}},{paths:y4t,texts:t4e,bounds:KO,refblocks:n4e,circles:g4t}=v4t,r4e=Bm({primitives:[...Object.values(y4t),...Object.values(g4t),{...t4e.top1,anchor:"middle_bottom"},{...t4e.bottom1,anchor:"middle_top"}],ports:[{...n4e.left1,labels:["1"]},{...n4e.right1,labels:["2"]}],size:{width:KO.width,height:KO.height},center:{x:KO.centerX,y:KO.centerY}}),AW=Cl(r4e),_4t=AW.primitives.find(n=>n.type==="text"&&n.text==="{REF}"),x4t=AW.primitives.find(n=>n.type==="text"&&n.text==="{VAL}");_4t.anchor="middle_left",x4t.anchor="middle_right";var b4t=AW,z3={ac_voltmeter_horz:s5e,ac_voltmeter_vert:j_t,avalanche_diode_horz:u5e,avalanche_diode_vert:q_t,battery_horz:p5e,battery_vert:Z_t,boxresistor_down:ext,boxresistor_left:rxt,boxresistor_right:oxt,boxresistor_up:cxt,capacitor_down:dxt,capacitor_left:pxt,capacitor_polarized_down:vxt,capacitor_polarized_left:yxt,capacitor_polarized_right:E5e,capacitor_polarized_up:xxt,capacitor_right:bxt,capacitor_up:Ext,constant_current_diode_horz:Txt,constant_current_diode_vert:Mxt,crystal_4pin_horz:R5e,crystal_4pin_vert:Rxt,crystal_horz:Axt,crystal_vert:Pxt,darlington_pair_transistor_horz:Nxt,darlington_pair_transistor_vert:Dxt,dc_ammeter_horz:TY,dc_ammeter_vert:jxt,dc_voltmeter_horz:RY,dc_voltmeter_vert:Wxt,diac_horz:O5e,diac_vert:Jxt,diode_down:t2t,diode_left:n2t,diode_right:oO,diode_up:r2t,dpdt_normally_closed_switch_down:a2t,dpdt_normally_closed_switch_left:o2t,dpdt_normally_closed_switch_right:sO,dpdt_normally_closed_switch_up:s2t,dpdt_switch_down:c2t,dpdt_switch_left:u2t,dpdt_switch_right:lO,dpdt_switch_up:f2t,dpst_normally_closed_switch_down:p2t,dpst_normally_closed_switch_left:h2t,dpst_normally_closed_switch_right:cO,dpst_normally_closed_switch_up:m2t,dpst_switch_down:y2t,dpst_switch_left:g2t,dpst_switch_right:uO,dpst_switch_up:_2t,filled_diode_horz:k5e,filled_diode_vert:b2t,frequency_meter_horz:fX,frequency_meter_vert:A2t,fuse_horz:j5e,fuse_vert:L2t,ground_horz:H5e,ground_vert:F2t,gunn_diode_horz:B2t,gunn_diode_vert:j2t,icled_down:V2t,icled_left:$2t,icled_right:pO,icled_up:q2t,igbt_transistor_horz:V5e,igbt_transistor_vert:X2t,illuminated_push_button_normally_open_horz:G5e,illuminated_push_button_normally_open_vert:Z2t,inductor_down:e5t,inductor_left:t5t,inductor_right:gX,inductor_up:Z5e,laser_diode_horz:K5e,laser_diode_vert:r5t,led_down:s5t,led_left:l5t,led_right:vO,led_up:u5t,light_dependent_resistor_horz:abe,light_dependent_resistor_vert:h5t,mosfet_depletion_normally_on_horz:cbe,mosfet_depletion_normally_on_vert:y5t,mushroom_head_normally_open_momentary_horz:pbe,mushroom_head_normally_open_momentary_vert:b5t,n_channel_d_mosfet_transistor_horz:mbe,n_channel_d_mosfet_transistor_vert:T5t,n_channel_e_mosfet_transistor_horz:_be,n_channel_e_mosfet_transistor_vert:A5t,njfet_transistor_horz:wbe,njfet_transistor_vert:L5t,npn_bipolar_transistor_horz:Mbe,npn_bipolar_transistor_vert:k5t,opamp_no_power_down:F5t,opamp_no_power_left:B5t,opamp_no_power_right:EO,opamp_no_power_up:j5t,opamp_with_power_down:V5t,opamp_with_power_left:$5t,opamp_with_power_right:TO,opamp_with_power_up:G5t,p_channel_d_mosfet_transistor_horz:Rbe,p_channel_d_mosfet_transistor_vert:W5t,p_channel_e_mosfet_transistor_horz:Dbe,p_channel_e_mosfet_transistor_vert:J5t,photodiode_horz:zbe,photodiode_vert:nbt,pjfet_transistor_horz:Fbe,pjfet_transistor_vert:obt,pnp_bipolar_transistor_horz:Vbe,pnp_bipolar_transistor_vert:ubt,potentiometer_horz:qbe,potentiometer_vert:hbt,potentiometer2_horz:Wbe,potentiometer2_vert:_bt,potentiometer3_down:bbt,potentiometer3_left:Sbt,potentiometer3_right:NO,potentiometer3_up:wbt,power_factor_meter_horz:Jbe,power_factor_meter_vert:Cbt,push_button_normally_closed_momentary_horz:r3e,push_button_normally_closed_momentary_vert:Nbt,push_button_normally_open_momentary_horz:o3e,push_button_normally_open_momentary_vert:zbt,rectifier_diode_horz:l3e,rectifier_diode_vert:jbt,resonator_horz:c3e,resonator_vert:Gbt,schottky_diode_horz:u3e,schottky_diode_vert:Wbt,silicon_controlled_rectifier_horz:d3e,silicon_controlled_rectifier_vert:Qbt,spdt_normally_closed_switch_down:Jbt,spdt_normally_closed_switch_left:e3t,spdt_normally_closed_switch_right:IO,spdt_normally_closed_switch_up:t3t,SPDT_switch_horz:y3e,SPDT_switch_vert:i3t,spst_normally_closed_switch_down:a3t,spst_normally_closed_switch_left:o3t,spst_normally_closed_switch_right:jO,spst_normally_closed_switch_up:s3t,SPST_switch_horz:x3e,SPST_switch_vert:l3t,step_recovery_diode_horz:E3e,step_recovery_diode_vert:c3t,tachometer_horz:bW,tachometer_vert:y3t,triac_horz:R3e,triac_vert:x3t,tunnel_diode_horz:L3e,tunnel_diode_vert:M3t,unijunction_transistor_horz:z3e,unijunction_transistor_vert:N3t,var_meter_horz:B3e,var_meter_vert:z3t,varactor_diode_horz:V3e,varactor_diode_vert:j3t,varistor_horz:q3e,varistor_vert:$3t,varmeter_horz:MW,varmeter_vert:K3t,volt_meter_horz:Z3e,volt_meter_vert:J3t,watt_hour_meter_horz:CW,watt_hour_meter_vert:s4t,wattmeter_horz:RW,wattmeter_vert:m4t,zener_diode_horz:r4e,zener_diode_vert:b4t};Object.fromEntries(Object.keys(z3).map(n=>[n,n]));var e2;(function(n){n.Root="root",n.Text="text",n.Directive="directive",n.Comment="comment",n.Script="script",n.Style="style",n.Tag="tag",n.CDATA="cdata",n.Doctype="doctype"})(e2||(e2={}));function S4t(n){return n.type===e2.Tag||n.type===e2.Script||n.type===e2.Style}const w4t=e2.Root,E4t=e2.Text,T4t=e2.Directive,M4t=e2.Comment,C4t=e2.Script,R4t=e2.Style,A4t=e2.Tag,P4t=e2.CDATA,N4t=e2.Doctype;function U3(n){return S4t(n)}function PW(n){return n.type===e2.CDATA}function gE(n){return n.type===e2.Text}function i4e(n){return n.type===e2.Comment}function D4t(n){return n.type===e2.Root}function u4(n){return Object.prototype.hasOwnProperty.call(n,"children")}const a4e=/["&'<>$\x80-\uFFFF]/g,L4t=new Map([[34,"&quot;"],[38,"&amp;"],[39,"&apos;"],[60,"&lt;"],[62,"&gt;"]]),O4t=String.prototype.codePointAt!=null?(n,e)=>n.codePointAt(e):(n,e)=>(n.charCodeAt(e)&64512)===55296?(n.charCodeAt(e)-55296)*1024+n.charCodeAt(e+1)-56320+65536:n.charCodeAt(e);function o4e(n){let e="",t=0,r;for(;(r=a4e.exec(n))!==null;){const i=r.index,a=n.charCodeAt(i),o=L4t.get(a);o!==void 0?(e+=n.substring(t,i)+o,t=i+1):(e+=`${n.substring(t,i)}&#x${O4t(n,i).toString(16)};`,t=a4e.lastIndex+=+((a&64512)===55296))}return e+n.substr(t)}function s4e(n,e){return function(r){let i,a=0,o="";for(;i=n.exec(r);)a!==i.index&&(o+=r.substring(a,i.index)),o+=e.get(i[0].charCodeAt(0)),a=i.index+1;return o+r.substring(a)}}const z4t=s4e(/["&\u00A0]/g,new Map([[34,"&quot;"],[38,"&amp;"],[160,"&nbsp;"]])),U4t=s4e(/[&<>\u00A0]/g,new Map([[38,"&amp;"],[60,"&lt;"],[62,"&gt;"],[160,"&nbsp;"]])),k4t=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(n=>[n.toLowerCase(),n])),I4t=new Map(["definitionURL","attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(n=>[n.toLowerCase(),n])),F4t=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function B4t(n){return n.replace(/"/g,"&quot;")}function j4t(n,e){var t;if(!n)return;const r=((t=e.encodeEntities)!==null&&t!==void 0?t:e.decodeEntities)===!1?B4t:e.xmlMode||e.encodeEntities!=="utf8"?o4e:z4t;return Object.keys(n).map(i=>{var a,o;const s=(a=n[i])!==null&&a!==void 0?a:"";return e.xmlMode==="foreign"&&(i=(o=I4t.get(i))!==null&&o!==void 0?o:i),!e.emptyAttrs&&!e.xmlMode&&s===""?i:`${i}="${r(s)}"`}).join(" ")}const l4e=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function NW(n,e={}){const t="length"in n?n:[n];let r="";for(let i=0;i<t.length;i++)r+=H4t(t[i],e);return r}function H4t(n,e){switch(n.type){case w4t:return NW(n.children,e);case N4t:case T4t:return q4t(n);case M4t:return W4t(n);case P4t:return X4t(n);case C4t:case R4t:case A4t:return G4t(n,e);case E4t:return Y4t(n,e)}}const V4t=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),$4t=new Set(["svg","math"]);function G4t(n,e){var t;e.xmlMode==="foreign"&&(n.name=(t=k4t.get(n.name))!==null&&t!==void 0?t:n.name,n.parent&&V4t.has(n.parent.name)&&(e={...e,xmlMode:!1})),!e.xmlMode&&$4t.has(n.name)&&(e={...e,xmlMode:"foreign"});let r=`<${n.name}`;const i=j4t(n.attribs,e);return i&&(r+=` ${i}`),n.children.length===0&&(e.xmlMode?e.selfClosingTags!==!1:e.selfClosingTags&&l4e.has(n.name))?(e.xmlMode||(r+=" "),r+="/>"):(r+=">",n.children.length>0&&(r+=NW(n.children,e)),(e.xmlMode||!l4e.has(n.name))&&(r+=`</${n.name}>`)),r}function q4t(n){return`<${n.data}>`}function Y4t(n,e){var t;let r=n.data||"";return((t=e.encodeEntities)!==null&&t!==void 0?t:e.decodeEntities)!==!1&&!(!e.xmlMode&&n.parent&&F4t.has(n.parent.name))&&(r=e.xmlMode||e.encodeEntities!=="utf8"?o4e(r):U4t(r)),r}function X4t(n){return`<![CDATA[${n.children[0].data}]]>`}function W4t(n){return`<!--${n.data}-->`}function c4e(n,e){return NW(n,e)}function Z4t(n,e){return u4(n)?n.children.map(t=>c4e(t,e)).join(""):""}function JO(n){return Array.isArray(n)?n.map(JO).join(""):U3(n)?n.name==="br"?`
864
864
  `:JO(n.children):PW(n)?JO(n.children):gE(n)?n.data:""}function ez(n){return Array.isArray(n)?n.map(ez).join(""):u4(n)&&!i4e(n)?ez(n.children):gE(n)?n.data:""}function DW(n){return Array.isArray(n)?n.map(DW).join(""):u4(n)&&(n.type===e2.Tag||PW(n))?DW(n.children):gE(n)?n.data:""}function u4e(n){return u4(n)?n.children:[]}function f4e(n){return n.parent||null}function Q4t(n){const e=f4e(n);if(e!=null)return u4e(e);const t=[n];let{prev:r,next:i}=n;for(;r!=null;)t.unshift(r),{prev:r}=r;for(;i!=null;)t.push(i),{next:i}=i;return t}function K4t(n,e){var t;return(t=n.attribs)===null||t===void 0?void 0:t[e]}function J4t(n,e){return n.attribs!=null&&Object.prototype.hasOwnProperty.call(n.attribs,e)&&n.attribs[e]!=null}function eSt(n){return n.name}function tSt(n){let{next:e}=n;for(;e!==null&&!U3(e);)({next:e}=e);return e}function nSt(n){let{prev:e}=n;for(;e!==null&&!U3(e);)({prev:e}=e);return e}function MC(n){if(n.prev&&(n.prev.next=n.next),n.next&&(n.next.prev=n.prev),n.parent){const e=n.parent.children,t=e.lastIndexOf(n);t>=0&&e.splice(t,1)}n.next=null,n.prev=null,n.parent=null}function rSt(n,e){const t=e.prev=n.prev;t&&(t.next=e);const r=e.next=n.next;r&&(r.prev=e);const i=e.parent=n.parent;if(i){const a=i.children;a[a.lastIndexOf(n)]=e,n.parent=null}}function iSt(n,e){if(MC(e),e.next=null,e.parent=n,n.children.push(e)>1){const t=n.children[n.children.length-2];t.next=e,e.prev=t}else e.prev=null}function aSt(n,e){MC(e);const{parent:t}=n,r=n.next;if(e.next=r,e.prev=n,n.next=e,e.parent=t,r){if(r.prev=e,t){const i=t.children;i.splice(i.lastIndexOf(r),0,e)}}else t&&t.children.push(e)}function oSt(n,e){if(MC(e),e.parent=n,e.prev=null,n.children.unshift(e)!==1){const t=n.children[1];t.prev=e,e.next=t}else e.next=null}function sSt(n,e){MC(e);const{parent:t}=n;if(t){const r=t.children;r.splice(r.indexOf(n),0,e)}n.prev&&(n.prev.next=e),e.parent=t,e.prev=n.prev,e.next=n,n.prev=e}function CC(n,e,t=!0,r=1/0){return d4e(n,Array.isArray(e)?e:[e],t,r)}function d4e(n,e,t,r){const i=[],a=[Array.isArray(e)?e:[e]],o=[0];for(;;){if(o[0]>=a[0].length){if(o.length===1)return i;a.shift(),o.shift();continue}const s=a[0][o[0]++];if(n(s)&&(i.push(s),--r<=0))return i;t&&u4(s)&&s.children.length>0&&(o.unshift(0),a.unshift(s.children))}}function lSt(n,e){return e.find(n)}function LW(n,e,t=!0){const r=Array.isArray(e)?e:[e];for(let i=0;i<r.length;i++){const a=r[i];if(U3(a)&&n(a))return a;if(t&&u4(a)&&a.children.length>0){const o=LW(n,a.children,!0);if(o)return o}}return null}function p4e(n,e){return(Array.isArray(e)?e:[e]).some(t=>U3(t)&&n(t)||u4(t)&&p4e(n,t.children))}function cSt(n,e){const t=[],r=[Array.isArray(e)?e:[e]],i=[0];for(;;){if(i[0]>=r[0].length){if(r.length===1)return t;r.shift(),i.shift();continue}const a=r[0][i[0]++];U3(a)&&n(a)&&t.push(a),u4(a)&&a.children.length>0&&(i.unshift(0),r.unshift(a.children))}}const tz={tag_name(n){return typeof n=="function"?e=>U3(e)&&n(e.name):n==="*"?U3:e=>U3(e)&&e.name===n},tag_type(n){return typeof n=="function"?e=>n(e.type):e=>e.type===n},tag_contains(n){return typeof n=="function"?e=>gE(e)&&n(e.data):e=>gE(e)&&e.data===n}};function OW(n,e){return typeof e=="function"?t=>U3(t)&&e(t.attribs[n]):t=>U3(t)&&t.attribs[n]===e}function uSt(n,e){return t=>n(t)||e(t)}function h4e(n){const e=Object.keys(n).map(t=>{const r=n[t];return Object.prototype.hasOwnProperty.call(tz,t)?tz[t](r):OW(t,r)});return e.length===0?null:e.reduce(uSt)}function fSt(n,e){const t=h4e(n);return t?t(e):!0}function dSt(n,e,t,r=1/0){const i=h4e(n);return i?CC(i,e,t,r):[]}function pSt(n,e,t=!0){return Array.isArray(e)||(e=[e]),LW(OW("id",n),e,t)}function _E(n,e,t=!0,r=1/0){return CC(tz.tag_name(n),e,t,r)}function hSt(n,e,t=!0,r=1/0){return CC(OW("class",n),e,t,r)}function mSt(n,e,t=!0,r=1/0){return CC(tz.tag_type(n),e,t,r)}function vSt(n){let e=n.length;for(;--e>=0;){const t=n[e];if(e>0&&n.lastIndexOf(t,e-1)>=0){n.splice(e,1);continue}for(let r=t.parent;r;r=r.parent)if(n.includes(r)){n.splice(e,1);break}}return n}var k3;(function(n){n[n.DISCONNECTED=1]="DISCONNECTED",n[n.PRECEDING=2]="PRECEDING",n[n.FOLLOWING=4]="FOLLOWING",n[n.CONTAINS=8]="CONTAINS",n[n.CONTAINED_BY=16]="CONTAINED_BY"})(k3||(k3={}));function m4e(n,e){const t=[],r=[];if(n===e)return 0;let i=u4(n)?n:n.parent;for(;i;)t.unshift(i),i=i.parent;for(i=u4(e)?e:e.parent;i;)r.unshift(i),i=i.parent;const a=Math.min(t.length,r.length);let o=0;for(;o<a&&t[o]===r[o];)o++;if(o===0)return k3.DISCONNECTED;const s=t[o-1],l=s.children,c=t[o],u=r[o];return l.indexOf(c)>l.indexOf(u)?s===e?k3.FOLLOWING|k3.CONTAINED_BY:k3.FOLLOWING:s===n?k3.PRECEDING|k3.CONTAINS:k3.PRECEDING}function ySt(n){return n=n.filter((e,t,r)=>!r.includes(e,t+1)),n.sort((e,t)=>{const r=m4e(e,t);return r&k3.PRECEDING?-1:r&k3.FOLLOWING?1:0}),n}function gSt(n){const e=nz(wSt,n);return e?e.name==="feed"?_St(e):xSt(e):null}function _St(n){var e;const t=n.children,r={type:"atom",items:_E("entry",t).map(o=>{var s;const{children:l}=o,c={media:v4e(l)};Ib(c,"id","id",l),Ib(c,"title","title",l);const u=(s=nz("link",l))===null||s===void 0?void 0:s.attribs.href;u&&(c.link=u);const f=K8("summary",l)||K8("content",l);f&&(c.description=f);const d=K8("updated",l);return d&&(c.pubDate=new Date(d)),c})};Ib(r,"id","id",t),Ib(r,"title","title",t);const i=(e=nz("link",t))===null||e===void 0?void 0:e.attribs.href;i&&(r.link=i),Ib(r,"description","subtitle",t);const a=K8("updated",t);return a&&(r.updated=new Date(a)),Ib(r,"author","email",t,!0),r}function xSt(n){var e,t;const r=(t=(e=nz("channel",n.children))===null||e===void 0?void 0:e.children)!==null&&t!==void 0?t:[],i={type:n.name.substr(0,3),id:"",items:_E("item",n.children).map(o=>{const{children:s}=o,l={media:v4e(s)};Ib(l,"id","guid",s),Ib(l,"title","title",s),Ib(l,"link","link",s),Ib(l,"description","description",s);const c=K8("pubDate",s)||K8("dc:date",s);return c&&(l.pubDate=new Date(c)),l})};Ib(i,"title","title",r),Ib(i,"link","link",r),Ib(i,"description","description",r);const a=K8("lastBuildDate",r);return a&&(i.updated=new Date(a)),Ib(i,"author","managingEditor",r,!0),i}const bSt=["url","type","lang"],SSt=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function v4e(n){return _E("media:content",n).map(e=>{const{attribs:t}=e,r={medium:t.medium,isDefault:!!t.isDefault};for(const i of bSt)t[i]&&(r[i]=t[i]);for(const i of SSt)t[i]&&(r[i]=parseInt(t[i],10));return t.expression&&(r.expression=t.expression),r})}function nz(n,e){return _E(n,e,!0,1)[0]}function K8(n,e,t=!1){return ez(_E(n,e,t,1)).trim()}function Ib(n,e,t,r,i=!1){const a=K8(t,r,i);a&&(n[e]=a)}function wSt(n){return n==="rss"||n==="feed"||n==="rdf:RDF"}const y4e=Object.freeze(Object.defineProperty({__proto__:null,get DocumentPosition(){return k3},append:aSt,appendChild:iSt,compareDocumentPosition:m4e,existsOne:p4e,filter:CC,find:d4e,findAll:cSt,findOne:LW,findOneChild:lSt,getAttributeValue:K4t,getChildren:u4e,getElementById:pSt,getElements:dSt,getElementsByClassName:hSt,getElementsByTagName:_E,getElementsByTagType:mSt,getFeed:gSt,getInnerHTML:Z4t,getName:eSt,getOuterHTML:c4e,getParent:f4e,getSiblings:Q4t,getText:JO,hasAttrib:J4t,hasChildren:u4,innerText:DW,isCDATA:PW,isComment:i4e,isDocument:D4t,isTag:U3,isText:gE,nextElementSibling:tSt,prepend:sSt,prependChild:oSt,prevElementSibling:nSt,removeElement:MC,removeSubsets:vSt,replaceElement:rSt,testElement:fSt,textContent:ez,uniqueSort:ySt},Symbol.toStringTag,{value:"Module"}));var zW,g4e;function ESt(){return g4e||(g4e=1,zW={trueFunc:function(){return!0},falseFunc:function(){return!1}}),zW}var TSt=ESt();const Xh=n_(TSt);var z0;(function(n){n.Attribute="attribute",n.Pseudo="pseudo",n.PseudoElement="pseudo-element",n.Tag="tag",n.Universal="universal",n.Adjacent="adjacent",n.Child="child",n.Descendant="descendant",n.Parent="parent",n.Sibling="sibling",n.ColumnCombinator="column-combinator"})(z0||(z0={}));var t2;(function(n){n.Any="any",n.Element="element",n.End="end",n.Equals="equals",n.Exists="exists",n.Hyphen="hyphen",n.Not="not",n.Start="start"})(t2||(t2={}));const _4e=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,MSt=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,CSt=new Map([[126,t2.Element],[94,t2.Start],[36,t2.End],[42,t2.Any],[33,t2.Not],[124,t2.Hyphen]]),RSt=new Set(["has","not","matches","is","where","host","host-context"]);function ASt(n){switch(n.type){case z0.Adjacent:case z0.Child:case z0.Descendant:case z0.Parent:case z0.Sibling:case z0.ColumnCombinator:return!0;default:return!1}}const PSt=new Set(["contains","icontains"]);function NSt(n,e,t){const r=parseInt(e,16)-65536;return r!==r||t?e:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,r&1023|56320)}function RC(n){return n.replace(MSt,NSt)}function UW(n){return n===39||n===34}function x4e(n){return n===32||n===9||n===10||n===12||n===13}function b4e(n){const e=[],t=S4e(e,`${n}`,0);if(t<n.length)throw new Error(`Unmatched selector: ${n.slice(t)}`);return e}function S4e(n,e,t){let r=[];function i(d){const v=e.slice(t+d).match(_4e);if(!v)throw new Error(`Expected name, found ${e.slice(t)}`);const[y]=v;return t+=d+y.length,RC(y)}function a(d){for(t+=d;t<e.length&&x4e(e.charCodeAt(t));)t++}function o(){t+=1;const d=t;let v=1;for(;v>0&&t<e.length;t++)e.charCodeAt(t)===40&&!s(t)?v++:e.charCodeAt(t)===41&&!s(t)&&v--;if(v)throw new Error("Parenthesis not matched");return RC(e.slice(d,t-1))}function s(d){let v=0;for(;e.charCodeAt(--d)===92;)v++;return(v&1)===1}function l(){if(r.length>0&&ASt(r[r.length-1]))throw new Error("Did not expect successive traversals.")}function c(d){if(r.length>0&&r[r.length-1].type===z0.Descendant){r[r.length-1].type=d;return}l(),r.push({type:d})}function u(d,v){r.push({type:z0.Attribute,name:d,action:v,value:i(1),namespace:null,ignoreCase:"quirks"})}function f(){if(r.length&&r[r.length-1].type===z0.Descendant&&r.pop(),r.length===0)throw new Error("Empty sub-selector");n.push(r)}if(a(0),e.length===t)return t;e:for(;t<e.length;){const d=e.charCodeAt(t);switch(d){case 32:case 9:case 10:case 12:case 13:{(r.length===0||r[0].type!==z0.Descendant)&&(l(),r.push({type:z0.Descendant})),a(1);break}case 62:{c(z0.Child),a(1);break}case 60:{c(z0.Parent),a(1);break}case 126:{c(z0.Sibling),a(1);break}case 43:{c(z0.Adjacent),a(1);break}case 46:{u("class",t2.Element);break}case 35:{u("id",t2.Equals);break}case 91:{a(1);let v,y=null;e.charCodeAt(t)===124?v=i(1):e.startsWith("*|",t)?(y="*",v=i(2)):(v=i(0),e.charCodeAt(t)===124&&e.charCodeAt(t+1)!==61&&(y=v,v=i(1))),a(0);let w=t2.Exists;const b=CSt.get(e.charCodeAt(t));if(b){if(w=b,e.charCodeAt(t+1)!==61)throw new Error("Expected `=`");a(2)}else e.charCodeAt(t)===61&&(w=t2.Equals,a(1));let S="",M=null;if(w!=="exists"){if(UW(e.charCodeAt(t))){const G=e.charCodeAt(t);let q=t+1;for(;q<e.length&&(e.charCodeAt(q)!==G||s(q));)q+=1;if(e.charCodeAt(q)!==G)throw new Error("Attribute value didn't end");S=RC(e.slice(t+1,q)),t=q+1}else{const G=t;for(;t<e.length&&(!x4e(e.charCodeAt(t))&&e.charCodeAt(t)!==93||s(t));)t+=1;S=RC(e.slice(G,t))}a(0);const k=e.charCodeAt(t)|32;k===115?(M=!1,a(1)):k===105&&(M=!0,a(1))}if(e.charCodeAt(t)!==93)throw new Error("Attribute selector didn't terminate");t+=1;const N={type:z0.Attribute,name:v,action:w,value:S,namespace:y,ignoreCase:M};r.push(N);break}case 58:{if(e.charCodeAt(t+1)===58){r.push({type:z0.PseudoElement,name:i(2).toLowerCase(),data:e.charCodeAt(t)===40?o():null});continue}const v=i(1).toLowerCase();let y=null;if(e.charCodeAt(t)===40)if(RSt.has(v)){if(UW(e.charCodeAt(t+1)))throw new Error(`Pseudo-selector ${v} cannot be quoted`);if(y=[],t=S4e(y,e,t+1),e.charCodeAt(t)!==41)throw new Error(`Missing closing parenthesis in :${v} (${e})`);t+=1}else{if(y=o(),PSt.has(v)){const w=y.charCodeAt(0);w===y.charCodeAt(y.length-1)&&UW(w)&&(y=y.slice(1,-1))}y=RC(y)}r.push({type:z0.Pseudo,name:v,data:y});break}case 44:{f(),r=[],a(1);break}default:{if(e.startsWith("/*",t)){const w=e.indexOf("*/",t+2);if(w<0)throw new Error("Comment was not terminated");t=w+2,r.length===0&&a(0);break}let v=null,y;if(d===42)t+=1,y="*";else if(d===124){if(y="",e.charCodeAt(t+1)===124){c(z0.ColumnCombinator),a(2);break}}else if(_4e.test(e.slice(t)))y=i(0);else break e;e.charCodeAt(t)===124&&e.charCodeAt(t+1)!==124&&(v=y,e.charCodeAt(t+1)===42?(y="*",t+=2):y=i(1)),r.push(y==="*"?{type:z0.Universal,namespace:v}:{type:z0.Tag,name:y,namespace:v})}}}return f(),t}const w4e=new Map([[z0.Universal,50],[z0.Tag,30],[z0.Attribute,1],[z0.Pseudo,0]]);function kW(n){return!w4e.has(n.type)}const DSt=new Map([[t2.Exists,10],[t2.Equals,8],[t2.Not,7],[t2.Start,6],[t2.End,6],[t2.Any,5]]);function LSt(n){const e=n.map(E4e);for(let t=1;t<n.length;t++){const r=e[t];if(!(r<0))for(let i=t-1;i>=0&&r<e[i];i--){const a=n[i+1];n[i+1]=n[i],n[i]=a,e[i+1]=e[i],e[i]=r}}}function E4e(n){var e,t;let r=(e=w4e.get(n.type))!==null&&e!==void 0?e:-1;return n.type===z0.Attribute?(r=(t=DSt.get(n.action))!==null&&t!==void 0?t:4,n.action===t2.Equals&&n.name==="id"&&(r=9),n.ignoreCase&&(r>>=1)):n.type===z0.Pseudo&&(n.data?n.name==="has"||n.name==="contains"?r=0:Array.isArray(n.data)?(r=Math.min(...n.data.map(i=>Math.min(...i.map(E4e)))),r<0&&(r=0)):r=2:r=3),r}const OSt=/[-[\]{}()*+?.,\\^$|#\s]/g;function T4e(n){return n.replace(OSt,"\\$&")}const zSt=new Set(["accept","accept-charset","align","alink","axis","bgcolor","charset","checked","clear","codetype","color","compact","declare","defer","dir","direction","disabled","enctype","face","frame","hreflang","http-equiv","lang","language","link","media","method","multiple","nohref","noresize","noshade","nowrap","readonly","rel","rev","rules","scope","scrolling","selected","shape","target","text","type","valign","valuetype","vlink"]);function s7(n,e){return typeof n.ignoreCase=="boolean"?n.ignoreCase:n.ignoreCase==="quirks"?!!e.quirksMode:!e.xmlMode&&zSt.has(n.name)}const USt={equals(n,e,t){const{adapter:r}=t,{name:i}=e;let{value:a}=e;return s7(e,t)?(a=a.toLowerCase(),o=>{const s=r.getAttributeValue(o,i);return s!=null&&s.length===a.length&&s.toLowerCase()===a&&n(o)}):o=>r.getAttributeValue(o,i)===a&&n(o)},hyphen(n,e,t){const{adapter:r}=t,{name:i}=e;let{value:a}=e;const o=a.length;return s7(e,t)?(a=a.toLowerCase(),function(l){const c=r.getAttributeValue(l,i);return c!=null&&(c.length===o||c.charAt(o)==="-")&&c.substr(0,o).toLowerCase()===a&&n(l)}):function(l){const c=r.getAttributeValue(l,i);return c!=null&&(c.length===o||c.charAt(o)==="-")&&c.substr(0,o)===a&&n(l)}},element(n,e,t){const{adapter:r}=t,{name:i,value:a}=e;if(/\s/.test(a))return Xh.falseFunc;const o=new RegExp(`(?:^|\\s)${T4e(a)}(?:$|\\s)`,s7(e,t)?"i":"");return function(l){const c=r.getAttributeValue(l,i);return c!=null&&c.length>=a.length&&o.test(c)&&n(l)}},exists(n,{name:e},{adapter:t}){return r=>t.hasAttrib(r,e)&&n(r)},start(n,e,t){const{adapter:r}=t,{name:i}=e;let{value:a}=e;const o=a.length;return o===0?Xh.falseFunc:s7(e,t)?(a=a.toLowerCase(),s=>{const l=r.getAttributeValue(s,i);return l!=null&&l.length>=o&&l.substr(0,o).toLowerCase()===a&&n(s)}):s=>{var l;return!!(!((l=r.getAttributeValue(s,i))===null||l===void 0)&&l.startsWith(a))&&n(s)}},end(n,e,t){const{adapter:r}=t,{name:i}=e;let{value:a}=e;const o=-a.length;return o===0?Xh.falseFunc:s7(e,t)?(a=a.toLowerCase(),s=>{var l;return((l=r.getAttributeValue(s,i))===null||l===void 0?void 0:l.substr(o).toLowerCase())===a&&n(s)}):s=>{var l;return!!(!((l=r.getAttributeValue(s,i))===null||l===void 0)&&l.endsWith(a))&&n(s)}},any(n,e,t){const{adapter:r}=t,{name:i,value:a}=e;if(a==="")return Xh.falseFunc;if(s7(e,t)){const o=new RegExp(T4e(a),"i");return function(l){const c=r.getAttributeValue(l,i);return c!=null&&c.length>=a.length&&o.test(c)&&n(l)}}return o=>{var s;return!!(!((s=r.getAttributeValue(o,i))===null||s===void 0)&&s.includes(a))&&n(o)}},not(n,e,t){const{adapter:r}=t,{name:i}=e;let{value:a}=e;return a===""?o=>!!r.getAttributeValue(o,i)&&n(o):s7(e,t)?(a=a.toLowerCase(),o=>{const s=r.getAttributeValue(o,i);return(s==null||s.length!==a.length||s.toLowerCase()!==a)&&n(o)}):o=>r.getAttributeValue(o,i)!==a&&n(o)}},kSt=new Set([9,10,12,13,32]),M4e=48,ISt=57;function FSt(n){if(n=n.trim().toLowerCase(),n==="even")return[2,0];if(n==="odd")return[2,1];let e=0,t=0,r=a(),i=o();if(e<n.length&&n.charAt(e)==="n"&&(e++,t=r*(i??1),s(),e<n.length?(r=a(),s(),i=o()):r=i=0),i===null||e<n.length)throw new Error(`n-th rule couldn't be parsed ('${n}')`);return[t,r*i];function a(){return n.charAt(e)==="-"?(e++,-1):(n.charAt(e)==="+"&&e++,1)}function o(){const l=e;let c=0;for(;e<n.length&&n.charCodeAt(e)>=M4e&&n.charCodeAt(e)<=ISt;)c=c*10+(n.charCodeAt(e)-M4e),e++;return e===l?null:c}function s(){for(;e<n.length&&kSt.has(n.charCodeAt(e));)e++}}function BSt(n){const e=n[0],t=n[1]-1;if(t<0&&e<=0)return Xh.falseFunc;if(e===-1)return a=>a<=t;if(e===0)return a=>a===t;if(e===1)return t<0?Xh.trueFunc:a=>a>=t;const r=Math.abs(e),i=(t%r+r)%r;return e>1?a=>a>=t&&a%r===i:a=>a<=t&&a%r===i}function rz(n){return BSt(FSt(n))}function iz(n,e){return t=>{const r=e.getParent(t);return r!=null&&e.isTag(r)&&n(t)}}const IW={contains(n,e,{adapter:t}){return function(i){return n(i)&&t.getText(i).includes(e)}},icontains(n,e,{adapter:t}){const r=e.toLowerCase();return function(a){return n(a)&&t.getText(a).toLowerCase().includes(r)}},"nth-child"(n,e,{adapter:t,equals:r}){const i=rz(e);return i===Xh.falseFunc?Xh.falseFunc:i===Xh.trueFunc?iz(n,t):function(o){const s=t.getSiblings(o);let l=0;for(let c=0;c<s.length&&!r(o,s[c]);c++)t.isTag(s[c])&&l++;return i(l)&&n(o)}},"nth-last-child"(n,e,{adapter:t,equals:r}){const i=rz(e);return i===Xh.falseFunc?Xh.falseFunc:i===Xh.trueFunc?iz(n,t):function(o){const s=t.getSiblings(o);let l=0;for(let c=s.length-1;c>=0&&!r(o,s[c]);c--)t.isTag(s[c])&&l++;return i(l)&&n(o)}},"nth-of-type"(n,e,{adapter:t,equals:r}){const i=rz(e);return i===Xh.falseFunc?Xh.falseFunc:i===Xh.trueFunc?iz(n,t):function(o){const s=t.getSiblings(o);let l=0;for(let c=0;c<s.length;c++){const u=s[c];if(r(o,u))break;t.isTag(u)&&t.getName(u)===t.getName(o)&&l++}return i(l)&&n(o)}},"nth-last-of-type"(n,e,{adapter:t,equals:r}){const i=rz(e);return i===Xh.falseFunc?Xh.falseFunc:i===Xh.trueFunc?iz(n,t):function(o){const s=t.getSiblings(o);let l=0;for(let c=s.length-1;c>=0;c--){const u=s[c];if(r(o,u))break;t.isTag(u)&&t.getName(u)===t.getName(o)&&l++}return i(l)&&n(o)}},root(n,e,{adapter:t}){return r=>{const i=t.getParent(r);return(i==null||!t.isTag(i))&&n(r)}},scope(n,e,t,r){const{equals:i}=t;return!r||r.length===0?IW.root(n,e,t):r.length===1?a=>i(r[0],a)&&n(a):a=>r.includes(a)&&n(a)},hover:FW("isHovered"),visited:FW("isVisited"),active:FW("isActive")};function FW(n){return function(t,r,{adapter:i}){const a=i[n];return typeof a!="function"?Xh.falseFunc:function(s){return a(s)&&t(s)}}}const C4e={empty(n,{adapter:e}){return!e.getChildren(n).some(t=>e.isTag(t)||e.getText(t)!=="")},"first-child"(n,{adapter:e,equals:t}){if(e.prevElementSibling)return e.prevElementSibling(n)==null;const r=e.getSiblings(n).find(i=>e.isTag(i));return r!=null&&t(n,r)},"last-child"(n,{adapter:e,equals:t}){const r=e.getSiblings(n);for(let i=r.length-1;i>=0;i--){if(t(n,r[i]))return!0;if(e.isTag(r[i]))break}return!1},"first-of-type"(n,{adapter:e,equals:t}){const r=e.getSiblings(n),i=e.getName(n);for(let a=0;a<r.length;a++){const o=r[a];if(t(n,o))return!0;if(e.isTag(o)&&e.getName(o)===i)break}return!1},"last-of-type"(n,{adapter:e,equals:t}){const r=e.getSiblings(n),i=e.getName(n);for(let a=r.length-1;a>=0;a--){const o=r[a];if(t(n,o))return!0;if(e.isTag(o)&&e.getName(o)===i)break}return!1},"only-of-type"(n,{adapter:e,equals:t}){const r=e.getName(n);return e.getSiblings(n).every(i=>t(n,i)||!e.isTag(i)||e.getName(i)!==r)},"only-child"(n,{adapter:e,equals:t}){return e.getSiblings(n).every(r=>t(n,r)||!e.isTag(r))}};function R4e(n,e,t,r){if(t===null){if(n.length>r)throw new Error(`Pseudo-class :${e} requires an argument`)}else if(n.length===r)throw new Error(`Pseudo-class :${e} doesn't have any arguments`)}const jSt={"any-link":":is(a, area, link)[href]",link:":any-link:not(:visited)",disabled:`:is(
865
865
  :is(button, input, select, textarea, optgroup, option)[disabled],
866
866
  optgroup[disabled] > option,
@@ -13409,7 +13409,7 @@ ${r.slice(0,2e3)}
13409
13409
  50% { opacity: 0.2; }
13410
13410
  100% { opacity: 0.6; }
13411
13411
  }
13412
- `,i.appendChild(N)}})}};a();const o=new MutationObserver(a);return o.observe(i,{childList:!0,subtree:!1,characterData:!1}),()=>{o.disconnect()}},[n,t,e,r])},chn=Dy("schematic-viewer"),uhn=()=>{Dy.enable("schematic-viewer*")},fhn=chn,dhn=n=>{const[e,t]=Qe.useState(0),[r,i]=Qe.useState(0);return Qe.useEffect(()=>{if(!n.current)return;const a=()=>{var l;const s=(l=n.current)==null?void 0:l.getBoundingClientRect();t((s==null?void 0:s.width)||0),i((s==null?void 0:s.height)||0)};a();const o=new ResizeObserver(a);return o.observe(n.current),window.addEventListener("resize",a),()=>{o.disconnect(),window.removeEventListener("resize",a)}},[]),{containerWidth:e,containerHeight:r}},phn=fhn.extend("useComponentDragging"),hhn=({onEditEvent:n,editEvents:e=[],circuitJson:t,cancelDrag:r,svgToScreenProjection:i,realToSvgProjection:a,enabled:o=!1})=>{const[s,l]=Qe.useState(null),c=gu(a,i),u=Qe.useRef(null),f=Qe.useRef(null),d=Qe.useRef(new Map);Qe.useEffect(()=>{e.forEach(b=>{"edit_event_type"in b&&b.edit_event_type==="edit_schematic_component_location"&&!b.in_progress&&d.current.set(b.schematic_component_id,{...b.new_center})})},[e]);const v=Qe.useCallback(b=>{if(!o)return;const M=b.target.closest('[data-circuit-json-type="schematic_component"]');if(!M)return;const N=M.getAttribute("data-schematic-component-id");if(!N)return;r&&r();const k=n1(t).schematic_component.get(N);if(!k)return;u.current={x:b.clientX,y:b.clientY};let G;const q=d.current.get(N);if(q)G={...q};else{const Y=fZe({editEvents:e,schematic_component_id:N});G={x:k.center.x+Y.x,y:k.center.y+Y.y},d.current.set(N,{...G})}const X={edit_event_id:Math.random().toString(36).substr(2,9),edit_event_type:"edit_schematic_component_location",schematic_component_id:N,original_center:G,new_center:{...G},in_progress:!0,created_at:Date.now(),_element:M};f.current=X,l(X)},[r,o,t,e]),y=Qe.useCallback(b=>{if(!f.current||!u.current)return;const S={x:b.clientX-u.current.x,y:b.clientY-u.current.y},M={x:S.x/c.a,y:S.y/c.d},N={...f.current,new_center:{x:f.current.original_center.x+M.x,y:f.current.original_center.y+M.y}};f.current=N,l(N)},[c]),w=Qe.useCallback(()=>{if(!f.current)return;const b={...f.current,in_progress:!1};d.current.set(b.schematic_component_id,{...b.new_center}),phn("handleMouseUp calling onEditEvent with new edit event",{newEditEvent:b}),n&&n(b),f.current=null,u.current=null,l(null)},[n]);return Qe.useEffect(()=>(window.addEventListener("mousemove",y),window.addEventListener("mouseup",w),()=>{window.removeEventListener("mousemove",y),window.removeEventListener("mouseup",w)}),[y,w]),{handleMouseDown:v,isDragging:!!f.current,activeEditEvent:s}},mhn=({onClick:n,active:e})=>Fe.jsx("div",{onClick:n,style:{position:"absolute",top:"16px",right:"16px",backgroundColor:e?"#4CAF50":"#fff",color:e?"#fff":"#000",padding:"8px",borderRadius:"4px",cursor:"pointer",boxShadow:"0 2px 4px rgba(0,0,0,0.1)",display:"flex",alignItems:"center",gap:"4px",zIndex:1e3},children:Fe.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[Fe.jsx("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),Fe.jsx("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})}),vhn=({circuitJson:n,containerStyle:e,editEvents:t=[],onEditEvent:r,defaultEditMode:i=!1,debugGrid:a=!1,editingEnabled:o=!1,debug:s=!1,clickToInteractEnabled:l=!1})=>{s&&uhn();const[c,u]=Qe.useState(i),[f,d]=Qe.useState(!l),v=Qe.useRef(null),[y,w]=Qe.useState([]),b=Qe.useRef(n),S=he=>`${(he==null?void 0:he.length)||0}_${(he==null?void 0:he.editCount)||0}`;Qe.useEffect(()=>{const he=S(n),_e=S(b.current);he!==_e&&(w([]),b.current=n)},[n]);const{ref:M,cancelDrag:N,transform:k}=uZe({onSetTransform(he){v.current&&(v.current.style.transform=Q6(he))},enabled:f}),{containerWidth:G,containerHeight:q}=dhn(M),X=Qe.useMemo(()=>!G||!q?"":qde(n,{width:G,height:q||720,grid:a?{cellSize:1,labelCells:!0}:void 0}),[n,G,q]),Y=Qe.useMemo(()=>{var _e;if(!X)return Ly();const he=(_e=X.match(/data-real-to-screen-transform="([^"]+)"/))==null?void 0:_e[1];try{return jV(he)}catch(Te){return console.error(Te),Ly()}},[X]),ee=he=>{w(_e=>[..._e,he]),r&&r(he)},W=Qe.useMemo(()=>[...t,...y],[t,y]),{handleMouseDown:ue,isDragging:pe,activeEditEvent:de}=hhn({onEditEvent:ee,cancelDrag:N,realToSvgProjection:Y,svgToScreenProjection:k,circuitJson:n,editEvents:W,enabled:c&&f});shn({svgDivRef:v,editEvents:W,realToSvgProjection:Y,svgToScreenProjection:k,activeEditEvent:de}),lhn({svgDivRef:v,circuitJson:n,activeEditEvent:de,editEvents:W});const we=Qe.useMemo(()=>Fe.jsx("div",{ref:v,style:{pointerEvents:l?f?"auto":"none":"auto",transformOrigin:"0 0"},dangerouslySetInnerHTML:{__html:X}}),[X,f,l]);return Fe.jsxs("div",{ref:M,style:{position:"relative",backgroundColor:"#F5F1ED",overflow:"hidden",cursor:pe?"grabbing":l&&!f?"pointer":"grab",minHeight:"300px",...e},onMouseDown:he=>{if(l&&!f){he.preventDefault(),he.stopPropagation();return}ue(he)},onMouseDownCapture:he=>{if(l&&!f){he.preventDefault(),he.stopPropagation();return}},children:[!f&&l&&Fe.jsx("div",{onClick:he=>{he.preventDefault(),he.stopPropagation(),d(!0)},style:{position:"absolute",inset:0,cursor:"pointer",zIndex:10,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"all"},children:Fe.jsx("div",{style:{backgroundColor:"rgba(0, 0, 0, 0.8)",color:"white",padding:"12px 24px",borderRadius:"8px",fontSize:"16px",fontFamily:"sans-serif",pointerEvents:"none"},children:"Click to Interact"})}),o&&Fe.jsx(mhn,{active:c,onClick:()=>u(!c)}),we]})},yhn=n=>{const[e,t]=Qe.useState(0),[r,i]=Qe.useState(0);return Qe.useEffect(()=>{if(!n.current)return;const a=()=>{var l;const s=(l=n.current)==null?void 0:l.getBoundingClientRect();t((s==null?void 0:s.width)||0),i((s==null?void 0:s.height)||0)};a();const o=new ResizeObserver(a);return o.observe(n.current),window.addEventListener("resize",a),()=>{o.disconnect(),window.removeEventListener("resize",a)}},[]),{containerWidth:e,containerHeight:r}};Dy("assembly-viewer");var ghn=()=>{Dy.enable("assembly-viewer*")},_hn=({circuitJson:n,containerStyle:e,debugGrid:t=!1,debug:r=!1})=>{r&&ghn();const i=Qe.useRef(null),{ref:a}=uZe({onSetTransform(u){i.current&&(i.current.style.transform=Q6(u))}}),{containerWidth:o,containerHeight:s}=yhn(a),l=Qe.useMemo(()=>!o||!s?"":aZe(n,{width:o,height:s||720}),[n,o,s]);Qe.useMemo(()=>{var f;if(!l)return Ly();const u=(f=l.match(/data-real-to-screen-transform="([^"]+)"/))==null?void 0:f[1];try{return jV(u)}catch(d){return console.error(d),Ly()}},[l]);const c=Qe.useMemo(()=>Fe.jsx("div",{ref:i,style:{pointerEvents:"auto",transformOrigin:"0 0"},dangerouslySetInnerHTML:{__html:l}}),[l]);return Fe.jsx("div",{ref:a,style:{position:"relative",backgroundColor:"#F5F1ED",overflow:"hidden",minHeight:"300px",...e},children:c})};const Ew=({onRunClicked:n})=>Fe.jsxs("div",{className:"rf-flex rf-items-center rf-gap-3 rf-bg-gray-100 rf-text-center rf-justify-center rf-py-10",children:["No circuit json loaded",n&&Fe.jsxs(p2,{className:"rf-bg-blue-600 rf-hover:bg-blue-500",onClick:n,children:["Run Code",Fe.jsx(O$e,{className:"rf-w-3 rf-h-3 rf-ml-2"})]})]}),Lj=({text:n,onClick:e})=>Fe.jsx("span",{className:"rf-cursor-pointer rf-underline rf-text-blue-600 rf-mx-2",onClick:e,children:n}),Oj=n=>{var e;return Fe.jsxs("div",{className:"rf-leading-5",children:[Fe.jsx("div",{className:"rf-py-2 rf-font-bold",children:n.column.name}),Fe.jsx("div",{children:((e=n.field)==null?void 0:e.call(n))??Fe.jsx("input",{type:"text",className:"rf-border rf-rounded rf-p-1 rf-w-full",onChange:t=>{var r;(r=n.onTextChange)==null||r.call(n,t.target.value)}})})]})},xhn=({open:n,children:e,title:t,onClose:r})=>n?Fe.jsx("div",{className:"rf-fixed rf-inset-0 rf-bg-black rf-bg-opacity-50 rf-flex rf-justify-center rf-items-center rf-z-50",onClick:r,children:Fe.jsxs("div",{className:"rf-bg-white rf-p-5 rf-rounded-lg rf-relative rf-w-11/12 rf-max-w-2xl",onClick:i=>{i.preventDefault(),i.stopPropagation()},children:[Fe.jsx("h2",{className:"rf-mt-0 rf-text-md rf-pb-4",children:t}),Fe.jsx("button",{type:"button",className:"rf-absolute rf-top-2 rf-right-4 rf-text-2xl rf-font-bold",onClick:r,children:"×"}),e]})}):null,bhn=({elements:n})=>{const[e,t]=Qe.useState({open:!1}),[r,i]=Qe.useReducer((u,f)=>({...u,...f}),{}),a=[...new Set(n.map(u=>u.type))],o=n.map(u=>{const f=u[`${u.type}_id`],d=Object.fromEntries(Object.entries(u).filter(([y])=>!(y===`${u.type}_id`||!y.endsWith("_id")))),v=Object.fromEntries(Object.entries(u).filter(([y])=>!y.endsWith("_id")));return{primary_id:f,other_ids:d,...v,_og_elm:u}}),s=o.map(u=>{let f="";const d=v=>{const y=Object.keys(v.other_ids).find(S=>S.startsWith("source_"));if(!y)return`.${v.name}`;const w=y.slice(0,-3),b=o.find(S=>S.type===w&&S.primary_id===v.other_ids[y]);return b?"name"in b?`${d(b)} > .${v.name}`:`#${b.primary_id} > .${v.name}`:`??? > .${v.name}`};return"name"in u&&(f=d(u)),{...u,selector_path:f}}),l=[{key:"primary_id",name:"primary_id",renderCell:u=>Fe.jsxs("div",{className:"rf-flex rf-items-center",children:[Fe.jsx(Lj,{text:u.primary_id,onClick:()=>i({focused_id:u.primary_id,id_search:void 0,selector_search:void 0})}),Fe.jsx("span",{className:"rf-flex-grow"}),Fe.jsx(Lj,{text:"(JSON)",onClick:()=>t({open:!0,element:u._og_elm,title:u.primary_id})})]}),renderHeaderCell:u=>Fe.jsx(Oj,{column:u,onTextChange:f=>i({id_search:f}),field:r.focused_id?()=>Fe.jsxs("div",{children:["Focus:"," ",Fe.jsx("span",{className:"rf-underline",children:r.focused_id}),Fe.jsx(Lj,{text:"(unfocus)",onClick:()=>i({focused_id:void 0})})]}):void 0})},{key:"type",name:"type",renderHeaderCell:u=>Fe.jsx(Oj,{column:u,field:()=>Fe.jsxs("select",{onChange:f=>i({component_type_filter:f.target.value}),className:"rf-border rf-rounded rf-p-1 rf-w-full",children:[Fe.jsx("option",{value:"any",children:"any"},"any"),Fe.jsx("option",{value:"source",children:"source"},"source"),Fe.jsx("option",{value:"source/pcb",children:"source/pcb"},"source/pcb"),Fe.jsx("option",{value:"source/schematic",children:"source/schematic"},"source/schematic"),a.map(f=>Fe.jsx("option",{value:f,children:f},f))]})})},{key:"name",name:"name",renderHeaderCell:u=>Fe.jsx(Oj,{column:u,onTextChange:f=>i({name_search:f})})},{key:"selector_path",name:"selector_path",renderHeaderCell:u=>Fe.jsx(Oj,{column:u,onTextChange:f=>i({selector_search:f})})},{key:"other_ids",name:"other_ids",renderCell:u=>Fe.jsx("div",{className:"rf-space-x-2",children:Object.entries(u.other_ids).map(([f,d])=>Fe.jsx(Lj,{text:d,onClick:()=>i({focused_id:d})},d))})}],c=s.filter(u=>{var f,d;return r.name_search?(d=(f=u.name)==null?void 0:f.toLowerCase())==null?void 0:d.includes(r.name_search.toLowerCase()):!0}).filter(u=>{var f;return!r.component_type_filter||r.component_type_filter==="any"?!0:r.component_type_filter==="source"?u.type.startsWith("source_"):r.component_type_filter==="source/pcb"?u.type.startsWith("source_")||u.type.startsWith("pcb_"):r.component_type_filter==="source/schematic"?u.type.startsWith("source_")||u.type.startsWith("schematic_"):(f=u.type)==null?void 0:f.includes(r.component_type_filter)}).filter(u=>r.selector_search?r.selector_search.split(" ").filter(d=>d.length>0).every(d=>{var v;return(v=u.selector_path)==null?void 0:v.includes(d)}):!0).filter(u=>{var f;return r.id_search?(f=u.primary_id)==null?void 0:f.includes(r.id_search):!0}).filter(u=>!!(!r.focused_id||u.primary_id===r.focused_id||Object.values(u.other_ids).includes(r.focused_id)));return Fe.jsxs("div",{className:"rf-font-mono rf-text-xs rf-bg-white",children:[Fe.jsx("div",{className:"rf-overflow-x-auto",children:Fe.jsxs("table",{className:"rf-table-auto rf-w-full rf-text-left",children:[Fe.jsx("thead",{children:Fe.jsx("tr",{children:l.map(u=>Fe.jsx("th",{className:"rf-px-4 rf-py-2 rf-border-b",children:u.renderHeaderCell?u.renderHeaderCell(u):u.name},u.key))})}),Fe.jsx("tbody",{children:c.map((u,f)=>Fe.jsx("tr",{className:"rf-hover:bg-gray-100",children:l.map(d=>Fe.jsx("td",{className:"rf-px-4 rf-py-2 rf-border-b",children:d.renderCell?d.renderCell(u):u[d.key]},d.key))},f))})]})}),Fe.jsx(xhn,{open:e.open,onClose:()=>t({open:!1}),title:e.open?e.title:"",children:Fe.jsx("div",{className:"rf-bg-gray-800 rf-p-3 rf-text-white rf-rounded",children:Fe.jsx("pre",{className:"rf-whitespace-pre-wrap",children:e.open?JSON.stringify(e.element,null,2):""})})})]})},Shn=(n,e)=>n==="jlcpcb"?Fe.jsx("a",{className:"rf-underline rf-text-blue-500",target:"_blank",rel:"noreferrer",href:`https://jlcpcb.com/partdetail/${e}`,children:e}):e,whn=({circuitJson:n})=>{const e=n.filter(r=>r.type==="source_component"),t=new Set;for(const r of e)if(r.supplier_part_numbers)for(const i of Object.keys(r.supplier_part_numbers))t.add(i);return Fe.jsx("div",{className:"rf-overflow-x-auto",children:Fe.jsxs("table",{className:"rf-w-full rf-text-left rf-text-sm",children:[Fe.jsx("thead",{children:Fe.jsxs("tr",{className:"rf-border-b",children:[Fe.jsx("th",{className:"rf-p-2",children:"Name"}),Array.from(t).map(r=>Fe.jsx("th",{className:"rf-p-2 rf-capitalize",children:r},r))]})}),Fe.jsx("tbody",{children:e.map(r=>Fe.jsxs("tr",{className:"rf-border-b",children:[Fe.jsx("td",{className:"rf-p-2",children:r.name}),Array.from(t).map(i=>{var a,o;return Fe.jsx("td",{className:"rf-p-2",children:Shn(i,((o=(a=r.supplier_part_numbers)==null?void 0:a[i])==null?void 0:o[0])||"")},i)})]},r.source_component_id))})]})})},Ehn=({containerClassName:n,...e})=>{const t=Qe.useRef(null),[r,i]=Qe.useState(620);return Qe.useLayoutEffect(()=>{const a=()=>{if(t.current){const s=t.current.clientHeight,l=window.innerHeight;i(Math.min(Math.max(s,620),l))}};a();const o=new ResizeObserver(a);return t.current&&o.observe(t.current),window.addEventListener("resize",a),()=>{o.disconnect(),window.removeEventListener("resize",a)}},[]),Fe.jsx("div",{ref:t,className:n||"rf-w-full rf-h-full",children:Fe.jsx(Gin,{...e,height:r})})},Thn='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}:root{--radius:0.5rem}.rf-pointer-events-none{pointer-events:none}.rf-invisible{visibility:hidden}.rf-fixed{position:fixed}.rf-absolute{position:absolute}.rf-relative{position:relative}.rf-inset-0{inset:0}.-rf-left-2{left:-.5rem}.-rf-right-10{right:-2.5rem}.-rf-right-2{right:-.5rem}.-rf-right-4{right:-1rem}.-rf-right-6{right:-1.5rem}.-rf-right-7{right:-1.75rem}.-rf-right-8{right:-2rem}.-rf-right-9{right:-2.25rem}.rf-bottom-full{bottom:100%}.rf-left-0{left:0}.rf-left-1{left:.25rem}.rf-left-1\\/2{left:50%}.rf-left-2{left:.5rem}.rf-left-\\[50\\%\\]{left:50%}.rf-right-0{right:0}.rf-right-4{right:1rem}.rf-right-\\[4px\\]{right:4px}.rf-top-0{top:0}.rf-top-1{top:.25rem}.rf-top-2{top:.5rem}.rf-top-2\\.5{top:.625rem}.rf-top-\\[50\\%\\]{top:50%}.rf-top-\\[6px\\]{top:6px}.rf-z-50{z-index:50}.rf-z-\\[100\\]{z-index:100}.-rf-mx-1,.rf--mx-1{margin-left:-.25rem;margin-right:-.25rem}.rf-mx-1{margin-left:.25rem;margin-right:.25rem}.rf-mx-2{margin-left:.5rem;margin-right:.5rem}.rf-mx-auto{margin-left:auto;margin-right:auto}.rf-my-1{margin-bottom:.25rem;margin-top:.25rem}.rf-my-4{margin-bottom:1rem;margin-top:1rem}.rf-my-auto{margin-bottom:auto;margin-top:auto}.rf-mb-1{margin-bottom:.25rem}.rf-mb-12{margin-bottom:3rem}.rf-mb-2{margin-bottom:.5rem}.rf-mb-3{margin-bottom:.75rem}.rf-mb-4{margin-bottom:1rem}.rf-mb-6{margin-bottom:1.5rem}.rf-mb-8{margin-bottom:2rem}.rf-ml-1{margin-left:.25rem}.rf-ml-2{margin-left:.5rem}.rf-ml-auto{margin-left:auto}.rf-mr-1{margin-right:.25rem}.rf-mr-2{margin-right:.5rem}.rf-mt-0{margin-top:0}.rf-mt-0\\.5{margin-top:.125rem}.rf-mt-1{margin-top:.25rem}.rf-mt-2{margin-top:.5rem}.rf-mt-3{margin-top:.75rem}.rf-mt-4{margin-top:1rem}.rf-mt-auto{margin-top:auto}.rf-block{display:block}.rf-inline{display:inline}.rf-flex{display:flex}.rf-inline-flex{display:inline-flex}.rf-grid{display:grid}.rf-hidden{display:none}.rf-aspect-square{aspect-ratio:1/1}.rf-aspect-video{aspect-ratio:16/9}.rf-size-4{height:1rem;width:1rem}.\\!rf-h-2{height:.5rem!important}.\\!rf-h-2\\.5{height:.625rem!important}.\\!rf-h-3{height:.75rem!important}.\\!rf-h-full{height:100%!important}.rf-h-1{height:.25rem}.rf-h-10{height:2.5rem}.rf-h-2{height:.5rem}.rf-h-2\\.5{height:.625rem}.rf-h-3{height:.75rem}.rf-h-3\\.5{height:.875rem}.rf-h-4{height:1rem}.rf-h-5{height:1.25rem}.rf-h-6{height:1.5rem}.rf-h-60{height:15rem}.rf-h-64{height:16rem}.rf-h-8{height:2rem}.rf-h-9{height:2.25rem}.rf-h-\\[620px\\]{height:620px}.rf-h-\\[calc\\(100vh-52px\\)\\]{height:calc(100vh - 52px)}.rf-h-\\[calc\\(100vh-96px\\)\\]{height:calc(100vh - 96px)}.rf-h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.rf-h-fit{height:-moz-fit-content;height:fit-content}.rf-h-full{height:100%}.rf-h-px{height:1px}.\\!rf-max-h-\\[40vh\\]{max-height:40vh!important}.\\!rf-max-h-\\[70\\%\\]{max-height:70%!important}.rf-max-h-32{max-height:8rem}.rf-max-h-96{max-height:24rem}.rf-max-h-\\[500px\\]{max-height:500px}.rf-max-h-\\[90vh\\]{max-height:90vh}.rf-min-h-0{min-height:0}.rf-min-h-\\[200px\\]{min-height:200px}.rf-min-h-\\[620px\\]{min-height:620px}.rf-min-h-\\[calc\\(100vh-240px\\)\\]{min-height:calc(100vh - 240px)}.\\!rf-w-2{width:.5rem!important}.\\!rf-w-2\\.5{width:.625rem!important}.rf-w-1{width:.25rem}.rf-w-1\\/2{width:50%}.rf-w-11{width:2.75rem}.rf-w-11\\/12{width:91.666667%}.rf-w-16{width:4rem}.rf-w-2{width:.5rem}.rf-w-2\\.5{width:.625rem}.rf-w-3{width:.75rem}.rf-w-3\\.5{width:.875rem}.rf-w-3\\/4{width:75%}.rf-w-32{width:8rem}.rf-w-4{width:1rem}.rf-w-5{width:1.25rem}.rf-w-64{width:16rem}.rf-w-72{width:18rem}.rf-w-8{width:2rem}.rf-w-9{width:2.25rem}.rf-w-96{width:24rem}.rf-w-fit{width:-moz-fit-content;width:fit-content}.rf-w-full{width:100%}.rf-min-w-10{min-width:2.5rem}.rf-min-w-16{min-width:4rem}.rf-min-w-\\[8rem\\]{min-width:8rem}.rf-min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.\\!rf-max-w-\\[60vw\\]{max-width:60vw!important}.\\!rf-max-w-\\[660px\\]{max-width:660px!important}.rf-max-w-2xl{max-width:42rem}.rf-max-w-3xl{max-width:48rem}.rf-max-w-5xl{max-width:64rem}.rf-max-w-full{max-width:100%}.rf-max-w-lg{max-width:32rem}.rf-max-w-md{max-width:28rem}.rf-max-w-xl{max-width:36rem}.rf-flex-1{flex:1 1 0%}.rf-flex-shrink-0,.rf-shrink-0{flex-shrink:0}.rf-flex-grow{flex-grow:1}.rf-table-auto{table-layout:auto}.-rf-translate-x-1{--tw-translate-x:-0.25rem}.-rf-translate-x-1,.-rf-translate-x-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rf-translate-x-1\\/2{--tw-translate-x:-50%}.-rf-translate-y-1{--tw-translate-y:-0.25rem}.-rf-translate-y-1,.rf--translate-x-1{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf--translate-x-1{--tw-translate-x:-0.25rem}.rf-translate-x-\\[-50\\%\\]{--tw-translate-x:-50%}.rf-translate-x-\\[-50\\%\\],.rf-translate-y-\\[-50\\%\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf-translate-y-\\[-50\\%\\]{--tw-translate-y:-50%}.rf-transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes rf-pulse{50%{opacity:.5}}.rf-animate-pulse{animation:rf-pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes rf-spin{to{transform:rotate(1turn)}}.rf-animate-spin{animation:rf-spin 1s linear infinite}.rf-cursor-default{cursor:default}.rf-cursor-pointer{cursor:pointer}.rf-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.rf-grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.rf-flex-row{flex-direction:row}.rf-flex-col{flex-direction:column}.rf-flex-col-reverse{flex-direction:column-reverse}.rf-flex-wrap{flex-wrap:wrap}.rf-place-items-center{place-items:center}.rf-items-start{align-items:flex-start}.rf-items-center{align-items:center}.rf-justify-end{justify-content:flex-end}.rf-justify-center{justify-content:center}.rf-justify-between{justify-content:space-between}.rf-gap-0{gap:0}.rf-gap-1{gap:.25rem}.rf-gap-2{gap:.5rem}.rf-gap-3{gap:.75rem}.rf-gap-4{gap:1rem}.rf-gap-5{gap:1.25rem}.rf-gap-6{gap:1.5rem}.rf-gap-8{gap:2rem}.rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.rf-space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1.5rem*var(--tw-space-y-reverse));margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)))}.rf-divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.rf-overflow-auto{overflow:auto}.rf-overflow-hidden{overflow:hidden}.rf-overflow-visible{overflow:visible}.rf-overflow-x-auto{overflow-x:auto}.\\!rf-overflow-y-auto{overflow-y:auto!important}.rf-overflow-y-auto{overflow-y:auto}.\\!rf-overflow-x-hidden{overflow-x:hidden!important}.rf-overflow-x-hidden{overflow-x:hidden}.rf-overflow-x-clip{overflow-x:clip}.rf-truncate{overflow:hidden;text-overflow:ellipsis}.rf-truncate,.rf-whitespace-nowrap{white-space:nowrap}.rf-whitespace-pre-wrap{white-space:pre-wrap}.rf-break-words{overflow-wrap:break-word}.rf-rounded{border-radius:.25rem}.rf-rounded-full{border-radius:9999px}.rf-rounded-lg{border-radius:var(--radius)}.rf-rounded-md{border-radius:calc(var(--radius) - 2px)}.rf-rounded-sm{border-radius:calc(var(--radius) - 4px)}.rf-rounded-xl{border-radius:.75rem}.rf-border{border-width:1px}.rf-border-b{border-bottom-width:1px}.rf-border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.rf-border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.rf-border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.rf-border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.rf-border-input{border-color:hsl(var(--input))}.rf-border-neutral-200{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity,1))}.rf-border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.rf-border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.rf-border-zinc-200{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity,1))}.rf-border-zinc-900{--tw-border-opacity:1;border-color:rgb(24 24 27/var(--tw-border-opacity,1))}.rf-bg-background{background-color:hsl(var(--background))}.rf-bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.rf-bg-black\\/80{background-color:rgba(0,0,0,.8)}.rf-bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.rf-bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.rf-bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.rf-bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.rf-bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.rf-bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.rf-bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}.rf-bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.rf-bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.rf-bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.rf-bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.rf-bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.rf-bg-muted{background-color:hsl(var(--muted))}.rf-bg-neutral-100{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}.rf-bg-neutral-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-neutral-800{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity,1))}.rf-bg-neutral-900{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.rf-bg-orange-400{--tw-bg-opacity:1;background-color:rgb(251 146 60/var(--tw-bg-opacity,1))}.rf-bg-popover{background-color:hsl(var(--popover))}.rf-bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.rf-bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.rf-bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.rf-bg-red-900{--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.rf-bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.rf-bg-zinc-100{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.rf-bg-zinc-200{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity,1))}.rf-bg-zinc-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-zinc-800{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.rf-bg-zinc-900{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.rf-bg-opacity-50{--tw-bg-opacity:0.5}.rf-fill-current{fill:currentColor}.rf-object-contain{-o-object-fit:contain;object-fit:contain}.\\!rf-p-0{padding:0!important}.rf-p-0{padding:0}.rf-p-1{padding:.25rem}.rf-p-2{padding:.5rem}.rf-p-3{padding:.75rem}.rf-p-4{padding:1rem}.rf-p-5{padding:1.25rem}.rf-p-6{padding:1.5rem}.rf-p-8{padding:2rem}.rf-px-1{padding-left:.25rem;padding-right:.25rem}.rf-px-2{padding-left:.5rem;padding-right:.5rem}.rf-px-3{padding-left:.75rem;padding-right:.75rem}.rf-px-4{padding-left:1rem;padding-right:1rem}.rf-px-6{padding-left:1.5rem;padding-right:1.5rem}.rf-px-8{padding-left:2rem;padding-right:2rem}.rf-py-0{padding-bottom:0;padding-top:0}.rf-py-0\\.5{padding-bottom:.125rem;padding-top:.125rem}.rf-py-1{padding-bottom:.25rem;padding-top:.25rem}.rf-py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.rf-py-10{padding-bottom:2.5rem;padding-top:2.5rem}.rf-py-2{padding-bottom:.5rem;padding-top:.5rem}.rf-py-3{padding-bottom:.75rem;padding-top:.75rem}.rf-py-4{padding-bottom:1rem;padding-top:1rem}.rf-pb-0{padding-bottom:0}.rf-pb-4{padding-bottom:1rem}.rf-pl-2{padding-left:.5rem}.rf-pl-4{padding-left:1rem}.rf-pl-8{padding-left:2rem}.rf-pr-2{padding-right:.5rem}.rf-pt-4{padding-top:1rem}.rf-text-left{text-align:left}.rf-text-center{text-align:center}.rf-font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.rf-text-2xl{font-size:1.5rem;line-height:2rem}.rf-text-3xl{font-size:1.875rem;line-height:2.25rem}.rf-text-\\[8px\\]{font-size:8px}.rf-text-lg{font-size:1.125rem;line-height:1.75rem}.rf-text-sm{font-size:.875rem;line-height:1.25rem}.rf-text-xs{font-size:.75rem;line-height:1rem}.rf-font-bold{font-weight:700}.rf-font-medium{font-weight:500}.rf-font-semibold{font-weight:600}.rf-capitalize{text-transform:capitalize}.rf-tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.rf-leading-5{line-height:1.25rem}.rf-leading-none{line-height:1}.rf-tracking-widest{letter-spacing:.1em}.rf-text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.rf-text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}.rf-text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.rf-text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.rf-text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.rf-text-current{color:currentColor}.rf-text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.rf-text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.rf-text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.rf-text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.rf-text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.rf-text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.rf-text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.rf-text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.rf-text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.rf-text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}.rf-text-muted-foreground{color:hsl(var(--muted-foreground))}.rf-text-neutral-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-neutral-500{--tw-text-opacity:1;color:rgb(115 115 115/var(--tw-text-opacity,1))}.rf-text-neutral-900{--tw-text-opacity:1;color:rgb(23 23 23/var(--tw-text-opacity,1))}.rf-text-neutral-950{--tw-text-opacity:1;color:rgb(10 10 10/var(--tw-text-opacity,1))}.rf-text-popover-foreground{color:hsl(var(--popover-foreground))}.rf-text-red-200{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity,1))}.rf-text-red-300{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.rf-text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.rf-text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.rf-text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.rf-text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.rf-text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.rf-text-red-900{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity,1))}.rf-text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.rf-text-zinc-200{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity,1))}.rf-text-zinc-300{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.rf-text-zinc-400{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.rf-text-zinc-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-zinc-500{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.rf-text-zinc-900{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.rf-text-zinc-950{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.rf-underline{text-decoration-line:underline}.rf-underline-offset-4{text-underline-offset:4px}.rf-opacity-0{opacity:0}.rf-opacity-25{opacity:.25}.rf-opacity-30{opacity:.3}.rf-opacity-50{opacity:.5}.rf-opacity-60{opacity:.6}.rf-shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.rf-shadow,.rf-shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.rf-shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.rf-shadow-md,.rf-shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.rf-outline-none{outline:2px solid transparent;outline-offset:2px}.rf-ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.rf-ring-offset-white{--tw-ring-offset-color:#fff}.rf-transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-duration-200{transition-duration:.2s}.rf-ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.rf-slide-in-from-left-1{--tw-enter-translate-x:-0.25rem}.rf-slide-out-to-left-1{--tw-exit-translate-x:-0.25rem}.rf-duration-200{animation-duration:.2s}.rf-ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.file\\:rf-border-0::file-selector-button{border-width:0}.file\\:rf-bg-transparent::file-selector-button{background-color:transparent}.file\\:rf-text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:rf-font-medium::file-selector-button{font-weight:500}.placeholder\\:rf-text-zinc-500::-moz-placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.placeholder\\:rf-text-zinc-500::placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.hover\\:\\!rf-bg-transparent:hover{background-color:transparent!important}.hover\\:rf-bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.hover\\:rf-bg-gray-800:hover{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.hover\\:rf-bg-red-50:hover{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.hover\\:rf-bg-red-500\\/90:hover{background-color:rgba(239,68,68,.9)}.hover\\:rf-bg-zinc-100:hover{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.hover\\:rf-bg-zinc-100\\/80:hover{background-color:hsla(240,5%,96%,.8)}.hover\\:rf-bg-zinc-900\\/90:hover{background-color:rgba(24,24,27,.9)}.hover\\:rf-text-red-400:hover{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.hover\\:rf-text-red-600:hover{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.hover\\:rf-text-zinc-900:hover{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.hover\\:rf-underline:hover{text-decoration-line:underline}.focus\\:rf-bg-gray-100:focus{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.focus\\:rf-bg-zinc-100:focus{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.focus\\:rf-text-gray-900:focus{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.focus\\:rf-text-zinc-900:focus{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.focus\\:rf-outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:rf-ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:rf-ring-ring:focus{--tw-ring-color:hsl(var(--ring))}.focus\\:rf-ring-offset-2:focus{--tw-ring-offset-width:2px}.focus-visible\\:rf-outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:rf-ring-1:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-zinc-950:focus-visible{--tw-ring-opacity:1;--tw-ring-color:rgb(9 9 11/var(--tw-ring-opacity,1))}.focus-visible\\:rf-ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.disabled\\:rf-pointer-events-none:disabled{pointer-events:none}.disabled\\:rf-cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:rf-opacity-50:disabled{opacity:.5}.rf-group\\/bar:hover .group-hover\\/bar\\:rf-opacity-100{opacity:1}.data-\\[disabled\\]\\:rf-pointer-events-none[data-disabled]{pointer-events:none}.data-\\[side\\=bottom\\]\\:rf-translate-y-1[data-side=bottom]{--tw-translate-y:0.25rem}.data-\\[side\\=bottom\\]\\:rf-translate-y-1[data-side=bottom],.data-\\[side\\=left\\]\\:-rf-translate-x-1[data-side=left]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=left\\]\\:-rf-translate-x-1[data-side=left]{--tw-translate-x:-0.25rem}.data-\\[side\\=right\\]\\:rf-translate-x-1[data-side=right]{--tw-translate-x:0.25rem}.data-\\[side\\=right\\]\\:rf-translate-x-1[data-side=right],.data-\\[side\\=top\\]\\:-rf-translate-y-1[data-side=top]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=top\\]\\:-rf-translate-y-1[data-side=top]{--tw-translate-y:-0.25rem}.data-\\[state\\=active\\]\\:rf-bg-white[data-state=active]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.data-\\[state\\=checked\\]\\:rf-bg-zinc-900[data-state=checked]{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.data-\\[state\\=open\\]\\:rf-bg-zinc-100[data-state=open]{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.data-\\[state\\=active\\]\\:rf-text-zinc-950[data-state=active]{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.data-\\[state\\=checked\\]\\:rf-text-zinc-50[data-state=checked]{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.data-\\[disabled\\]\\:rf-opacity-50[data-disabled]{opacity:.5}.data-\\[state\\=active\\]\\:rf-shadow[data-state=active]{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.data-\\[state\\=open\\]\\:rf-animate-in[data-state=open]{animation-duration:.15s;animation-name:enter;--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial}.data-\\[state\\=closed\\]\\:rf-animate-out[data-state=closed]{animation-duration:.15s;animation-name:exit;--tw-exit-opacity:initial;--tw-exit-scale:initial;--tw-exit-rotate:initial;--tw-exit-translate-x:initial;--tw-exit-translate-y:initial}.data-\\[state\\=closed\\]\\:rf-fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\\[state\\=open\\]\\:rf-fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\\[state\\=closed\\]\\:rf-zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\\[state\\=open\\]\\:rf-zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\\[side\\=bottom\\]\\:rf-slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:-0.5rem}.data-\\[side\\=left\\]\\:rf-slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:0.5rem}.data-\\[side\\=right\\]\\:rf-slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:-0.5rem}.data-\\[side\\=top\\]\\:rf-slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:0.5rem}.data-\\[state\\=closed\\]\\:rf-slide-out-to-left-1\\/2[data-state=closed]{--tw-exit-translate-x:-50%}.data-\\[state\\=closed\\]\\:rf-slide-out-to-top-\\[48\\%\\][data-state=closed]{--tw-exit-translate-y:-48%}.data-\\[state\\=open\\]\\:rf-slide-in-from-left-1\\/2[data-state=open]{--tw-enter-translate-x:-50%}.data-\\[state\\=open\\]\\:rf-slide-in-from-top-\\[48\\%\\][data-state=open]{--tw-enter-translate-y:-48%}.dark\\:rf-border-zinc-50:is(.rf-dark *){--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity,1))}.dark\\:rf-border-zinc-800:is(.rf-dark *){--tw-border-opacity:1;border-color:rgb(39 39 42/var(--tw-border-opacity,1))}.dark\\:rf-bg-red-900:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-50:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-800:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-950:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.dark\\:rf-text-zinc-400:is(.rf-dark *){--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-50:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-900:is(.rf-dark *){--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.dark\\:rf-placeholder-zinc-400:is(.rf-dark *)::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity,1))}.dark\\:rf-placeholder-zinc-400:is(.rf-dark *)::placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity,1))}.dark\\:rf-ring-offset-zinc-950:is(.rf-dark *){--tw-ring-offset-color:#09090b}.dark\\:hover\\:rf-bg-red-900\\/90:hover:is(.rf-dark *){background-color:rgba(127,29,29,.9)}.dark\\:hover\\:rf-bg-zinc-50\\/90:hover:is(.rf-dark *){background-color:hsla(0,0%,98%,.9)}.dark\\:hover\\:rf-bg-zinc-800:hover:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:hover\\:rf-bg-zinc-800\\/80:hover:is(.rf-dark *){background-color:rgba(39,39,42,.8)}.dark\\:hover\\:rf-text-zinc-50:hover:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:focus\\:rf-bg-zinc-800:focus:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:focus\\:rf-text-zinc-50:focus:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:focus-visible\\:rf-ring-zinc-300:focus-visible:is(.rf-dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(212 212 216/var(--tw-ring-opacity,1))}.dark\\:data-\\[state\\=active\\]\\:rf-bg-zinc-950[data-state=active]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=checked\\]\\:rf-bg-zinc-50[data-state=checked]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=open\\]\\:rf-bg-zinc-800[data-state=open]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=active\\]\\:rf-text-zinc-50[data-state=active]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:data-\\[state\\=checked\\]\\:rf-text-zinc-900[data-state=checked]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}@media (min-width:640px){.sm\\:rf-mt-0{margin-top:0}.sm\\:rf-flex-row{flex-direction:row}.sm\\:rf-justify-end{justify-content:flex-end}.sm\\:rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.sm\\:rf-rounded-lg{border-radius:var(--radius)}.sm\\:rf-text-left{text-align:left}}@media (min-width:768px){.md\\:rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}.\\[\\&\\>span\\]\\:rf-line-clamp-1>span{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\\[\\&\\>svg\\]\\:rf-size-4>svg{height:1rem;width:1rem}.\\[\\&\\>svg\\]\\:rf-shrink-0>svg{flex-shrink:0}.\\[\\&\\>svg\\]\\:rf-text-red-300>svg{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.\\[\\&\\>svg\\]\\:hover\\:rf-text-red-400:hover>svg{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.\\[\\&_svg\\]\\:rf-pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:rf-size-4 svg{height:1rem;width:1rem}.\\[\\&_svg\\]\\:rf-shrink-0 svg{flex-shrink:0}',Mhn=()=>{Qe.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=Thn,document.head.appendChild(e)},[])},dZe=n=>`hsl(${c3.indexOf(n)*137.5%360}, 70%, 50%)`,Chn=({phaseTimings:n})=>{if(!n)return null;const e=Object.values(n).reduce((t,r)=>t+r,0);return Fe.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[Fe.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:c3.map(t=>{const r=n[t]||0,i=r/e*100;return Fe.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${i}%`,backgroundColor:dZe(t)},children:Fe.jsxs("div",{className:"rf-opacity-0 group-hover/bar:rf-opacity-100 rf-transition-opacity rf-absolute rf-bottom-full rf-left-1/2 rf-transform -rf-translate-x-1/2 rf-mb-2 rf-px-2 rf-py-1 rf-text-xs rf-whitespace-nowrap rf-rounded rf-bg-gray-900 rf-text-white rf-pointer-events-none",children:[t,": ",r.toFixed(1),"ms"]})},t)})}),Fe.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},Rhn=({renderLog:n})=>{const[e,t]=Qe.useState("chronological");if(!n)return Fe.jsx("div",{className:"rf-p-4 rf-bg-gray-100 rf-rounded-md",children:"No render log, make sure this tab is open when you render (TODO add a rerender button here)"});const r=Object.entries((n==null?void 0:n.phaseTimings)??{});e==="chronological"?r.sort((a,o)=>c3.indexOf(a[0])-c3.indexOf(o[0])):r.sort((a,o)=>o[1]-a[1]);const i=r.reduce((a,[o,s])=>a+s,0);return Fe.jsxs("div",{className:"rf-bg-white",children:[Fe.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center",children:[Fe.jsx("div",{children:"Render Logs"}),Fe.jsxs("div",{className:"rf-mb-4 rf-pr-2 rf-flex rf-text-xs rf-items-center",children:[Fe.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),Fe.jsxs("select",{value:e,onChange:a=>t(a.target.value),className:"rf-px-2 rf-py-1 rf-border rf-rounded rf-text-xs",children:[Fe.jsx("option",{value:"chronological",children:"Phase Order"}),Fe.jsx("option",{value:"longest",children:"Duration"})]})]})]}),Fe.jsx(Chn,{phaseTimings:n.phaseTimings}),Fe.jsxs("table",{className:"rf-w-full rf-text-xs",children:[Fe.jsx("thead",{children:Fe.jsxs("tr",{children:[Fe.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),Fe.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),Fe.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),Fe.jsx("tbody",{children:r.map(([a,o])=>Fe.jsxs("tr",{children:[Fe.jsx("td",{className:"rf-p-2",children:c3.indexOf(a)}),Fe.jsx("td",{className:"rf-p-2",children:a}),Fe.jsx("td",{className:"rf-p-2",children:Fe.jsx("div",{className:"rf-w-8",children:Fe.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:dZe(a),width:`${o/i*100}%`}})})}),Fe.jsx("td",{className:"rf-p-2",children:Fe.jsxs("div",{className:"rf-flex w-full",children:[Fe.jsxs("span",{className:"rf-flex-grow",children:[o,"ms"]}),Fe.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(o/i*100).toFixed(1),"%"]})]})})]},a))})]})]})},Ahn="0.0.354",Phn=["assembly","bom","circuit_json","errors","render_log"],Nhn=({code:n,onRunClicked:e=void 0,errorMessage:t,circuitJson:r,autoroutingGraphics:i,showRightHeaderContent:a=!0,showCodeTab:o=!1,codeTabContent:s,showJsonTab:l=!0,showRenderLogTab:c=!0,onActiveTabChange:u,renderLog:f,showImportAndFormatButtons:d=!0,className:v,headerClassName:y,leftHeaderContent:w,readOnly:b,isStreaming:S,autoroutingLog:M,onReportAutoroutingLog:N,isRunningCode:k,hasCodeChangedSinceLastRun:G,onEditEvent:q,editEvents:X,defaultActiveTab:Y,autoRotate3dViewerDisabled:ee,showSchematicDebugGrid:W=!1,showToggleFullScreen:ue=!0,defaultToFullScreen:pe=!1})=>{var Oe;Mhn();const[de,we]=Qe.useState(Y??"pcb"),[he,_e]=Qe.useState(pe),Te=Qe.useCallback(Ne=>{we(Ne),u==null||u(Ne)},[u]),be=()=>{_e(!he)};return Qe.useEffect(()=>{t&&Te("errors")},[t]),Qe.useEffect(()=>{(de==="code"||de==="errors")&&r&&!t&&Te(Y??"pcb")},[r]),Fe.jsx("div",{className:O0("flex flex-col relative rf-overflow-x-hidden",v),children:Fe.jsx("div",{className:O0("rf-md:sticky rf-md:top-2",he&&"rf-fixed rf-top-0 rf-left-0 rf-w-full rf-bg-white"),children:Fe.jsxs(qxe,{value:de,onValueChange:Te,className:"rf-flex-grow rf-flex rf-flex-col",children:[Fe.jsxs("div",{className:O0("rf-flex rf-items-center rf-gap-2 rf-p-2 rf-pb-0",y),children:[w,w&&Fe.jsx("div",{className:"rf-flex-grow"}),!w&&k&&Fe.jsx(KT,{className:"rf-w-4 rf-h-4 rf-animate-spin"}),!w&&Fe.jsx("div",{className:"rf-flex-grow"}),f&&f.progress!==1&&Fe.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[f.lastRenderEvent&&Fe.jsx("div",{className:"rf-text-xs rf-text-gray-500",children:(Oe=f.lastRenderEvent)==null?void 0:Oe.type.split("renderable:renderLifecycle:")[1].split(":")[0]}),Fe.jsx("div",{className:"rf-w-4 rf-h-4 rf-bg-blue-500 rf-opacity-50 rf-rounded-full rf-text-white",children:Fe.jsx(KT,{className:"rf-w-4 rf-h-4 rf-animate-spin"})}),Fe.jsxs("div",{className:"rf-text-xs rf-font-bold rf-text-gray-700 rf-tabular-nums",children:[((f.progress??0)*100).toFixed(1),"%"]})]}),a&&Fe.jsxs(Qq,{children:[o&&Fe.jsx(Q8,{value:"code",children:"Code"}),Fe.jsxs(Q8,{value:"pcb",className:"rf-whitespace-nowrap",children:[r&&Fe.jsx("span",{className:O0("rf-inline-flex rf-items-center rf-justify-center rf-w-2 rf-h-2 rf-mr-1 rf-text-xs rf-font-bold rf-text-white rf-rounded-full",G?"rf-bg-gray-500":"rf-bg-blue-500")}),"PCB"]}),Fe.jsxs(Q8,{value:"schematic",className:"rf-whitespace-nowrap",children:[r&&Fe.jsx("span",{className:O0("rf-inline-flex rf-items-center rf-justify-center rf-w-2 rf-h-2 rf-mr-1 rf-text-xs rf-font-bold rf-text-white rf-rounded-full",G?"rf-bg-gray-500":"rf-bg-blue-500")}),"Schematic"]}),Fe.jsxs(Q8,{value:"cad",children:[r&&Fe.jsx("span",{className:O0("inline-flex items-center justify-center w-2 h-2 mr-1 text-xs font-bold text-white rounded-full",G?"rf-bg-gray-500":"rf-bg-blue-500")}),"3D"]}),!["pcb","cad","schematic"].includes(de)&&Fe.jsx(Q8,{value:de,children:Gxe(de)}),Fe.jsxs(Mfe,{children:[Fe.jsx(Cfe,{asChild:!0,children:Fe.jsxs("div",{className:"rf-whitespace-nowrap rf-p-2 rf-mr-1 rf-cursor-pointer rf-relative",children:[Fe.jsx(san,{className:"rf-w-4 rf-h-4"}),t&&Fe.jsx("span",{className:"rf-inline-flex rf-absolute rf-top-[6px] rf-right-[4px] rf-items-center rf-justify-center rf-w-1 rf-h-1 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full"})]})}),Fe.jsxs(AB,{className:"rf-*:text-xs",children:[Phn.map(Ne=>Fe.jsxs(C4,{onSelect:()=>Te(Ne),children:[de!==Ne&&Fe.jsx(L$e,{className:"rf-w-3 rf-h-3 rf-opacity-30"}),de===Ne&&Fe.jsx(MP,{className:"rf-w-3 rf-h-3"}),Fe.jsx("div",{className:"rf-pr-2",children:Gxe(Ne)}),Ne==="errors"&&t&&Fe.jsx("span",{className:"rf-inline-flex rf-items-center rf-justify-center rf-w-3 rf-h-3 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full",children:"1"})]},Ne)),Fe.jsx(C4,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:Fe.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/runframe@",Ahn.split(".").map((Ne,Ie)=>Ie===2?parseInt(Ne)+1:Ne).join(".")]})})]})]})]}),ue&&Fe.jsx(p2,{onClick:be,variant:"ghost",children:he?Fe.jsx(fan,{size:16}):Fe.jsx(can,{size:16})})]}),o&&Fe.jsx(Z4,{value:"code",className:"rf-flex-grow rf-overflow-hidden",children:Fe.jsx("div",{className:"rf-h-full",children:s})}),Fe.jsx(Z4,{value:"pcb",children:Fe.jsx("div",{className:O0("rf-overflow-hidden",he?"rf-h-[calc(100vh-52px)]":"rf-h-[620px]"),children:Fe.jsx(QT,{fallbackRender:({error:Ne})=>Fe.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Fe.jsxs("div",{className:"rf-p-4",children:[Fe.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading PCB viewer"}),Fe.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(Ne==null?void 0:Ne.message)||"An unknown error occurred"})]})}),children:r?Fe.jsx(Ehn,{focusOnHover:!1,circuitJson:r,debugGraphics:i,containerClassName:O0("rf-h-full rf-w-full",he?"rf-min-h-[calc(100vh-240px)]":"rf-min-h-[620px]"),onEditEventsChanged:Ne=>{q&&Ne.forEach(Ie=>q(Ie))}}):Fe.jsx(Ew,{onRunClicked:e})})})}),Fe.jsx(Z4,{value:"assembly",children:Fe.jsx("div",{className:O0("rf-overflow-auto",he?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Fe.jsx(QT,{fallback:Fe.jsx("div",{children:"Error loading Assembly"}),children:r?Fe.jsx(_hn,{circuitJson:r,containerStyle:{height:"100%"},editingEnabled:!0,debugGrid:!0}):Fe.jsx(Ew,{onRunClicked:e})})})}),Fe.jsx(Z4,{value:"schematic",children:Fe.jsx("div",{className:O0("rf-overflow-auto",he?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Fe.jsx(QT,{fallbackRender:({error:Ne})=>Fe.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Fe.jsxs("div",{className:"rf-p-4",children:[Fe.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Schematic"}),Fe.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(Ne==null?void 0:Ne.message)||"An unknown error occurred"})]})}),children:r?Fe.jsx(vhn,{circuitJson:r,containerStyle:{height:"100%"},editingEnabled:!0,onEditEvent:Ne=>{q==null||q(Ne)},debugGrid:W}):Fe.jsx(Ew,{onRunClicked:e})})})}),Fe.jsx(Z4,{value:"cad",children:Fe.jsx("div",{className:O0("rf-overflow-auto",he?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Fe.jsx(QT,{FallbackComponent:qin,children:r?Fe.jsx(Uen,{soup:r,autoRotateDisabled:ee}):Fe.jsx(Ew,{onRunClicked:e})})})}),Fe.jsx(Z4,{value:"bom",children:Fe.jsx("div",{className:O0("rf-overflow-auto",he?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Fe.jsx(QT,{fallbackRender:({error:Ne})=>Fe.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Fe.jsxs("div",{className:"rf-p-4",children:[Fe.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Bill of Materials"}),Fe.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(Ne==null?void 0:Ne.message)||"An unknown error occurred"})]})}),children:r?Fe.jsx(whn,{circuitJson:r}):Fe.jsx(Ew,{onRunClicked:e})})})}),Fe.jsx(Z4,{value:"circuit_json",children:Fe.jsx("div",{className:O0("rf-overflow-auto",he?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Fe.jsx(QT,{fallback:Fe.jsx("div",{children:"Error loading JSON viewer"}),children:r?Fe.jsx(bhn,{elements:r}):Fe.jsx(Ew,{onRunClicked:e})})})}),Fe.jsx(Z4,{value:"errors",children:Fe.jsx("div",{className:O0("rf-overflow-auto",he?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:r||t?Fe.jsx(ecn,{code:n,errorMessage:t,autoroutingLog:M,onReportAutoroutingLog:N}):Fe.jsx(Ew,{onRunClicked:e})})}),c&&Fe.jsx(Z4,{value:"render_log",children:Fe.jsx(Rhn,{renderLog:f})})]})})})};var Yde="Dialog",[pZe,hZe]=l4(Yde),[Dhn,R4]=pZe(Yde),mZe=n=>{const{__scopeDialog:e,children:t,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=n,s=Qe.useRef(null),l=Qe.useRef(null),[c=!1,u]=X8({prop:r,defaultProp:i,onChange:a});return Fe.jsx(Dhn,{scope:e,triggerRef:s,contentRef:l,contentId:O3(),titleId:O3(),descriptionId:O3(),open:c,onOpenChange:u,onOpenToggle:Qe.useCallback(()=>u(f=>!f),[u]),modal:o,children:t})};mZe.displayName=Yde;var vZe="DialogTrigger",yZe=Qe.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=R4(vZe,t),a=ly(e,i.triggerRef);return Fe.jsx(kh.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Zde(i.open),...r,ref:a,onClick:zu(n.onClick,i.onOpenToggle)})});yZe.displayName=vZe;var Xde="DialogPortal",[Lhn,gZe]=pZe(Xde,{forceMount:void 0}),_Ze=n=>{const{__scopeDialog:e,forceMount:t,children:r,container:i}=n,a=R4(Xde,e);return Fe.jsx(Lhn,{scope:e,forceMount:t,children:Qe.Children.map(r,o=>Fe.jsx(X4,{present:t||a.open,children:Fe.jsx(yB,{asChild:!0,container:i,children:o})}))})};_Ze.displayName=Xde;var zj="DialogOverlay",xZe=Qe.forwardRef((n,e)=>{const t=gZe(zj,n.__scopeDialog),{forceMount:r=t.forceMount,...i}=n,a=R4(zj,n.__scopeDialog);return a.modal?Fe.jsx(X4,{present:r||a.open,children:Fe.jsx(zhn,{...i,ref:e})}):null});xZe.displayName=zj;var Ohn=o7("DialogOverlay.RemoveScroll"),zhn=Qe.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=R4(zj,t);return Fe.jsx(TB,{as:Ohn,allowPinchZoom:!0,shards:[i.contentRef],children:Fe.jsx(kh.div,{"data-state":Zde(i.open),...r,ref:e,style:{pointerEvents:"auto",...r.style}})})}),Tw="DialogContent",bZe=Qe.forwardRef((n,e)=>{const t=gZe(Tw,n.__scopeDialog),{forceMount:r=t.forceMount,...i}=n,a=R4(Tw,n.__scopeDialog);return Fe.jsx(X4,{present:r||a.open,children:a.modal?Fe.jsx(Uhn,{...i,ref:e}):Fe.jsx(khn,{...i,ref:e})})});bZe.displayName=Tw;var Uhn=Qe.forwardRef((n,e)=>{const t=R4(Tw,n.__scopeDialog),r=Qe.useRef(null),i=ly(e,t.contentRef,r);return Qe.useEffect(()=>{const a=r.current;if(a)return ffe(a)},[]),Fe.jsx(SZe,{...n,ref:i,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:zu(n.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=t.triggerRef.current)==null||o.focus()}),onPointerDownOutside:zu(n.onPointerDownOutside,a=>{const o=a.detail.originalEvent,s=o.button===0&&o.ctrlKey===!0;(o.button===2||s)&&a.preventDefault()}),onFocusOutside:zu(n.onFocusOutside,a=>a.preventDefault())})}),khn=Qe.forwardRef((n,e)=>{const t=R4(Tw,n.__scopeDialog),r=Qe.useRef(!1),i=Qe.useRef(!1);return Fe.jsx(SZe,{...n,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,s;(o=n.onCloseAutoFocus)==null||o.call(n,a),a.defaultPrevented||(r.current||(s=t.triggerRef.current)==null||s.focus(),a.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:a=>{var l,c;(l=n.onInteractOutside)==null||l.call(n,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;((c=t.triggerRef.current)==null?void 0:c.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),SZe=Qe.forwardRef((n,e)=>{const{__scopeDialog:t,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=n,s=R4(Tw,t),l=Qe.useRef(null),c=ly(e,l);return que(),Fe.jsxs(Fe.Fragment,{children:[Fe.jsx(oB,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:Fe.jsx(aB,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Zde(s.open),...o,ref:c,onDismiss:()=>s.onOpenChange(!1)})}),Fe.jsxs(Fe.Fragment,{children:[Fe.jsx(Fhn,{titleId:s.titleId}),Fe.jsx(jhn,{contentRef:l,descriptionId:s.descriptionId})]})]})}),Wde="DialogTitle",wZe=Qe.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=R4(Wde,t);return Fe.jsx(kh.h2,{id:i.titleId,...r,ref:e})});wZe.displayName=Wde;var EZe="DialogDescription",TZe=Qe.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=R4(EZe,t);return Fe.jsx(kh.p,{id:i.descriptionId,...r,ref:e})});TZe.displayName=EZe;var MZe="DialogClose",CZe=Qe.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=R4(MZe,t);return Fe.jsx(kh.button,{type:"button",...r,ref:e,onClick:zu(n.onClick,()=>i.onOpenChange(!1))})});CZe.displayName=MZe;function Zde(n){return n?"open":"closed"}var RZe="DialogTitleWarning",[Ihn,AZe]=dgt(RZe,{contentName:Tw,titleName:Wde,docsSlug:"dialog"}),Fhn=({titleId:n})=>{const e=AZe(RZe),t=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
13412
+ `,i.appendChild(N)}})}};a();const o=new MutationObserver(a);return o.observe(i,{childList:!0,subtree:!1,characterData:!1}),()=>{o.disconnect()}},[n,t,e,r])},chn=Dy("schematic-viewer"),uhn=()=>{Dy.enable("schematic-viewer*")},fhn=chn,dhn=n=>{const[e,t]=Qe.useState(0),[r,i]=Qe.useState(0);return Qe.useEffect(()=>{if(!n.current)return;const a=()=>{var l;const s=(l=n.current)==null?void 0:l.getBoundingClientRect();t((s==null?void 0:s.width)||0),i((s==null?void 0:s.height)||0)};a();const o=new ResizeObserver(a);return o.observe(n.current),window.addEventListener("resize",a),()=>{o.disconnect(),window.removeEventListener("resize",a)}},[]),{containerWidth:e,containerHeight:r}},phn=fhn.extend("useComponentDragging"),hhn=({onEditEvent:n,editEvents:e=[],circuitJson:t,cancelDrag:r,svgToScreenProjection:i,realToSvgProjection:a,enabled:o=!1})=>{const[s,l]=Qe.useState(null),c=gu(a,i),u=Qe.useRef(null),f=Qe.useRef(null),d=Qe.useRef(new Map);Qe.useEffect(()=>{e.forEach(b=>{"edit_event_type"in b&&b.edit_event_type==="edit_schematic_component_location"&&!b.in_progress&&d.current.set(b.schematic_component_id,{...b.new_center})})},[e]);const v=Qe.useCallback(b=>{if(!o)return;const M=b.target.closest('[data-circuit-json-type="schematic_component"]');if(!M)return;const N=M.getAttribute("data-schematic-component-id");if(!N)return;r&&r();const k=n1(t).schematic_component.get(N);if(!k)return;u.current={x:b.clientX,y:b.clientY};let G;const q=d.current.get(N);if(q)G={...q};else{const Y=fZe({editEvents:e,schematic_component_id:N});G={x:k.center.x+Y.x,y:k.center.y+Y.y},d.current.set(N,{...G})}const X={edit_event_id:Math.random().toString(36).substr(2,9),edit_event_type:"edit_schematic_component_location",schematic_component_id:N,original_center:G,new_center:{...G},in_progress:!0,created_at:Date.now(),_element:M};f.current=X,l(X)},[r,o,t,e]),y=Qe.useCallback(b=>{if(!f.current||!u.current)return;const S={x:b.clientX-u.current.x,y:b.clientY-u.current.y},M={x:S.x/c.a,y:S.y/c.d},N={...f.current,new_center:{x:f.current.original_center.x+M.x,y:f.current.original_center.y+M.y}};f.current=N,l(N)},[c]),w=Qe.useCallback(()=>{if(!f.current)return;const b={...f.current,in_progress:!1};d.current.set(b.schematic_component_id,{...b.new_center}),phn("handleMouseUp calling onEditEvent with new edit event",{newEditEvent:b}),n&&n(b),f.current=null,u.current=null,l(null)},[n]);return Qe.useEffect(()=>(window.addEventListener("mousemove",y),window.addEventListener("mouseup",w),()=>{window.removeEventListener("mousemove",y),window.removeEventListener("mouseup",w)}),[y,w]),{handleMouseDown:v,isDragging:!!f.current,activeEditEvent:s}},mhn=({onClick:n,active:e})=>Fe.jsx("div",{onClick:n,style:{position:"absolute",top:"16px",right:"16px",backgroundColor:e?"#4CAF50":"#fff",color:e?"#fff":"#000",padding:"8px",borderRadius:"4px",cursor:"pointer",boxShadow:"0 2px 4px rgba(0,0,0,0.1)",display:"flex",alignItems:"center",gap:"4px",zIndex:1e3},children:Fe.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[Fe.jsx("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),Fe.jsx("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})}),vhn=({circuitJson:n,containerStyle:e,editEvents:t=[],onEditEvent:r,defaultEditMode:i=!1,debugGrid:a=!1,editingEnabled:o=!1,debug:s=!1,clickToInteractEnabled:l=!1})=>{s&&uhn();const[c,u]=Qe.useState(i),[f,d]=Qe.useState(!l),v=Qe.useRef(null),[y,w]=Qe.useState([]),b=Qe.useRef(n),S=he=>`${(he==null?void 0:he.length)||0}_${(he==null?void 0:he.editCount)||0}`;Qe.useEffect(()=>{const he=S(n),_e=S(b.current);he!==_e&&(w([]),b.current=n)},[n]);const{ref:M,cancelDrag:N,transform:k}=uZe({onSetTransform(he){v.current&&(v.current.style.transform=Q6(he))},enabled:f}),{containerWidth:G,containerHeight:q}=dhn(M),X=Qe.useMemo(()=>!G||!q?"":qde(n,{width:G,height:q||720,grid:a?{cellSize:1,labelCells:!0}:void 0}),[n,G,q]),Y=Qe.useMemo(()=>{var _e;if(!X)return Ly();const he=(_e=X.match(/data-real-to-screen-transform="([^"]+)"/))==null?void 0:_e[1];try{return jV(he)}catch(Te){return console.error(Te),Ly()}},[X]),ee=he=>{w(_e=>[..._e,he]),r&&r(he)},W=Qe.useMemo(()=>[...t,...y],[t,y]),{handleMouseDown:ue,isDragging:pe,activeEditEvent:de}=hhn({onEditEvent:ee,cancelDrag:N,realToSvgProjection:Y,svgToScreenProjection:k,circuitJson:n,editEvents:W,enabled:c&&f});shn({svgDivRef:v,editEvents:W,realToSvgProjection:Y,svgToScreenProjection:k,activeEditEvent:de}),lhn({svgDivRef:v,circuitJson:n,activeEditEvent:de,editEvents:W});const we=Qe.useMemo(()=>Fe.jsx("div",{ref:v,style:{pointerEvents:l?f?"auto":"none":"auto",transformOrigin:"0 0"},dangerouslySetInnerHTML:{__html:X}}),[X,f,l]);return Fe.jsxs("div",{ref:M,style:{position:"relative",backgroundColor:"#F5F1ED",overflow:"hidden",cursor:pe?"grabbing":l&&!f?"pointer":"grab",minHeight:"300px",...e},onMouseDown:he=>{if(l&&!f){he.preventDefault(),he.stopPropagation();return}ue(he)},onMouseDownCapture:he=>{if(l&&!f){he.preventDefault(),he.stopPropagation();return}},children:[!f&&l&&Fe.jsx("div",{onClick:he=>{he.preventDefault(),he.stopPropagation(),d(!0)},style:{position:"absolute",inset:0,cursor:"pointer",zIndex:10,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"all"},children:Fe.jsx("div",{style:{backgroundColor:"rgba(0, 0, 0, 0.8)",color:"white",padding:"12px 24px",borderRadius:"8px",fontSize:"16px",fontFamily:"sans-serif",pointerEvents:"none"},children:"Click to Interact"})}),o&&Fe.jsx(mhn,{active:c,onClick:()=>u(!c)}),we]})},yhn=n=>{const[e,t]=Qe.useState(0),[r,i]=Qe.useState(0);return Qe.useEffect(()=>{if(!n.current)return;const a=()=>{var l;const s=(l=n.current)==null?void 0:l.getBoundingClientRect();t((s==null?void 0:s.width)||0),i((s==null?void 0:s.height)||0)};a();const o=new ResizeObserver(a);return o.observe(n.current),window.addEventListener("resize",a),()=>{o.disconnect(),window.removeEventListener("resize",a)}},[]),{containerWidth:e,containerHeight:r}};Dy("assembly-viewer");var ghn=()=>{Dy.enable("assembly-viewer*")},_hn=({circuitJson:n,containerStyle:e,debugGrid:t=!1,debug:r=!1})=>{r&&ghn();const i=Qe.useRef(null),{ref:a}=uZe({onSetTransform(u){i.current&&(i.current.style.transform=Q6(u))}}),{containerWidth:o,containerHeight:s}=yhn(a),l=Qe.useMemo(()=>!o||!s?"":aZe(n,{width:o,height:s||720}),[n,o,s]);Qe.useMemo(()=>{var f;if(!l)return Ly();const u=(f=l.match(/data-real-to-screen-transform="([^"]+)"/))==null?void 0:f[1];try{return jV(u)}catch(d){return console.error(d),Ly()}},[l]);const c=Qe.useMemo(()=>Fe.jsx("div",{ref:i,style:{pointerEvents:"auto",transformOrigin:"0 0"},dangerouslySetInnerHTML:{__html:l}}),[l]);return Fe.jsx("div",{ref:a,style:{position:"relative",backgroundColor:"#F5F1ED",overflow:"hidden",minHeight:"300px",...e},children:c})};const Ew=({onRunClicked:n})=>Fe.jsxs("div",{className:"rf-flex rf-items-center rf-gap-3 rf-bg-gray-100 rf-text-center rf-justify-center rf-py-10",children:["No circuit json loaded",n&&Fe.jsxs(p2,{className:"rf-bg-blue-600 rf-hover:bg-blue-500",onClick:n,children:["Run Code",Fe.jsx(O$e,{className:"rf-w-3 rf-h-3 rf-ml-2"})]})]}),Lj=({text:n,onClick:e})=>Fe.jsx("span",{className:"rf-cursor-pointer rf-underline rf-text-blue-600 rf-mx-2",onClick:e,children:n}),Oj=n=>{var e;return Fe.jsxs("div",{className:"rf-leading-5",children:[Fe.jsx("div",{className:"rf-py-2 rf-font-bold",children:n.column.name}),Fe.jsx("div",{children:((e=n.field)==null?void 0:e.call(n))??Fe.jsx("input",{type:"text",className:"rf-border rf-rounded rf-p-1 rf-w-full",onChange:t=>{var r;(r=n.onTextChange)==null||r.call(n,t.target.value)}})})]})},xhn=({open:n,children:e,title:t,onClose:r})=>n?Fe.jsx("div",{className:"rf-fixed rf-inset-0 rf-bg-black rf-bg-opacity-50 rf-flex rf-justify-center rf-items-center rf-z-50",onClick:r,children:Fe.jsxs("div",{className:"rf-bg-white rf-p-5 rf-rounded-lg rf-relative rf-w-11/12 rf-max-w-2xl",onClick:i=>{i.preventDefault(),i.stopPropagation()},children:[Fe.jsx("h2",{className:"rf-mt-0 rf-text-md rf-pb-4",children:t}),Fe.jsx("button",{type:"button",className:"rf-absolute rf-top-2 rf-right-4 rf-text-2xl rf-font-bold",onClick:r,children:"×"}),e]})}):null,bhn=({elements:n})=>{const[e,t]=Qe.useState({open:!1}),[r,i]=Qe.useReducer((u,f)=>({...u,...f}),{}),a=[...new Set(n.map(u=>u.type))],o=n.map(u=>{const f=u[`${u.type}_id`],d=Object.fromEntries(Object.entries(u).filter(([y])=>!(y===`${u.type}_id`||!y.endsWith("_id")))),v=Object.fromEntries(Object.entries(u).filter(([y])=>!y.endsWith("_id")));return{primary_id:f,other_ids:d,...v,_og_elm:u}}),s=o.map(u=>{let f="";const d=v=>{const y=Object.keys(v.other_ids).find(S=>S.startsWith("source_"));if(!y)return`.${v.name}`;const w=y.slice(0,-3),b=o.find(S=>S.type===w&&S.primary_id===v.other_ids[y]);return b?"name"in b?`${d(b)} > .${v.name}`:`#${b.primary_id} > .${v.name}`:`??? > .${v.name}`};return"name"in u&&(f=d(u)),{...u,selector_path:f}}),l=[{key:"primary_id",name:"primary_id",renderCell:u=>Fe.jsxs("div",{className:"rf-flex rf-items-center",children:[Fe.jsx(Lj,{text:u.primary_id,onClick:()=>i({focused_id:u.primary_id,id_search:void 0,selector_search:void 0})}),Fe.jsx("span",{className:"rf-flex-grow"}),Fe.jsx(Lj,{text:"(JSON)",onClick:()=>t({open:!0,element:u._og_elm,title:u.primary_id})})]}),renderHeaderCell:u=>Fe.jsx(Oj,{column:u,onTextChange:f=>i({id_search:f}),field:r.focused_id?()=>Fe.jsxs("div",{children:["Focus:"," ",Fe.jsx("span",{className:"rf-underline",children:r.focused_id}),Fe.jsx(Lj,{text:"(unfocus)",onClick:()=>i({focused_id:void 0})})]}):void 0})},{key:"type",name:"type",renderHeaderCell:u=>Fe.jsx(Oj,{column:u,field:()=>Fe.jsxs("select",{onChange:f=>i({component_type_filter:f.target.value}),className:"rf-border rf-rounded rf-p-1 rf-w-full",children:[Fe.jsx("option",{value:"any",children:"any"},"any"),Fe.jsx("option",{value:"source",children:"source"},"source"),Fe.jsx("option",{value:"source/pcb",children:"source/pcb"},"source/pcb"),Fe.jsx("option",{value:"source/schematic",children:"source/schematic"},"source/schematic"),a.map(f=>Fe.jsx("option",{value:f,children:f},f))]})})},{key:"name",name:"name",renderHeaderCell:u=>Fe.jsx(Oj,{column:u,onTextChange:f=>i({name_search:f})})},{key:"selector_path",name:"selector_path",renderHeaderCell:u=>Fe.jsx(Oj,{column:u,onTextChange:f=>i({selector_search:f})})},{key:"other_ids",name:"other_ids",renderCell:u=>Fe.jsx("div",{className:"rf-space-x-2",children:Object.entries(u.other_ids).map(([f,d])=>Fe.jsx(Lj,{text:d,onClick:()=>i({focused_id:d})},d))})}],c=s.filter(u=>{var f,d;return r.name_search?(d=(f=u.name)==null?void 0:f.toLowerCase())==null?void 0:d.includes(r.name_search.toLowerCase()):!0}).filter(u=>{var f;return!r.component_type_filter||r.component_type_filter==="any"?!0:r.component_type_filter==="source"?u.type.startsWith("source_"):r.component_type_filter==="source/pcb"?u.type.startsWith("source_")||u.type.startsWith("pcb_"):r.component_type_filter==="source/schematic"?u.type.startsWith("source_")||u.type.startsWith("schematic_"):(f=u.type)==null?void 0:f.includes(r.component_type_filter)}).filter(u=>r.selector_search?r.selector_search.split(" ").filter(d=>d.length>0).every(d=>{var v;return(v=u.selector_path)==null?void 0:v.includes(d)}):!0).filter(u=>{var f;return r.id_search?(f=u.primary_id)==null?void 0:f.includes(r.id_search):!0}).filter(u=>!!(!r.focused_id||u.primary_id===r.focused_id||Object.values(u.other_ids).includes(r.focused_id)));return Fe.jsxs("div",{className:"rf-font-mono rf-text-xs rf-bg-white",children:[Fe.jsx("div",{className:"rf-overflow-x-auto",children:Fe.jsxs("table",{className:"rf-table-auto rf-w-full rf-text-left",children:[Fe.jsx("thead",{children:Fe.jsx("tr",{children:l.map(u=>Fe.jsx("th",{className:"rf-px-4 rf-py-2 rf-border-b",children:u.renderHeaderCell?u.renderHeaderCell(u):u.name},u.key))})}),Fe.jsx("tbody",{children:c.map((u,f)=>Fe.jsx("tr",{className:"rf-hover:bg-gray-100",children:l.map(d=>Fe.jsx("td",{className:"rf-px-4 rf-py-2 rf-border-b",children:d.renderCell?d.renderCell(u):u[d.key]},d.key))},f))})]})}),Fe.jsx(xhn,{open:e.open,onClose:()=>t({open:!1}),title:e.open?e.title:"",children:Fe.jsx("div",{className:"rf-bg-gray-800 rf-p-3 rf-text-white rf-rounded",children:Fe.jsx("pre",{className:"rf-whitespace-pre-wrap",children:e.open?JSON.stringify(e.element,null,2):""})})})]})},Shn=(n,e)=>n==="jlcpcb"?Fe.jsx("a",{className:"rf-underline rf-text-blue-500",target:"_blank",rel:"noreferrer",href:`https://jlcpcb.com/partdetail/${e}`,children:e}):e,whn=({circuitJson:n})=>{const e=n.filter(r=>r.type==="source_component"),t=new Set;for(const r of e)if(r.supplier_part_numbers)for(const i of Object.keys(r.supplier_part_numbers))t.add(i);return Fe.jsx("div",{className:"rf-overflow-x-auto",children:Fe.jsxs("table",{className:"rf-w-full rf-text-left rf-text-sm",children:[Fe.jsx("thead",{children:Fe.jsxs("tr",{className:"rf-border-b",children:[Fe.jsx("th",{className:"rf-p-2",children:"Name"}),Array.from(t).map(r=>Fe.jsx("th",{className:"rf-p-2 rf-capitalize",children:r},r))]})}),Fe.jsx("tbody",{children:e.map(r=>Fe.jsxs("tr",{className:"rf-border-b",children:[Fe.jsx("td",{className:"rf-p-2",children:r.name}),Array.from(t).map(i=>{var a,o;return Fe.jsx("td",{className:"rf-p-2",children:Shn(i,((o=(a=r.supplier_part_numbers)==null?void 0:a[i])==null?void 0:o[0])||"")},i)})]},r.source_component_id))})]})})},Ehn=({containerClassName:n,...e})=>{const t=Qe.useRef(null),[r,i]=Qe.useState(620);return Qe.useLayoutEffect(()=>{const a=()=>{if(t.current){const s=t.current.clientHeight,l=window.innerHeight;i(Math.min(Math.max(s,620),l))}};a();const o=new ResizeObserver(a);return t.current&&o.observe(t.current),window.addEventListener("resize",a),()=>{o.disconnect(),window.removeEventListener("resize",a)}},[]),Fe.jsx("div",{ref:t,className:n||"rf-w-full rf-h-full",children:Fe.jsx(Gin,{...e,height:r})})},Thn='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}:root{--radius:0.5rem}.rf-pointer-events-none{pointer-events:none}.rf-invisible{visibility:hidden}.rf-fixed{position:fixed}.rf-absolute{position:absolute}.rf-relative{position:relative}.rf-inset-0{inset:0}.-rf-left-2{left:-.5rem}.-rf-right-10{right:-2.5rem}.-rf-right-2{right:-.5rem}.-rf-right-4{right:-1rem}.-rf-right-6{right:-1.5rem}.-rf-right-7{right:-1.75rem}.-rf-right-8{right:-2rem}.-rf-right-9{right:-2.25rem}.rf-bottom-full{bottom:100%}.rf-left-0{left:0}.rf-left-1{left:.25rem}.rf-left-1\\/2{left:50%}.rf-left-2{left:.5rem}.rf-left-\\[50\\%\\]{left:50%}.rf-right-0{right:0}.rf-right-4{right:1rem}.rf-right-\\[4px\\]{right:4px}.rf-top-0{top:0}.rf-top-1{top:.25rem}.rf-top-2{top:.5rem}.rf-top-2\\.5{top:.625rem}.rf-top-\\[50\\%\\]{top:50%}.rf-top-\\[6px\\]{top:6px}.rf-z-50{z-index:50}.rf-z-\\[100\\]{z-index:100}.-rf-mx-1,.rf--mx-1{margin-left:-.25rem;margin-right:-.25rem}.rf-mx-1{margin-left:.25rem;margin-right:.25rem}.rf-mx-2{margin-left:.5rem;margin-right:.5rem}.rf-mx-auto{margin-left:auto;margin-right:auto}.rf-my-1{margin-bottom:.25rem;margin-top:.25rem}.rf-my-4{margin-bottom:1rem;margin-top:1rem}.rf-my-auto{margin-bottom:auto;margin-top:auto}.rf-mb-1{margin-bottom:.25rem}.rf-mb-12{margin-bottom:3rem}.rf-mb-2{margin-bottom:.5rem}.rf-mb-3{margin-bottom:.75rem}.rf-mb-4{margin-bottom:1rem}.rf-mb-6{margin-bottom:1.5rem}.rf-mb-8{margin-bottom:2rem}.rf-ml-1{margin-left:.25rem}.rf-ml-2{margin-left:.5rem}.rf-ml-auto{margin-left:auto}.rf-mr-1{margin-right:.25rem}.rf-mr-2{margin-right:.5rem}.rf-mt-0{margin-top:0}.rf-mt-0\\.5{margin-top:.125rem}.rf-mt-1{margin-top:.25rem}.rf-mt-2{margin-top:.5rem}.rf-mt-3{margin-top:.75rem}.rf-mt-4{margin-top:1rem}.rf-mt-auto{margin-top:auto}.rf-block{display:block}.rf-inline{display:inline}.rf-flex{display:flex}.rf-inline-flex{display:inline-flex}.rf-grid{display:grid}.rf-hidden{display:none}.rf-aspect-square{aspect-ratio:1/1}.rf-aspect-video{aspect-ratio:16/9}.rf-size-4{height:1rem;width:1rem}.\\!rf-h-2{height:.5rem!important}.\\!rf-h-2\\.5{height:.625rem!important}.\\!rf-h-3{height:.75rem!important}.\\!rf-h-full{height:100%!important}.rf-h-1{height:.25rem}.rf-h-10{height:2.5rem}.rf-h-2{height:.5rem}.rf-h-2\\.5{height:.625rem}.rf-h-3{height:.75rem}.rf-h-3\\.5{height:.875rem}.rf-h-4{height:1rem}.rf-h-5{height:1.25rem}.rf-h-6{height:1.5rem}.rf-h-60{height:15rem}.rf-h-64{height:16rem}.rf-h-8{height:2rem}.rf-h-9{height:2.25rem}.rf-h-\\[620px\\]{height:620px}.rf-h-\\[calc\\(100vh-52px\\)\\]{height:calc(100vh - 52px)}.rf-h-\\[calc\\(100vh-96px\\)\\]{height:calc(100vh - 96px)}.rf-h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.rf-h-fit{height:-moz-fit-content;height:fit-content}.rf-h-full{height:100%}.rf-h-px{height:1px}.\\!rf-max-h-\\[40vh\\]{max-height:40vh!important}.\\!rf-max-h-\\[70\\%\\]{max-height:70%!important}.rf-max-h-32{max-height:8rem}.rf-max-h-96{max-height:24rem}.rf-max-h-\\[500px\\]{max-height:500px}.rf-max-h-\\[90vh\\]{max-height:90vh}.rf-min-h-0{min-height:0}.rf-min-h-\\[200px\\]{min-height:200px}.rf-min-h-\\[620px\\]{min-height:620px}.rf-min-h-\\[calc\\(100vh-240px\\)\\]{min-height:calc(100vh - 240px)}.\\!rf-w-2{width:.5rem!important}.\\!rf-w-2\\.5{width:.625rem!important}.rf-w-1{width:.25rem}.rf-w-1\\/2{width:50%}.rf-w-11{width:2.75rem}.rf-w-11\\/12{width:91.666667%}.rf-w-16{width:4rem}.rf-w-2{width:.5rem}.rf-w-2\\.5{width:.625rem}.rf-w-3{width:.75rem}.rf-w-3\\.5{width:.875rem}.rf-w-3\\/4{width:75%}.rf-w-32{width:8rem}.rf-w-4{width:1rem}.rf-w-5{width:1.25rem}.rf-w-64{width:16rem}.rf-w-72{width:18rem}.rf-w-8{width:2rem}.rf-w-9{width:2.25rem}.rf-w-96{width:24rem}.rf-w-fit{width:-moz-fit-content;width:fit-content}.rf-w-full{width:100%}.rf-min-w-10{min-width:2.5rem}.rf-min-w-16{min-width:4rem}.rf-min-w-\\[8rem\\]{min-width:8rem}.rf-min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.\\!rf-max-w-\\[60vw\\]{max-width:60vw!important}.\\!rf-max-w-\\[660px\\]{max-width:660px!important}.rf-max-w-2xl{max-width:42rem}.rf-max-w-3xl{max-width:48rem}.rf-max-w-5xl{max-width:64rem}.rf-max-w-full{max-width:100%}.rf-max-w-lg{max-width:32rem}.rf-max-w-md{max-width:28rem}.rf-max-w-xl{max-width:36rem}.rf-flex-1{flex:1 1 0%}.rf-flex-shrink-0,.rf-shrink-0{flex-shrink:0}.rf-flex-grow{flex-grow:1}.rf-table-auto{table-layout:auto}.-rf-translate-x-1{--tw-translate-x:-0.25rem}.-rf-translate-x-1,.-rf-translate-x-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rf-translate-x-1\\/2{--tw-translate-x:-50%}.-rf-translate-y-1{--tw-translate-y:-0.25rem}.-rf-translate-y-1,.rf--translate-x-1{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf--translate-x-1{--tw-translate-x:-0.25rem}.rf-translate-x-\\[-50\\%\\]{--tw-translate-x:-50%}.rf-translate-x-\\[-50\\%\\],.rf-translate-y-\\[-50\\%\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf-translate-y-\\[-50\\%\\]{--tw-translate-y:-50%}.rf-transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes rf-pulse{50%{opacity:.5}}.rf-animate-pulse{animation:rf-pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes rf-spin{to{transform:rotate(1turn)}}.rf-animate-spin{animation:rf-spin 1s linear infinite}.rf-cursor-default{cursor:default}.rf-cursor-pointer{cursor:pointer}.rf-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.rf-grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.rf-flex-row{flex-direction:row}.rf-flex-col{flex-direction:column}.rf-flex-col-reverse{flex-direction:column-reverse}.rf-flex-wrap{flex-wrap:wrap}.rf-place-items-center{place-items:center}.rf-items-start{align-items:flex-start}.rf-items-center{align-items:center}.rf-justify-end{justify-content:flex-end}.rf-justify-center{justify-content:center}.rf-justify-between{justify-content:space-between}.rf-gap-0{gap:0}.rf-gap-1{gap:.25rem}.rf-gap-2{gap:.5rem}.rf-gap-3{gap:.75rem}.rf-gap-4{gap:1rem}.rf-gap-5{gap:1.25rem}.rf-gap-6{gap:1.5rem}.rf-gap-8{gap:2rem}.rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.rf-space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1.5rem*var(--tw-space-y-reverse));margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)))}.rf-divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.rf-overflow-auto{overflow:auto}.rf-overflow-hidden{overflow:hidden}.rf-overflow-visible{overflow:visible}.rf-overflow-x-auto{overflow-x:auto}.\\!rf-overflow-y-auto{overflow-y:auto!important}.rf-overflow-y-auto{overflow-y:auto}.\\!rf-overflow-x-hidden{overflow-x:hidden!important}.rf-overflow-x-hidden{overflow-x:hidden}.rf-overflow-x-clip{overflow-x:clip}.rf-truncate{overflow:hidden;text-overflow:ellipsis}.rf-truncate,.rf-whitespace-nowrap{white-space:nowrap}.rf-whitespace-pre-wrap{white-space:pre-wrap}.rf-break-words{overflow-wrap:break-word}.rf-rounded{border-radius:.25rem}.rf-rounded-full{border-radius:9999px}.rf-rounded-lg{border-radius:var(--radius)}.rf-rounded-md{border-radius:calc(var(--radius) - 2px)}.rf-rounded-sm{border-radius:calc(var(--radius) - 4px)}.rf-rounded-xl{border-radius:.75rem}.rf-border{border-width:1px}.rf-border-b{border-bottom-width:1px}.rf-border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.rf-border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.rf-border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.rf-border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.rf-border-input{border-color:hsl(var(--input))}.rf-border-neutral-200{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity,1))}.rf-border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.rf-border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.rf-border-zinc-200{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity,1))}.rf-border-zinc-900{--tw-border-opacity:1;border-color:rgb(24 24 27/var(--tw-border-opacity,1))}.rf-bg-background{background-color:hsl(var(--background))}.rf-bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.rf-bg-black\\/80{background-color:rgba(0,0,0,.8)}.rf-bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.rf-bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.rf-bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.rf-bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.rf-bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.rf-bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.rf-bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}.rf-bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.rf-bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.rf-bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.rf-bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.rf-bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.rf-bg-muted{background-color:hsl(var(--muted))}.rf-bg-neutral-100{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}.rf-bg-neutral-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-neutral-800{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity,1))}.rf-bg-neutral-900{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.rf-bg-orange-400{--tw-bg-opacity:1;background-color:rgb(251 146 60/var(--tw-bg-opacity,1))}.rf-bg-popover{background-color:hsl(var(--popover))}.rf-bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.rf-bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.rf-bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.rf-bg-red-900{--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.rf-bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.rf-bg-zinc-100{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.rf-bg-zinc-200{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity,1))}.rf-bg-zinc-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-zinc-800{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.rf-bg-zinc-900{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.rf-bg-opacity-50{--tw-bg-opacity:0.5}.rf-fill-current{fill:currentColor}.rf-object-contain{-o-object-fit:contain;object-fit:contain}.\\!rf-p-0{padding:0!important}.rf-p-0{padding:0}.rf-p-1{padding:.25rem}.rf-p-2{padding:.5rem}.rf-p-3{padding:.75rem}.rf-p-4{padding:1rem}.rf-p-5{padding:1.25rem}.rf-p-6{padding:1.5rem}.rf-p-8{padding:2rem}.rf-px-1{padding-left:.25rem;padding-right:.25rem}.rf-px-2{padding-left:.5rem;padding-right:.5rem}.rf-px-3{padding-left:.75rem;padding-right:.75rem}.rf-px-4{padding-left:1rem;padding-right:1rem}.rf-px-6{padding-left:1.5rem;padding-right:1.5rem}.rf-px-8{padding-left:2rem;padding-right:2rem}.rf-py-0{padding-bottom:0;padding-top:0}.rf-py-0\\.5{padding-bottom:.125rem;padding-top:.125rem}.rf-py-1{padding-bottom:.25rem;padding-top:.25rem}.rf-py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.rf-py-10{padding-bottom:2.5rem;padding-top:2.5rem}.rf-py-2{padding-bottom:.5rem;padding-top:.5rem}.rf-py-3{padding-bottom:.75rem;padding-top:.75rem}.rf-py-4{padding-bottom:1rem;padding-top:1rem}.rf-pb-0{padding-bottom:0}.rf-pb-4{padding-bottom:1rem}.rf-pl-2{padding-left:.5rem}.rf-pl-4{padding-left:1rem}.rf-pl-8{padding-left:2rem}.rf-pr-2{padding-right:.5rem}.rf-pt-4{padding-top:1rem}.rf-text-left{text-align:left}.rf-text-center{text-align:center}.rf-font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.rf-text-2xl{font-size:1.5rem;line-height:2rem}.rf-text-3xl{font-size:1.875rem;line-height:2.25rem}.rf-text-\\[8px\\]{font-size:8px}.rf-text-lg{font-size:1.125rem;line-height:1.75rem}.rf-text-sm{font-size:.875rem;line-height:1.25rem}.rf-text-xs{font-size:.75rem;line-height:1rem}.rf-font-bold{font-weight:700}.rf-font-medium{font-weight:500}.rf-font-semibold{font-weight:600}.rf-capitalize{text-transform:capitalize}.rf-tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.rf-leading-5{line-height:1.25rem}.rf-leading-none{line-height:1}.rf-tracking-widest{letter-spacing:.1em}.rf-text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.rf-text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}.rf-text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.rf-text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.rf-text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.rf-text-current{color:currentColor}.rf-text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.rf-text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.rf-text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.rf-text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.rf-text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.rf-text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.rf-text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.rf-text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.rf-text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.rf-text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}.rf-text-muted-foreground{color:hsl(var(--muted-foreground))}.rf-text-neutral-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-neutral-500{--tw-text-opacity:1;color:rgb(115 115 115/var(--tw-text-opacity,1))}.rf-text-neutral-900{--tw-text-opacity:1;color:rgb(23 23 23/var(--tw-text-opacity,1))}.rf-text-neutral-950{--tw-text-opacity:1;color:rgb(10 10 10/var(--tw-text-opacity,1))}.rf-text-popover-foreground{color:hsl(var(--popover-foreground))}.rf-text-red-200{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity,1))}.rf-text-red-300{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.rf-text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.rf-text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.rf-text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.rf-text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.rf-text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.rf-text-red-900{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity,1))}.rf-text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.rf-text-zinc-200{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity,1))}.rf-text-zinc-300{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.rf-text-zinc-400{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.rf-text-zinc-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-zinc-500{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.rf-text-zinc-900{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.rf-text-zinc-950{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.rf-underline{text-decoration-line:underline}.rf-underline-offset-4{text-underline-offset:4px}.rf-opacity-0{opacity:0}.rf-opacity-25{opacity:.25}.rf-opacity-30{opacity:.3}.rf-opacity-50{opacity:.5}.rf-opacity-60{opacity:.6}.rf-shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.rf-shadow,.rf-shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.rf-shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.rf-shadow-md,.rf-shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.rf-outline-none{outline:2px solid transparent;outline-offset:2px}.rf-ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.rf-ring-offset-white{--tw-ring-offset-color:#fff}.rf-transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-duration-200{transition-duration:.2s}.rf-ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.rf-slide-in-from-left-1{--tw-enter-translate-x:-0.25rem}.rf-slide-out-to-left-1{--tw-exit-translate-x:-0.25rem}.rf-duration-200{animation-duration:.2s}.rf-ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.file\\:rf-border-0::file-selector-button{border-width:0}.file\\:rf-bg-transparent::file-selector-button{background-color:transparent}.file\\:rf-text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:rf-font-medium::file-selector-button{font-weight:500}.placeholder\\:rf-text-zinc-500::-moz-placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.placeholder\\:rf-text-zinc-500::placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.hover\\:\\!rf-bg-transparent:hover{background-color:transparent!important}.hover\\:rf-bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.hover\\:rf-bg-gray-800:hover{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.hover\\:rf-bg-red-50:hover{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.hover\\:rf-bg-red-500\\/90:hover{background-color:rgba(239,68,68,.9)}.hover\\:rf-bg-zinc-100:hover{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.hover\\:rf-bg-zinc-100\\/80:hover{background-color:hsla(240,5%,96%,.8)}.hover\\:rf-bg-zinc-900\\/90:hover{background-color:rgba(24,24,27,.9)}.hover\\:rf-text-red-400:hover{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.hover\\:rf-text-red-600:hover{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.hover\\:rf-text-zinc-900:hover{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.hover\\:rf-underline:hover{text-decoration-line:underline}.focus\\:rf-bg-gray-100:focus{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.focus\\:rf-bg-zinc-100:focus{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.focus\\:rf-text-gray-900:focus{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.focus\\:rf-text-zinc-900:focus{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.focus\\:rf-outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:rf-ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:rf-ring-ring:focus{--tw-ring-color:hsl(var(--ring))}.focus\\:rf-ring-offset-2:focus{--tw-ring-offset-width:2px}.focus-visible\\:rf-outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:rf-ring-1:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-zinc-950:focus-visible{--tw-ring-opacity:1;--tw-ring-color:rgb(9 9 11/var(--tw-ring-opacity,1))}.focus-visible\\:rf-ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.disabled\\:rf-pointer-events-none:disabled{pointer-events:none}.disabled\\:rf-cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:rf-opacity-50:disabled{opacity:.5}.rf-group\\/bar:hover .group-hover\\/bar\\:rf-opacity-100{opacity:1}.data-\\[disabled\\]\\:rf-pointer-events-none[data-disabled]{pointer-events:none}.data-\\[side\\=bottom\\]\\:rf-translate-y-1[data-side=bottom]{--tw-translate-y:0.25rem}.data-\\[side\\=bottom\\]\\:rf-translate-y-1[data-side=bottom],.data-\\[side\\=left\\]\\:-rf-translate-x-1[data-side=left]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=left\\]\\:-rf-translate-x-1[data-side=left]{--tw-translate-x:-0.25rem}.data-\\[side\\=right\\]\\:rf-translate-x-1[data-side=right]{--tw-translate-x:0.25rem}.data-\\[side\\=right\\]\\:rf-translate-x-1[data-side=right],.data-\\[side\\=top\\]\\:-rf-translate-y-1[data-side=top]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=top\\]\\:-rf-translate-y-1[data-side=top]{--tw-translate-y:-0.25rem}.data-\\[state\\=active\\]\\:rf-bg-white[data-state=active]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.data-\\[state\\=checked\\]\\:rf-bg-zinc-900[data-state=checked]{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.data-\\[state\\=open\\]\\:rf-bg-zinc-100[data-state=open]{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.data-\\[state\\=active\\]\\:rf-text-zinc-950[data-state=active]{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.data-\\[state\\=checked\\]\\:rf-text-zinc-50[data-state=checked]{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.data-\\[disabled\\]\\:rf-opacity-50[data-disabled]{opacity:.5}.data-\\[state\\=active\\]\\:rf-shadow[data-state=active]{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.data-\\[state\\=open\\]\\:rf-animate-in[data-state=open]{animation-duration:.15s;animation-name:enter;--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial}.data-\\[state\\=closed\\]\\:rf-animate-out[data-state=closed]{animation-duration:.15s;animation-name:exit;--tw-exit-opacity:initial;--tw-exit-scale:initial;--tw-exit-rotate:initial;--tw-exit-translate-x:initial;--tw-exit-translate-y:initial}.data-\\[state\\=closed\\]\\:rf-fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\\[state\\=open\\]\\:rf-fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\\[state\\=closed\\]\\:rf-zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\\[state\\=open\\]\\:rf-zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\\[side\\=bottom\\]\\:rf-slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:-0.5rem}.data-\\[side\\=left\\]\\:rf-slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:0.5rem}.data-\\[side\\=right\\]\\:rf-slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:-0.5rem}.data-\\[side\\=top\\]\\:rf-slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:0.5rem}.data-\\[state\\=closed\\]\\:rf-slide-out-to-left-1\\/2[data-state=closed]{--tw-exit-translate-x:-50%}.data-\\[state\\=closed\\]\\:rf-slide-out-to-top-\\[48\\%\\][data-state=closed]{--tw-exit-translate-y:-48%}.data-\\[state\\=open\\]\\:rf-slide-in-from-left-1\\/2[data-state=open]{--tw-enter-translate-x:-50%}.data-\\[state\\=open\\]\\:rf-slide-in-from-top-\\[48\\%\\][data-state=open]{--tw-enter-translate-y:-48%}.dark\\:rf-border-zinc-50:is(.rf-dark *){--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity,1))}.dark\\:rf-border-zinc-800:is(.rf-dark *){--tw-border-opacity:1;border-color:rgb(39 39 42/var(--tw-border-opacity,1))}.dark\\:rf-bg-red-900:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-50:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-800:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-950:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.dark\\:rf-text-zinc-400:is(.rf-dark *){--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-50:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-900:is(.rf-dark *){--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.dark\\:rf-placeholder-zinc-400:is(.rf-dark *)::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity,1))}.dark\\:rf-placeholder-zinc-400:is(.rf-dark *)::placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity,1))}.dark\\:rf-ring-offset-zinc-950:is(.rf-dark *){--tw-ring-offset-color:#09090b}.dark\\:hover\\:rf-bg-red-900\\/90:hover:is(.rf-dark *){background-color:rgba(127,29,29,.9)}.dark\\:hover\\:rf-bg-zinc-50\\/90:hover:is(.rf-dark *){background-color:hsla(0,0%,98%,.9)}.dark\\:hover\\:rf-bg-zinc-800:hover:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:hover\\:rf-bg-zinc-800\\/80:hover:is(.rf-dark *){background-color:rgba(39,39,42,.8)}.dark\\:hover\\:rf-text-zinc-50:hover:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:focus\\:rf-bg-zinc-800:focus:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:focus\\:rf-text-zinc-50:focus:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:focus-visible\\:rf-ring-zinc-300:focus-visible:is(.rf-dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(212 212 216/var(--tw-ring-opacity,1))}.dark\\:data-\\[state\\=active\\]\\:rf-bg-zinc-950[data-state=active]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=checked\\]\\:rf-bg-zinc-50[data-state=checked]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=open\\]\\:rf-bg-zinc-800[data-state=open]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=active\\]\\:rf-text-zinc-50[data-state=active]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:data-\\[state\\=checked\\]\\:rf-text-zinc-900[data-state=checked]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}@media (min-width:640px){.sm\\:rf-mt-0{margin-top:0}.sm\\:rf-flex-row{flex-direction:row}.sm\\:rf-justify-end{justify-content:flex-end}.sm\\:rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.sm\\:rf-rounded-lg{border-radius:var(--radius)}.sm\\:rf-text-left{text-align:left}}@media (min-width:768px){.md\\:rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}.\\[\\&\\>span\\]\\:rf-line-clamp-1>span{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\\[\\&\\>svg\\]\\:rf-size-4>svg{height:1rem;width:1rem}.\\[\\&\\>svg\\]\\:rf-shrink-0>svg{flex-shrink:0}.\\[\\&\\>svg\\]\\:rf-text-red-300>svg{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.\\[\\&\\>svg\\]\\:hover\\:rf-text-red-400:hover>svg{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.\\[\\&_svg\\]\\:rf-pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:rf-size-4 svg{height:1rem;width:1rem}.\\[\\&_svg\\]\\:rf-shrink-0 svg{flex-shrink:0}',Mhn=()=>{Qe.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=Thn,document.head.appendChild(e)},[])},dZe=n=>`hsl(${c3.indexOf(n)*137.5%360}, 70%, 50%)`,Chn=({phaseTimings:n})=>{if(!n)return null;const e=Object.values(n).reduce((t,r)=>t+r,0);return Fe.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[Fe.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:c3.map(t=>{const r=n[t]||0,i=r/e*100;return Fe.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${i}%`,backgroundColor:dZe(t)},children:Fe.jsxs("div",{className:"rf-opacity-0 group-hover/bar:rf-opacity-100 rf-transition-opacity rf-absolute rf-bottom-full rf-left-1/2 rf-transform -rf-translate-x-1/2 rf-mb-2 rf-px-2 rf-py-1 rf-text-xs rf-whitespace-nowrap rf-rounded rf-bg-gray-900 rf-text-white rf-pointer-events-none",children:[t,": ",r.toFixed(1),"ms"]})},t)})}),Fe.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},Rhn=({renderLog:n})=>{const[e,t]=Qe.useState("chronological");if(!n)return Fe.jsx("div",{className:"rf-p-4 rf-bg-gray-100 rf-rounded-md",children:"No render log, make sure this tab is open when you render (TODO add a rerender button here)"});const r=Object.entries((n==null?void 0:n.phaseTimings)??{});e==="chronological"?r.sort((a,o)=>c3.indexOf(a[0])-c3.indexOf(o[0])):r.sort((a,o)=>o[1]-a[1]);const i=r.reduce((a,[o,s])=>a+s,0);return Fe.jsxs("div",{className:"rf-bg-white",children:[Fe.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center",children:[Fe.jsx("div",{children:"Render Logs"}),Fe.jsxs("div",{className:"rf-mb-4 rf-pr-2 rf-flex rf-text-xs rf-items-center",children:[Fe.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),Fe.jsxs("select",{value:e,onChange:a=>t(a.target.value),className:"rf-px-2 rf-py-1 rf-border rf-rounded rf-text-xs",children:[Fe.jsx("option",{value:"chronological",children:"Phase Order"}),Fe.jsx("option",{value:"longest",children:"Duration"})]})]})]}),Fe.jsx(Chn,{phaseTimings:n.phaseTimings}),Fe.jsxs("table",{className:"rf-w-full rf-text-xs",children:[Fe.jsx("thead",{children:Fe.jsxs("tr",{children:[Fe.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),Fe.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),Fe.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),Fe.jsx("tbody",{children:r.map(([a,o])=>Fe.jsxs("tr",{children:[Fe.jsx("td",{className:"rf-p-2",children:c3.indexOf(a)}),Fe.jsx("td",{className:"rf-p-2",children:a}),Fe.jsx("td",{className:"rf-p-2",children:Fe.jsx("div",{className:"rf-w-8",children:Fe.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:dZe(a),width:`${o/i*100}%`}})})}),Fe.jsx("td",{className:"rf-p-2",children:Fe.jsxs("div",{className:"rf-flex w-full",children:[Fe.jsxs("span",{className:"rf-flex-grow",children:[o,"ms"]}),Fe.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(o/i*100).toFixed(1),"%"]})]})})]},a))})]})]})},Ahn="0.0.357",Phn=["assembly","bom","circuit_json","errors","render_log"],Nhn=({code:n,onRunClicked:e=void 0,errorMessage:t,circuitJson:r,autoroutingGraphics:i,showRightHeaderContent:a=!0,showCodeTab:o=!1,codeTabContent:s,showJsonTab:l=!0,showRenderLogTab:c=!0,onActiveTabChange:u,renderLog:f,showImportAndFormatButtons:d=!0,className:v,headerClassName:y,leftHeaderContent:w,readOnly:b,isStreaming:S,autoroutingLog:M,onReportAutoroutingLog:N,isRunningCode:k,hasCodeChangedSinceLastRun:G,onEditEvent:q,editEvents:X,defaultActiveTab:Y,autoRotate3dViewerDisabled:ee,showSchematicDebugGrid:W=!1,showToggleFullScreen:ue=!0,defaultToFullScreen:pe=!1})=>{var Oe;Mhn();const[de,we]=Qe.useState(Y??"pcb"),[he,_e]=Qe.useState(pe),Te=Qe.useCallback(Ne=>{we(Ne),u==null||u(Ne)},[u]),be=()=>{_e(!he)};return Qe.useEffect(()=>{t&&Te("errors")},[t]),Qe.useEffect(()=>{(de==="code"||de==="errors")&&r&&!t&&Te(Y??"pcb")},[r]),Fe.jsx("div",{className:O0("flex flex-col relative rf-overflow-x-hidden",v),children:Fe.jsx("div",{className:O0("rf-md:sticky rf-md:top-2",he&&"rf-fixed rf-top-0 rf-left-0 rf-w-full rf-bg-white"),children:Fe.jsxs(qxe,{value:de,onValueChange:Te,className:"rf-flex-grow rf-flex rf-flex-col",children:[Fe.jsxs("div",{className:O0("rf-flex rf-items-center rf-gap-2 rf-p-2 rf-pb-0",y),children:[w,w&&Fe.jsx("div",{className:"rf-flex-grow"}),!w&&k&&Fe.jsx(KT,{className:"rf-w-4 rf-h-4 rf-animate-spin"}),!w&&Fe.jsx("div",{className:"rf-flex-grow"}),f&&f.progress!==1&&Fe.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[f.lastRenderEvent&&Fe.jsx("div",{className:"rf-text-xs rf-text-gray-500",children:(Oe=f.lastRenderEvent)==null?void 0:Oe.type.split("renderable:renderLifecycle:")[1].split(":")[0]}),Fe.jsx("div",{className:"rf-w-4 rf-h-4 rf-bg-blue-500 rf-opacity-50 rf-rounded-full rf-text-white",children:Fe.jsx(KT,{className:"rf-w-4 rf-h-4 rf-animate-spin"})}),Fe.jsxs("div",{className:"rf-text-xs rf-font-bold rf-text-gray-700 rf-tabular-nums",children:[((f.progress??0)*100).toFixed(1),"%"]})]}),a&&Fe.jsxs(Qq,{children:[o&&Fe.jsx(Q8,{value:"code",children:"Code"}),Fe.jsxs(Q8,{value:"pcb",className:"rf-whitespace-nowrap",children:[r&&Fe.jsx("span",{className:O0("rf-inline-flex rf-items-center rf-justify-center rf-w-2 rf-h-2 rf-mr-1 rf-text-xs rf-font-bold rf-text-white rf-rounded-full",G?"rf-bg-gray-500":"rf-bg-blue-500")}),"PCB"]}),Fe.jsxs(Q8,{value:"schematic",className:"rf-whitespace-nowrap",children:[r&&Fe.jsx("span",{className:O0("rf-inline-flex rf-items-center rf-justify-center rf-w-2 rf-h-2 rf-mr-1 rf-text-xs rf-font-bold rf-text-white rf-rounded-full",G?"rf-bg-gray-500":"rf-bg-blue-500")}),"Schematic"]}),Fe.jsxs(Q8,{value:"cad",children:[r&&Fe.jsx("span",{className:O0("inline-flex items-center justify-center w-2 h-2 mr-1 text-xs font-bold text-white rounded-full",G?"rf-bg-gray-500":"rf-bg-blue-500")}),"3D"]}),!["pcb","cad","schematic"].includes(de)&&Fe.jsx(Q8,{value:de,children:Gxe(de)}),Fe.jsxs(Mfe,{children:[Fe.jsx(Cfe,{asChild:!0,children:Fe.jsxs("div",{className:"rf-whitespace-nowrap rf-p-2 rf-mr-1 rf-cursor-pointer rf-relative",children:[Fe.jsx(san,{className:"rf-w-4 rf-h-4"}),t&&Fe.jsx("span",{className:"rf-inline-flex rf-absolute rf-top-[6px] rf-right-[4px] rf-items-center rf-justify-center rf-w-1 rf-h-1 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full"})]})}),Fe.jsxs(AB,{className:"rf-*:text-xs",children:[Phn.map(Ne=>Fe.jsxs(C4,{onSelect:()=>Te(Ne),children:[de!==Ne&&Fe.jsx(L$e,{className:"rf-w-3 rf-h-3 rf-opacity-30"}),de===Ne&&Fe.jsx(MP,{className:"rf-w-3 rf-h-3"}),Fe.jsx("div",{className:"rf-pr-2",children:Gxe(Ne)}),Ne==="errors"&&t&&Fe.jsx("span",{className:"rf-inline-flex rf-items-center rf-justify-center rf-w-3 rf-h-3 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full",children:"1"})]},Ne)),Fe.jsx(C4,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:Fe.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/runframe@",Ahn.split(".").map((Ne,Ie)=>Ie===2?parseInt(Ne)+1:Ne).join(".")]})})]})]})]}),ue&&Fe.jsx(p2,{onClick:be,variant:"ghost",children:he?Fe.jsx(fan,{size:16}):Fe.jsx(can,{size:16})})]}),o&&Fe.jsx(Z4,{value:"code",className:"rf-flex-grow rf-overflow-hidden",children:Fe.jsx("div",{className:"rf-h-full",children:s})}),Fe.jsx(Z4,{value:"pcb",children:Fe.jsx("div",{className:O0("rf-overflow-hidden",he?"rf-h-[calc(100vh-52px)]":"rf-h-[620px]"),children:Fe.jsx(QT,{fallbackRender:({error:Ne})=>Fe.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Fe.jsxs("div",{className:"rf-p-4",children:[Fe.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading PCB viewer"}),Fe.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(Ne==null?void 0:Ne.message)||"An unknown error occurred"})]})}),children:r?Fe.jsx(Ehn,{focusOnHover:!1,circuitJson:r,debugGraphics:i,containerClassName:O0("rf-h-full rf-w-full",he?"rf-min-h-[calc(100vh-240px)]":"rf-min-h-[620px]"),onEditEventsChanged:Ne=>{q&&Ne.forEach(Ie=>q(Ie))}}):Fe.jsx(Ew,{onRunClicked:e})})})}),Fe.jsx(Z4,{value:"assembly",children:Fe.jsx("div",{className:O0("rf-overflow-auto",he?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Fe.jsx(QT,{fallback:Fe.jsx("div",{children:"Error loading Assembly"}),children:r?Fe.jsx(_hn,{circuitJson:r,containerStyle:{height:"100%"},editingEnabled:!0,debugGrid:!0}):Fe.jsx(Ew,{onRunClicked:e})})})}),Fe.jsx(Z4,{value:"schematic",children:Fe.jsx("div",{className:O0("rf-overflow-auto",he?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Fe.jsx(QT,{fallbackRender:({error:Ne})=>Fe.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Fe.jsxs("div",{className:"rf-p-4",children:[Fe.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Schematic"}),Fe.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(Ne==null?void 0:Ne.message)||"An unknown error occurred"})]})}),children:r?Fe.jsx(vhn,{circuitJson:r,containerStyle:{height:"100%"},editingEnabled:!0,onEditEvent:Ne=>{q==null||q(Ne)},debugGrid:W}):Fe.jsx(Ew,{onRunClicked:e})})})}),Fe.jsx(Z4,{value:"cad",children:Fe.jsx("div",{className:O0("rf-overflow-auto",he?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Fe.jsx(QT,{FallbackComponent:qin,children:r?Fe.jsx(Uen,{soup:r,autoRotateDisabled:ee}):Fe.jsx(Ew,{onRunClicked:e})})})}),Fe.jsx(Z4,{value:"bom",children:Fe.jsx("div",{className:O0("rf-overflow-auto",he?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Fe.jsx(QT,{fallbackRender:({error:Ne})=>Fe.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Fe.jsxs("div",{className:"rf-p-4",children:[Fe.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Bill of Materials"}),Fe.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(Ne==null?void 0:Ne.message)||"An unknown error occurred"})]})}),children:r?Fe.jsx(whn,{circuitJson:r}):Fe.jsx(Ew,{onRunClicked:e})})})}),Fe.jsx(Z4,{value:"circuit_json",children:Fe.jsx("div",{className:O0("rf-overflow-auto",he?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Fe.jsx(QT,{fallback:Fe.jsx("div",{children:"Error loading JSON viewer"}),children:r?Fe.jsx(bhn,{elements:r}):Fe.jsx(Ew,{onRunClicked:e})})})}),Fe.jsx(Z4,{value:"errors",children:Fe.jsx("div",{className:O0("rf-overflow-auto",he?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:r||t?Fe.jsx(ecn,{code:n,errorMessage:t,autoroutingLog:M,onReportAutoroutingLog:N}):Fe.jsx(Ew,{onRunClicked:e})})}),c&&Fe.jsx(Z4,{value:"render_log",children:Fe.jsx(Rhn,{renderLog:f})})]})})})};var Yde="Dialog",[pZe,hZe]=l4(Yde),[Dhn,R4]=pZe(Yde),mZe=n=>{const{__scopeDialog:e,children:t,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=n,s=Qe.useRef(null),l=Qe.useRef(null),[c=!1,u]=X8({prop:r,defaultProp:i,onChange:a});return Fe.jsx(Dhn,{scope:e,triggerRef:s,contentRef:l,contentId:O3(),titleId:O3(),descriptionId:O3(),open:c,onOpenChange:u,onOpenToggle:Qe.useCallback(()=>u(f=>!f),[u]),modal:o,children:t})};mZe.displayName=Yde;var vZe="DialogTrigger",yZe=Qe.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=R4(vZe,t),a=ly(e,i.triggerRef);return Fe.jsx(kh.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Zde(i.open),...r,ref:a,onClick:zu(n.onClick,i.onOpenToggle)})});yZe.displayName=vZe;var Xde="DialogPortal",[Lhn,gZe]=pZe(Xde,{forceMount:void 0}),_Ze=n=>{const{__scopeDialog:e,forceMount:t,children:r,container:i}=n,a=R4(Xde,e);return Fe.jsx(Lhn,{scope:e,forceMount:t,children:Qe.Children.map(r,o=>Fe.jsx(X4,{present:t||a.open,children:Fe.jsx(yB,{asChild:!0,container:i,children:o})}))})};_Ze.displayName=Xde;var zj="DialogOverlay",xZe=Qe.forwardRef((n,e)=>{const t=gZe(zj,n.__scopeDialog),{forceMount:r=t.forceMount,...i}=n,a=R4(zj,n.__scopeDialog);return a.modal?Fe.jsx(X4,{present:r||a.open,children:Fe.jsx(zhn,{...i,ref:e})}):null});xZe.displayName=zj;var Ohn=o7("DialogOverlay.RemoveScroll"),zhn=Qe.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=R4(zj,t);return Fe.jsx(TB,{as:Ohn,allowPinchZoom:!0,shards:[i.contentRef],children:Fe.jsx(kh.div,{"data-state":Zde(i.open),...r,ref:e,style:{pointerEvents:"auto",...r.style}})})}),Tw="DialogContent",bZe=Qe.forwardRef((n,e)=>{const t=gZe(Tw,n.__scopeDialog),{forceMount:r=t.forceMount,...i}=n,a=R4(Tw,n.__scopeDialog);return Fe.jsx(X4,{present:r||a.open,children:a.modal?Fe.jsx(Uhn,{...i,ref:e}):Fe.jsx(khn,{...i,ref:e})})});bZe.displayName=Tw;var Uhn=Qe.forwardRef((n,e)=>{const t=R4(Tw,n.__scopeDialog),r=Qe.useRef(null),i=ly(e,t.contentRef,r);return Qe.useEffect(()=>{const a=r.current;if(a)return ffe(a)},[]),Fe.jsx(SZe,{...n,ref:i,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:zu(n.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=t.triggerRef.current)==null||o.focus()}),onPointerDownOutside:zu(n.onPointerDownOutside,a=>{const o=a.detail.originalEvent,s=o.button===0&&o.ctrlKey===!0;(o.button===2||s)&&a.preventDefault()}),onFocusOutside:zu(n.onFocusOutside,a=>a.preventDefault())})}),khn=Qe.forwardRef((n,e)=>{const t=R4(Tw,n.__scopeDialog),r=Qe.useRef(!1),i=Qe.useRef(!1);return Fe.jsx(SZe,{...n,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,s;(o=n.onCloseAutoFocus)==null||o.call(n,a),a.defaultPrevented||(r.current||(s=t.triggerRef.current)==null||s.focus(),a.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:a=>{var l,c;(l=n.onInteractOutside)==null||l.call(n,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;((c=t.triggerRef.current)==null?void 0:c.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),SZe=Qe.forwardRef((n,e)=>{const{__scopeDialog:t,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=n,s=R4(Tw,t),l=Qe.useRef(null),c=ly(e,l);return que(),Fe.jsxs(Fe.Fragment,{children:[Fe.jsx(oB,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:Fe.jsx(aB,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Zde(s.open),...o,ref:c,onDismiss:()=>s.onOpenChange(!1)})}),Fe.jsxs(Fe.Fragment,{children:[Fe.jsx(Fhn,{titleId:s.titleId}),Fe.jsx(jhn,{contentRef:l,descriptionId:s.descriptionId})]})]})}),Wde="DialogTitle",wZe=Qe.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=R4(Wde,t);return Fe.jsx(kh.h2,{id:i.titleId,...r,ref:e})});wZe.displayName=Wde;var EZe="DialogDescription",TZe=Qe.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=R4(EZe,t);return Fe.jsx(kh.p,{id:i.descriptionId,...r,ref:e})});TZe.displayName=EZe;var MZe="DialogClose",CZe=Qe.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=R4(MZe,t);return Fe.jsx(kh.button,{type:"button",...r,ref:e,onClick:zu(n.onClick,()=>i.onOpenChange(!1))})});CZe.displayName=MZe;function Zde(n){return n?"open":"closed"}var RZe="DialogTitleWarning",[Ihn,AZe]=dgt(RZe,{contentName:Tw,titleName:Wde,docsSlug:"dialog"}),Fhn=({titleId:n})=>{const e=AZe(RZe),t=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
13413
13413
 
13414
13414
  If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
13415
13415
 
@@ -13595,7 +13595,7 @@ to {
13595
13595
  > * {
13596
13596
  pointer-events: auto;
13597
13597
  }
13598
- `,Jj=16,A1n=({reverseOrder:n,position:e="top-center",toastOptions:t,gutter:r,children:i,containerStyle:a,containerClassName:o})=>{let{toasts:s,handlers:l}=r1n(t);return Qe.createElement("div",{id:"_rht_toaster",style:{position:"fixed",zIndex:9999,top:Jj,left:Jj,right:Jj,bottom:Jj,pointerEvents:"none",...a},className:o,onMouseEnter:l.startPause,onMouseLeave:l.endPause},s.map(c=>{let u=c.position||e,f=l.calculateOffset(c,{reverseOrder:n,gutter:r,defaultPosition:e}),d=C1n(u,f);return Qe.createElement(M1n,{id:c.id,key:c.id,onHeightUpdate:l.updateHeight,className:c.visible?R1n:"",style:d},c.type==="custom"?Qj(c.message,c):i?i(c):Qe.createElement(T1n,{toast:c,position:u}))}))};const P1n=({finalCost:n,onConfirmCheckout:e,onCancel:t})=>{const[r,i]=Qe.useState(null),[a]=Qe.useState([{id:1,name:"Home",street:"123 Main St",city:"San Francisco",state:"CA",zipCode:"94105",country:"USA",isDefault:!0},{id:2,name:"Office",street:"456 Market St",city:"San Francisco",state:"CA",zipCode:"94103",country:"USA",isDefault:!1}]),[o,s]=Qe.useState({name:"",street:"",city:"",state:"",zipCode:"",country:""}),l=f=>{const{name:d,value:v}=f.target;s(y=>({...y,[d]:v}))},c=f=>{i(f);const d=a.find(v=>v.id===f);d&&s({name:d.name,street:d.street,city:d.city,state:d.state,zipCode:d.zipCode,country:d.country})},u=()=>{if(!r&&(!o.street||!o.city||!o.zipCode)){t5.error("Please provide a complete shipping address.");return}t5.success("Your PCB order has been placed successfully."),e()};return Fe.jsxs("div",{className:"rf-bg-white rf-rounded-xl rf-p-6 rf-mx-auto",children:[Fe.jsx("h2",{className:"rf-text-2xl rf-font-bold rf-mb-6",children:"Checkout"}),Fe.jsxs("div",{className:"rf-grid rf-grid-cols-1 md:rf-grid-cols-2 rf-gap-8",children:[Fe.jsxs("div",{className:"rf-space-y-6",children:[Fe.jsx("h3",{className:"rf-text-lg rf-font-semibold",children:"Shipping Address"}),a.length>0&&Fe.jsxs("div",{className:"rf-space-y-4",children:[Fe.jsx("div",{className:"rf-text-sm rf-font-medium rf-text-gray-500",children:"Saved Addresses"}),Fe.jsx("div",{className:"rf-flex rf-flex-wrap rf-gap-3",children:a.map(f=>Fe.jsxs("button",{type:"button",onClick:()=>c(f.id),className:O0("rf-flex rf-items-center rf-gap-2 rf-px-3 rf-py-2 rf-text-sm rf-rounded-md rf-border rf-transition-colors",r===f.id?"rf-border-blue-500 rf-bg-blue-50 rf-text-blue-700":"rf-border-gray-200 rf-hover:bg-gray-50"),children:[Fe.jsx(uan,{className:"rf-h-4 rf-w-4"}),Fe.jsx("span",{children:f.name}),f.isDefault&&Fe.jsx("span",{className:"rf-inline-flex rf-items-center rf-rounded-full rf-bg-blue-100 rf-px-2 rf-py-0.5 rf-text-xs rf-font-medium rf-text-blue-800",children:"Default"})]},f.id))})]}),Fe.jsxs("div",{className:"rf-space-y-4",children:[Fe.jsx("div",{className:"rf-grid rf-grid-cols-2 rf-gap-4",children:Fe.jsxs("div",{className:"rf-space-y-2",children:[Fe.jsx("label",{htmlFor:"name",children:"Address Name"}),Fe.jsx(O6,{id:"name",name:"name",placeholder:"Home, Office, etc.",value:o.name,onChange:l})]})}),Fe.jsxs("div",{className:"rf-space-y-2",children:[Fe.jsx("label",{htmlFor:"street",children:"Street Address"}),Fe.jsx(O6,{id:"street",name:"street",placeholder:"123 Main St",value:o.street,onChange:l})]}),Fe.jsxs("div",{className:"rf-grid rf-grid-cols-2 rf-gap-4",children:[Fe.jsxs("div",{className:"rf-space-y-2",children:[Fe.jsx("label",{htmlFor:"city",children:"City"}),Fe.jsx(O6,{id:"city",name:"city",placeholder:"City",value:o.city,onChange:l})]}),Fe.jsxs("div",{className:"rf-space-y-2",children:[Fe.jsx("label",{htmlFor:"state",children:"State"}),Fe.jsx(O6,{id:"state",name:"state",placeholder:"State",value:o.state,onChange:l})]})]}),Fe.jsxs("div",{className:"rf-grid rf-grid-cols-2 rf-gap-4",children:[Fe.jsxs("div",{className:"rf-space-y-2",children:[Fe.jsx("label",{htmlFor:"zipCode",children:"Zip Code"}),Fe.jsx(O6,{id:"zipCode",name:"zipCode",placeholder:"Zip Code",value:o.zipCode,onChange:l})]}),Fe.jsxs("div",{className:"rf-space-y-2",children:[Fe.jsx("label",{htmlFor:"country",children:"Country"}),Fe.jsx(O6,{id:"country",name:"country",placeholder:"Country",value:o.country,onChange:l})]})]})]})]}),Fe.jsxs("div",{className:"rf-bg-gray-50 rf-p-6 rf-rounded-lg",children:[Fe.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-mb-4",children:"Order Summary"}),Fe.jsxs("div",{className:"rf-space-y-4",children:[Fe.jsxs("div",{className:"rf-flex rf-justify-between rf-py-2 rf-border-b rf-border-gray-200",children:[Fe.jsx("span",{className:"rf-text-gray-600",children:"PCB Manufacturing"}),Fe.jsxs("span",{className:"rf-font-medium",children:["$",(n*.6).toFixed(2)]})]}),Fe.jsxs("div",{className:"rf-flex rf-justify-between rf-py-2 rf-border-b rf-border-gray-200",children:[Fe.jsx("span",{className:"rf-text-gray-600",children:"Components"}),Fe.jsxs("span",{className:"rf-font-medium",children:["$",(n*.3).toFixed(2)]})]}),Fe.jsxs("div",{className:"rf-flex rf-justify-between rf-py-2 rf-border-b rf-border-gray-200",children:[Fe.jsx("span",{className:"rf-text-gray-600",children:"Assembly"}),Fe.jsxs("span",{className:"rf-font-medium",children:["$",(n*.1).toFixed(2)]})]}),Fe.jsxs("div",{className:"rf-flex rf-justify-between rf-py-2 rf-border-b rf-border-gray-200",children:[Fe.jsx("span",{className:"rf-text-gray-600",children:"Shipping"}),Fe.jsx("span",{className:"rf-font-medium",children:"$15.00"})]}),Fe.jsxs("div",{className:"rf-flex rf-justify-between rf-py-2 rf-text-lg rf-font-bold",children:[Fe.jsx("span",{children:"Total"}),Fe.jsxs("span",{children:["$",(n+15).toFixed(2)]})]}),Fe.jsxs("div",{className:"rf-pt-4",children:[Fe.jsx(p2,{onClick:u,className:"rf-w-full rf-bg-gray-700 rf-hover:bg-gray-800 rf-text-white rf-py-3",children:"Confirm and Place Order"}),Fe.jsx(p2,{variant:"outline",onClick:t,className:"rf-w-full rf-mt-3",children:"Cancel"})]})]})]})]})]})};class yQe extends Error{constructor(t,r,i){const a=t.status||t.status===0?t.status:"",o=t.statusText||"",s=`${a} ${o}`.trim(),l=s?`status code ${s}`:"an unknown error";super(`Request failed with ${l}: ${r.method} ${r.url}`);ht(this,"response");ht(this,"request");ht(this,"options");this.name="HTTPError",this.response=t,this.request=r,this.options=i}}class gQe extends Error{constructor(t){super(`Request timed out: ${t.method} ${t.url}`);ht(this,"request");this.name="TimeoutError",this.request=t}}const _Qe=(()=>{let n=!1,e=!1;const t=typeof globalThis.ReadableStream=="function",r=typeof globalThis.Request=="function";if(t&&r)try{e=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return n=!0,"half"}}).headers.has("Content-Type")}catch(i){if(i instanceof Error&&i.message==="unsupported BodyInit type")return!1;throw i}return n&&!e})(),N1n=typeof globalThis.AbortController=="function",D1n=typeof globalThis.ReadableStream=="function",L1n=typeof globalThis.FormData=="function",xQe=["get","post","put","patch","head","delete"],O1n={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},s0e=2147483647,z1n=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,bQe=Symbol("stop"),U1n={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0},k1n={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,dispatcher:!0,duplex:!0,priority:!0},I1n=n=>{if(!n)return 0;if(n instanceof FormData){let e=0;for(const[t,r]of n)e+=z1n,e+=new TextEncoder().encode(`Content-Disposition: form-data; name="${t}"`).length,e+=typeof r=="string"?new TextEncoder().encode(r).length:r.size;return e}if(n instanceof Blob)return n.size;if(n instanceof ArrayBuffer)return n.byteLength;if(typeof n=="string")return new TextEncoder().encode(n).length;if(n instanceof URLSearchParams)return new TextEncoder().encode(n.toString()).length;if("byteLength"in n)return n.byteLength;if(typeof n=="object"&&n!==null)try{const e=JSON.stringify(n);return new TextEncoder().encode(e).length}catch{return 0}return 0},F1n=(n,e)=>{const t=Number(n.headers.get("content-length"))||0;let r=0;return n.status===204?(e&&e({percent:1,totalBytes:t,transferredBytes:r},new Uint8Array),new Response(null,{status:n.status,statusText:n.statusText,headers:n.headers})):new Response(new ReadableStream({async start(i){const a=n.body.getReader();e&&e({percent:0,transferredBytes:0,totalBytes:t},new Uint8Array);async function o(){const{done:s,value:l}=await a.read();if(s){i.close();return}if(e){r+=l.byteLength;const c=t===0?0:r/t;e({percent:c,transferredBytes:r,totalBytes:t},l)}i.enqueue(l),await o()}await o()}}),{status:n.status,statusText:n.statusText,headers:n.headers})},B1n=(n,e)=>{const t=I1n(n.body);let r=0;return new Request(n,{duplex:"half",body:new ReadableStream({async start(i){const a=n.body instanceof ReadableStream?n.body.getReader():new Response("").body.getReader();async function o(){const{done:s,value:l}=await a.read();if(s){e&&e({percent:1,transferredBytes:r,totalBytes:Math.max(t,r)},new Uint8Array),i.close();return}r+=l.byteLength;let c=t===0?0:r/t;(t<r||c===1)&&(c=.99),e&&e({percent:Number(c.toFixed(2)),transferredBytes:r,totalBytes:t},l),i.enqueue(l),await o()}await o()}})})},ZP=n=>n!==null&&typeof n=="object",eH=(...n)=>{for(const e of n)if((!ZP(e)||Array.isArray(e))&&e!==void 0)throw new TypeError("The `options` argument must be an object");return l0e({},...n)},SQe=(n={},e={})=>{const t=new globalThis.Headers(n),r=e instanceof globalThis.Headers,i=new globalThis.Headers(e);for(const[a,o]of i.entries())r&&o==="undefined"||o===void 0?t.delete(a):t.set(a,o);return t};function tH(n,e,t){return Object.hasOwn(e,t)&&e[t]===void 0?[]:l0e(n[t]??[],e[t]??[])}const wQe=(n={},e={})=>({beforeRequest:tH(n,e,"beforeRequest"),beforeRetry:tH(n,e,"beforeRetry"),afterResponse:tH(n,e,"afterResponse"),beforeError:tH(n,e,"beforeError")}),l0e=(...n)=>{let e={},t={},r={};for(const i of n)if(Array.isArray(i))Array.isArray(e)||(e=[]),e=[...e,...i];else if(ZP(i)){for(let[a,o]of Object.entries(i))ZP(o)&&a in e&&(o=l0e(e[a],o)),e={...e,[a]:o};ZP(i.hooks)&&(r=wQe(r,i.hooks),e.hooks=r),ZP(i.headers)&&(t=SQe(t,i.headers),e.headers=t)}return e},j1n=n=>xQe.includes(n)?n.toUpperCase():n,EQe={limit:2,methods:["get","put","head","delete","options","trace"],statusCodes:[408,413,429,500,502,503,504],afterStatusCodes:[413,429,503],maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:n=>.3*2**(n-1)*1e3},H1n=(n={})=>{if(typeof n=="number")return{...EQe,limit:n};if(n.methods&&!Array.isArray(n.methods))throw new Error("retry.methods must be an array");if(n.statusCodes&&!Array.isArray(n.statusCodes))throw new Error("retry.statusCodes must be an array");return{...EQe,...n}};async function V1n(n,e,t,r){return new Promise((i,a)=>{const o=setTimeout(()=>{t&&t.abort(),a(new gQe(n))},r.timeout);r.fetch(n,e).then(i).catch(a).then(()=>{clearTimeout(o)})})}async function $1n(n,{signal:e}){return new Promise((t,r)=>{e&&(e.throwIfAborted(),e.addEventListener("abort",i,{once:!0}));function i(){clearTimeout(a),r(e.reason)}const a=setTimeout(()=>{e==null||e.removeEventListener("abort",i),t()},n)})}const G1n=(n,e)=>{const t={};for(const r in e)!(r in k1n)&&!(r in U1n)&&!(r in n)&&(t[r]=e[r]);return t};class nH{constructor(e,t={}){ht(this,"request");ht(this,"abortController");ht(this,"_retryCount",0);ht(this,"_input");ht(this,"_options");var r,i;if(this._input=e,this._options={...t,headers:SQe(this._input.headers,t.headers),hooks:wQe({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},t.hooks),method:j1n(t.method??this._input.method??"GET"),prefixUrl:String(t.prefixUrl||""),retry:H1n(t.retry),throwHttpErrors:t.throwHttpErrors!==!1,timeout:t.timeout??1e4,fetch:t.fetch??globalThis.fetch.bind(globalThis)},typeof this._input!="string"&&!(this._input instanceof URL||this._input instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this._options.prefixUrl&&typeof this._input=="string"){if(this._input.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this._options.prefixUrl.endsWith("/")||(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input}if(N1n){const a=this._options.signal??this._input.signal;this.abortController=new globalThis.AbortController,this._options.signal=a?AbortSignal.any([a,this.abortController.signal]):this.abortController.signal}if(_Qe&&(this._options.duplex="half"),this._options.json!==void 0&&(this._options.body=((i=(r=this._options).stringifyJson)==null?void 0:i.call(r,this._options.json))??JSON.stringify(this._options.json),this._options.headers.set("content-type",this._options.headers.get("content-type")??"application/json")),this.request=new globalThis.Request(this._input,this._options),this._options.searchParams){const o="?"+(typeof this._options.searchParams=="string"?this._options.searchParams.replace(/^\?/,""):new URLSearchParams(this._options.searchParams).toString()),s=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,o);(L1n&&this._options.body instanceof globalThis.FormData||this._options.body instanceof URLSearchParams)&&!(this._options.headers&&this._options.headers["content-type"])&&this.request.headers.delete("content-type"),this.request=new globalThis.Request(new globalThis.Request(s,{...this.request}),this._options)}if(this._options.onUploadProgress){if(typeof this._options.onUploadProgress!="function")throw new TypeError("The `onUploadProgress` option must be a function");if(!_Qe)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request.body&&(this.request=B1n(this.request,this._options.onUploadProgress))}}static create(e,t){const r=new nH(e,t),i=async()=>{var l;if(typeof r._options.timeout=="number"&&r._options.timeout>s0e)throw new RangeError(`The \`timeout\` option cannot be greater than ${s0e}`);await Promise.resolve();let s=await r._fetch();for(const c of r._options.hooks.afterResponse){const u=await c(r.request,r._options,r._decorateResponse(s.clone()));u instanceof globalThis.Response&&(s=u)}if(r._decorateResponse(s),!s.ok&&r._options.throwHttpErrors){let c=new yQe(s,r.request,r._options);for(const u of r._options.hooks.beforeError)c=await u(c);throw c}if(r.request.bodyUsed||await((l=r.request.body)==null?void 0:l.cancel()),r._options.onDownloadProgress){if(typeof r._options.onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!D1n)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");return F1n(s.clone(),r._options.onDownloadProgress)}return s},o=r._options.retry.methods.includes(r.request.method.toLowerCase())?r._retry(i):i();for(const[s,l]of Object.entries(O1n))o[s]=async()=>{r.request.headers.set("accept",r.request.headers.get("accept")||l);const c=await o;if(s==="json"){if(c.status===204||(await c.clone().arrayBuffer()).byteLength===0)return"";if(t.parseJson)return t.parseJson(await c.text())}return c[s]()};return o}_calculateRetryDelay(e){if(this._retryCount++,this._retryCount>this._options.retry.limit||e instanceof gQe)throw e;if(e instanceof yQe){if(!this._options.retry.statusCodes.includes(e.response.status))throw e;const r=e.response.headers.get("Retry-After")??e.response.headers.get("RateLimit-Reset")??e.response.headers.get("X-RateLimit-Reset")??e.response.headers.get("X-Rate-Limit-Reset");if(r&&this._options.retry.afterStatusCodes.includes(e.response.status)){let i=Number(r)*1e3;Number.isNaN(i)?i=Date.parse(r)-Date.now():i>=Date.parse("2024-01-01")&&(i-=Date.now());const a=this._options.retry.maxRetryAfter??i;return i<a?i:a}if(e.response.status===413)throw e}const t=this._options.retry.delay(this._retryCount);return Math.min(this._options.retry.backoffLimit,t)}_decorateResponse(e){return this._options.parseJson&&(e.json=async()=>this._options.parseJson(await e.text())),e}async _retry(e){try{return await e()}catch(t){const r=Math.min(this._calculateRetryDelay(t),s0e);if(this._retryCount<1)throw t;await $1n(r,{signal:this._options.signal});for(const i of this._options.hooks.beforeRetry)if(await i({request:this.request,options:this._options,error:t,retryCount:this._retryCount})===bQe)return;return this._retry(e)}}async _fetch(){for(const r of this._options.hooks.beforeRequest){const i=await r(this.request,this._options);if(i instanceof Request){this.request=i;break}if(i instanceof Response)return i}const e=G1n(this.request,this._options),t=this.request;return this.request=t.clone(),this._options.timeout===!1?this._options.fetch(t,e):V1n(t,e,this.abortController,this._options)}}/*! MIT License © Sindre Sorhus */const c0e=n=>{const e=(t,r)=>nH.create(t,eH(n,r));for(const t of xQe)e[t]=(r,i)=>nH.create(r,eH(n,i,{method:t}));return e.create=t=>c0e(eH(t)),e.extend=t=>(typeof t=="function"&&(t=t(n??{})),c0e(eH(n,t))),e.stop=bQe,e},u0e=c0e();function TQe(n,[e,t]){return Math.min(t,Math.max(e,n))}function MQe(n){const e=Qe.useRef({value:n,previous:n});return Qe.useMemo(()=>(e.current.value!==n&&(e.current.previous=e.current.value,e.current.value=n),e.current.previous),[n])}var q1n="VisuallyHidden",CQe=Qe.forwardRef((n,e)=>Fe.jsx(kh.span,{...n,ref:e,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...n.style}}));CQe.displayName=q1n;var Y1n=[" ","Enter","ArrowUp","ArrowDown"],X1n=[" ","Enter"],QP="Select",[rH,iH,W1n]=Vq(QP),[uM,h4n]=l4(QP,[W1n,vB]),aH=vB(),[Z1n,k6]=uM(QP),[Q1n,K1n]=uM(QP),RQe=n=>{const{__scopeSelect:e,children:t,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:l,dir:c,name:u,autoComplete:f,disabled:d,required:v,form:y}=n,w=aH(e),[b,S]=Qe.useState(null),[M,N]=Qe.useState(null),[k,G]=Qe.useState(!1),q=jL(c),[X=!1,Y]=X8({prop:r,defaultProp:i,onChange:a}),[ee,W]=X8({prop:o,defaultProp:s,onChange:l}),ue=Qe.useRef(null),pe=b?y||!!b.closest("form"):!0,[de,we]=Qe.useState(new Set),he=Array.from(de).map(_e=>_e.props.value).join(";");return Fe.jsx(cfe,{...w,children:Fe.jsxs(Z1n,{required:v,scope:e,trigger:b,onTriggerChange:S,valueNode:M,onValueNodeChange:N,valueNodeHasChildren:k,onValueNodeHasChildrenChange:G,contentId:O3(),value:ee,onValueChange:W,open:X,onOpenChange:Y,dir:q,triggerPointerDownPosRef:ue,disabled:d,children:[Fe.jsx(rH.Provider,{scope:e,children:Fe.jsx(Q1n,{scope:n.__scopeSelect,onNativeOptionAdd:Qe.useCallback(_e=>{we(Te=>new Set(Te).add(_e))},[]),onNativeOptionRemove:Qe.useCallback(_e=>{we(Te=>{const be=new Set(Te);return be.delete(_e),be})},[]),children:t})}),pe?Fe.jsxs(JQe,{"aria-hidden":!0,required:v,tabIndex:-1,name:u,autoComplete:f,value:ee,onChange:_e=>W(_e.target.value),disabled:d,form:y,children:[ee===void 0?Fe.jsx("option",{value:""}):null,Array.from(de)]},he):null]})})};RQe.displayName=QP;var AQe="SelectTrigger",PQe=Qe.forwardRef((n,e)=>{const{__scopeSelect:t,disabled:r=!1,...i}=n,a=aH(t),o=k6(AQe,t),s=o.disabled||r,l=ly(e,o.onTriggerChange),c=iH(t),u=Qe.useRef("touch"),[f,d,v]=eKe(w=>{const b=c().filter(N=>!N.disabled),S=b.find(N=>N.value===o.value),M=tKe(b,w,S);M!==void 0&&o.onValueChange(M.value)}),y=w=>{s||(o.onOpenChange(!0),v()),w&&(o.triggerPointerDownPosRef.current={x:Math.round(w.pageX),y:Math.round(w.pageY)})};return Fe.jsx(OGe,{asChild:!0,...a,children:Fe.jsx(kh.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":KQe(o.value)?"":void 0,...i,ref:l,onClick:zu(i.onClick,w=>{w.currentTarget.focus(),u.current!=="mouse"&&y(w)}),onPointerDown:zu(i.onPointerDown,w=>{u.current=w.pointerType;const b=w.target;b.hasPointerCapture(w.pointerId)&&b.releasePointerCapture(w.pointerId),w.button===0&&w.ctrlKey===!1&&w.pointerType==="mouse"&&(y(w),w.preventDefault())}),onKeyDown:zu(i.onKeyDown,w=>{const b=f.current!=="";!(w.ctrlKey||w.altKey||w.metaKey)&&w.key.length===1&&d(w.key),!(b&&w.key===" ")&&Y1n.includes(w.key)&&(y(),w.preventDefault())})})})});PQe.displayName=AQe;var NQe="SelectValue",DQe=Qe.forwardRef((n,e)=>{const{__scopeSelect:t,className:r,style:i,children:a,placeholder:o="",...s}=n,l=k6(NQe,t),{onValueNodeHasChildrenChange:c}=l,u=a!==void 0,f=ly(e,l.onValueNodeChange);return hb(()=>{c(u)},[c,u]),Fe.jsx(kh.span,{...s,ref:f,style:{pointerEvents:"none"},children:KQe(l.value)?Fe.jsx(Fe.Fragment,{children:o}):a})});DQe.displayName=NQe;var J1n="SelectIcon",LQe=Qe.forwardRef((n,e)=>{const{__scopeSelect:t,children:r,...i}=n;return Fe.jsx(kh.span,{"aria-hidden":!0,...i,ref:e,children:r||"▼"})});LQe.displayName=J1n;var evn="SelectPortal",OQe=n=>Fe.jsx(yB,{asChild:!0,...n});OQe.displayName=evn;var Aw="SelectContent",zQe=Qe.forwardRef((n,e)=>{const t=k6(Aw,n.__scopeSelect),[r,i]=Qe.useState();if(hb(()=>{i(new DocumentFragment)},[]),!t.open){const a=r;return a?xC.createPortal(Fe.jsx(UQe,{scope:n.__scopeSelect,children:Fe.jsx(rH.Slot,{scope:n.__scopeSelect,children:Fe.jsx("div",{children:n.children})})}),a):null}return Fe.jsx(kQe,{...n,ref:e})});zQe.displayName=Aw;var A4=10,[UQe,I6]=uM(Aw),tvn="SelectContentImpl",nvn=o7("SelectContent.RemoveScroll"),kQe=Qe.forwardRef((n,e)=>{const{__scopeSelect:t,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:f,collisionBoundary:d,collisionPadding:v,sticky:y,hideWhenDetached:w,avoidCollisions:b,...S}=n,M=k6(Aw,t),[N,k]=Qe.useState(null),[G,q]=Qe.useState(null),X=ly(e,bt=>k(bt)),[Y,ee]=Qe.useState(null),[W,ue]=Qe.useState(null),pe=iH(t),[de,we]=Qe.useState(!1),he=Qe.useRef(!1);Qe.useEffect(()=>{if(N)return ffe(N)},[N]),que();const _e=Qe.useCallback(bt=>{const[Ut,...Gt]=pe().map(nn=>nn.ref.current),[hn]=Gt.slice(-1),tn=document.activeElement;for(const nn of bt)if(nn===tn||(nn==null||nn.scrollIntoView({block:"nearest"}),nn===Ut&&G&&(G.scrollTop=0),nn===hn&&G&&(G.scrollTop=G.scrollHeight),nn==null||nn.focus(),document.activeElement!==tn))return},[pe,G]),Te=Qe.useCallback(()=>_e([Y,N]),[_e,Y,N]);Qe.useEffect(()=>{de&&Te()},[de,Te]);const{onOpenChange:be,triggerPointerDownPosRef:Oe}=M;Qe.useEffect(()=>{if(N){let bt={x:0,y:0};const Ut=hn=>{var tn,nn;bt={x:Math.abs(Math.round(hn.pageX)-(((tn=Oe.current)==null?void 0:tn.x)??0)),y:Math.abs(Math.round(hn.pageY)-(((nn=Oe.current)==null?void 0:nn.y)??0))}},Gt=hn=>{bt.x<=10&&bt.y<=10?hn.preventDefault():N.contains(hn.target)||be(!1),document.removeEventListener("pointermove",Ut),Oe.current=null};return Oe.current!==null&&(document.addEventListener("pointermove",Ut),document.addEventListener("pointerup",Gt,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Ut),document.removeEventListener("pointerup",Gt,{capture:!0})}}},[N,be,Oe]),Qe.useEffect(()=>{const bt=()=>be(!1);return window.addEventListener("blur",bt),window.addEventListener("resize",bt),()=>{window.removeEventListener("blur",bt),window.removeEventListener("resize",bt)}},[be]);const[Ne,Ie]=eKe(bt=>{const Ut=pe().filter(tn=>!tn.disabled),Gt=Ut.find(tn=>tn.ref.current===document.activeElement),hn=tKe(Ut,bt,Gt);hn&&setTimeout(()=>hn.ref.current.focus())}),Ae=Qe.useCallback((bt,Ut,Gt)=>{const hn=!he.current&&!Gt;(M.value!==void 0&&M.value===Ut||hn)&&(ee(bt),hn&&(he.current=!0))},[M.value]),qe=Qe.useCallback(()=>N==null?void 0:N.focus(),[N]),Je=Qe.useCallback((bt,Ut,Gt)=>{const hn=!he.current&&!Gt;(M.value!==void 0&&M.value===Ut||hn)&&ue(bt)},[M.value]),ct=r==="popper"?f0e:IQe,dt=ct===f0e?{side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:f,collisionBoundary:d,collisionPadding:v,sticky:y,hideWhenDetached:w,avoidCollisions:b}:{};return Fe.jsx(UQe,{scope:t,content:N,viewport:G,onViewportChange:q,itemRefCallback:Ae,selectedItem:Y,onItemLeave:qe,itemTextRefCallback:Je,focusSelectedItem:Te,selectedItemText:W,position:r,isPositioned:de,searchRef:Ne,children:Fe.jsx(TB,{as:nvn,allowPinchZoom:!0,children:Fe.jsx(oB,{asChild:!0,trapped:M.open,onMountAutoFocus:bt=>{bt.preventDefault()},onUnmountAutoFocus:zu(i,bt=>{var Ut;(Ut=M.trigger)==null||Ut.focus({preventScroll:!0}),bt.preventDefault()}),children:Fe.jsx(aB,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:bt=>bt.preventDefault(),onDismiss:()=>M.onOpenChange(!1),children:Fe.jsx(ct,{role:"listbox",id:M.contentId,"data-state":M.open?"open":"closed",dir:M.dir,onContextMenu:bt=>bt.preventDefault(),...S,...dt,onPlaced:()=>we(!0),ref:X,style:{display:"flex",flexDirection:"column",outline:"none",...S.style},onKeyDown:zu(S.onKeyDown,bt=>{const Ut=bt.ctrlKey||bt.altKey||bt.metaKey;if(bt.key==="Tab"&&bt.preventDefault(),!Ut&&bt.key.length===1&&Ie(bt.key),["ArrowUp","ArrowDown","Home","End"].includes(bt.key)){let hn=pe().filter(tn=>!tn.disabled).map(tn=>tn.ref.current);if(["ArrowUp","End"].includes(bt.key)&&(hn=hn.slice().reverse()),["ArrowUp","ArrowDown"].includes(bt.key)){const tn=bt.target,nn=hn.indexOf(tn);hn=hn.slice(nn+1)}setTimeout(()=>_e(hn)),bt.preventDefault()}})})})})})})});kQe.displayName=tvn;var rvn="SelectItemAlignedPosition",IQe=Qe.forwardRef((n,e)=>{const{__scopeSelect:t,onPlaced:r,...i}=n,a=k6(Aw,t),o=I6(Aw,t),[s,l]=Qe.useState(null),[c,u]=Qe.useState(null),f=ly(e,X=>u(X)),d=iH(t),v=Qe.useRef(!1),y=Qe.useRef(!0),{viewport:w,selectedItem:b,selectedItemText:S,focusSelectedItem:M}=o,N=Qe.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&c&&w&&b&&S){const X=a.trigger.getBoundingClientRect(),Y=c.getBoundingClientRect(),ee=a.valueNode.getBoundingClientRect(),W=S.getBoundingClientRect();if(a.dir!=="rtl"){const tn=W.left-Y.left,nn=ee.left-tn,gn=X.left-nn,Yt=X.width+gn,rt=Math.max(Yt,Y.width),on=window.innerWidth-A4,Nt=TQe(nn,[A4,Math.max(A4,on-rt)]);s.style.minWidth=Yt+"px",s.style.left=Nt+"px"}else{const tn=Y.right-W.right,nn=window.innerWidth-ee.right-tn,gn=window.innerWidth-X.right-nn,Yt=X.width+gn,rt=Math.max(Yt,Y.width),on=window.innerWidth-A4,Nt=TQe(nn,[A4,Math.max(A4,on-rt)]);s.style.minWidth=Yt+"px",s.style.right=Nt+"px"}const ue=d(),pe=window.innerHeight-A4*2,de=w.scrollHeight,we=window.getComputedStyle(c),he=parseInt(we.borderTopWidth,10),_e=parseInt(we.paddingTop,10),Te=parseInt(we.borderBottomWidth,10),be=parseInt(we.paddingBottom,10),Oe=he+_e+de+be+Te,Ne=Math.min(b.offsetHeight*5,Oe),Ie=window.getComputedStyle(w),Ae=parseInt(Ie.paddingTop,10),qe=parseInt(Ie.paddingBottom,10),Je=X.top+X.height/2-A4,ct=pe-Je,dt=b.offsetHeight/2,bt=b.offsetTop+dt,Ut=he+_e+bt,Gt=Oe-Ut;if(Ut<=Je){const tn=ue.length>0&&b===ue[ue.length-1].ref.current;s.style.bottom="0px";const nn=c.clientHeight-w.offsetTop-w.offsetHeight,gn=Math.max(ct,dt+(tn?qe:0)+nn+Te),Yt=Ut+gn;s.style.height=Yt+"px"}else{const tn=ue.length>0&&b===ue[0].ref.current;s.style.top="0px";const gn=Math.max(Je,he+w.offsetTop+(tn?Ae:0)+dt)+Gt;s.style.height=gn+"px",w.scrollTop=Ut-Je+w.offsetTop}s.style.margin=`${A4}px 0`,s.style.minHeight=Ne+"px",s.style.maxHeight=pe+"px",r==null||r(),requestAnimationFrame(()=>v.current=!0)}},[d,a.trigger,a.valueNode,s,c,w,b,S,a.dir,r]);hb(()=>N(),[N]);const[k,G]=Qe.useState();hb(()=>{c&&G(window.getComputedStyle(c).zIndex)},[c]);const q=Qe.useCallback(X=>{X&&y.current===!0&&(N(),M==null||M(),y.current=!1)},[N,M]);return Fe.jsx(avn,{scope:t,contentWrapper:s,shouldExpandOnScrollRef:v,onScrollButtonChange:q,children:Fe.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:Fe.jsx(kh.div,{...i,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});IQe.displayName=rvn;var ivn="SelectPopperPosition",f0e=Qe.forwardRef((n,e)=>{const{__scopeSelect:t,align:r="start",collisionPadding:i=A4,...a}=n,o=aH(t);return Fe.jsx(zGe,{...o,...a,ref:e,align:r,collisionPadding:i,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});f0e.displayName=ivn;var[avn,d0e]=uM(Aw,{}),p0e="SelectViewport",FQe=Qe.forwardRef((n,e)=>{const{__scopeSelect:t,nonce:r,...i}=n,a=I6(p0e,t),o=d0e(p0e,t),s=ly(e,a.onViewportChange),l=Qe.useRef(0);return Fe.jsxs(Fe.Fragment,{children:[Fe.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),Fe.jsx(rH.Slot,{scope:t,children:Fe.jsx(kh.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:zu(i.onScroll,c=>{const u=c.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:d}=o;if(d!=null&&d.current&&f){const v=Math.abs(l.current-u.scrollTop);if(v>0){const y=window.innerHeight-A4*2,w=parseFloat(f.style.minHeight),b=parseFloat(f.style.height),S=Math.max(w,b);if(S<y){const M=S+v,N=Math.min(y,M),k=M-N;f.style.height=N+"px",f.style.bottom==="0px"&&(u.scrollTop=k>0?k:0,f.style.justifyContent="flex-end")}}}l.current=u.scrollTop})})})]})});FQe.displayName=p0e;var BQe="SelectGroup",[ovn,svn]=uM(BQe),lvn=Qe.forwardRef((n,e)=>{const{__scopeSelect:t,...r}=n,i=O3();return Fe.jsx(ovn,{scope:t,id:i,children:Fe.jsx(kh.div,{role:"group","aria-labelledby":i,...r,ref:e})})});lvn.displayName=BQe;var jQe="SelectLabel",HQe=Qe.forwardRef((n,e)=>{const{__scopeSelect:t,...r}=n,i=svn(jQe,t);return Fe.jsx(kh.div,{id:i.id,...r,ref:e})});HQe.displayName=jQe;var oH="SelectItem",[cvn,VQe]=uM(oH),$Qe=Qe.forwardRef((n,e)=>{const{__scopeSelect:t,value:r,disabled:i=!1,textValue:a,...o}=n,s=k6(oH,t),l=I6(oH,t),c=s.value===r,[u,f]=Qe.useState(a??""),[d,v]=Qe.useState(!1),y=ly(e,M=>{var N;return(N=l.itemRefCallback)==null?void 0:N.call(l,M,r,i)}),w=O3(),b=Qe.useRef("touch"),S=()=>{i||(s.onValueChange(r),s.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return Fe.jsx(cvn,{scope:t,value:r,disabled:i,textId:w,isSelected:c,onItemTextChange:Qe.useCallback(M=>{f(N=>N||((M==null?void 0:M.textContent)??"").trim())},[]),children:Fe.jsx(rH.ItemSlot,{scope:t,value:r,disabled:i,textValue:u,children:Fe.jsx(kh.div,{role:"option","aria-labelledby":w,"data-highlighted":d?"":void 0,"aria-selected":c&&d,"data-state":c?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...o,ref:y,onFocus:zu(o.onFocus,()=>v(!0)),onBlur:zu(o.onBlur,()=>v(!1)),onClick:zu(o.onClick,()=>{b.current!=="mouse"&&S()}),onPointerUp:zu(o.onPointerUp,()=>{b.current==="mouse"&&S()}),onPointerDown:zu(o.onPointerDown,M=>{b.current=M.pointerType}),onPointerMove:zu(o.onPointerMove,M=>{var N;b.current=M.pointerType,i?(N=l.onItemLeave)==null||N.call(l):b.current==="mouse"&&M.currentTarget.focus({preventScroll:!0})}),onPointerLeave:zu(o.onPointerLeave,M=>{var N;M.currentTarget===document.activeElement&&((N=l.onItemLeave)==null||N.call(l))}),onKeyDown:zu(o.onKeyDown,M=>{var k;((k=l.searchRef)==null?void 0:k.current)!==""&&M.key===" "||(X1n.includes(M.key)&&S(),M.key===" "&&M.preventDefault())})})})})});$Qe.displayName=oH;var KP="SelectItemText",GQe=Qe.forwardRef((n,e)=>{const{__scopeSelect:t,className:r,style:i,...a}=n,o=k6(KP,t),s=I6(KP,t),l=VQe(KP,t),c=K1n(KP,t),[u,f]=Qe.useState(null),d=ly(e,S=>f(S),l.onItemTextChange,S=>{var M;return(M=s.itemTextRefCallback)==null?void 0:M.call(s,S,l.value,l.disabled)}),v=u==null?void 0:u.textContent,y=Qe.useMemo(()=>Fe.jsx("option",{value:l.value,disabled:l.disabled,children:v},l.value),[l.disabled,l.value,v]),{onNativeOptionAdd:w,onNativeOptionRemove:b}=c;return hb(()=>(w(y),()=>b(y)),[w,b,y]),Fe.jsxs(Fe.Fragment,{children:[Fe.jsx(kh.span,{id:l.textId,...a,ref:d}),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?xC.createPortal(a.children,o.valueNode):null]})});GQe.displayName=KP;var qQe="SelectItemIndicator",YQe=Qe.forwardRef((n,e)=>{const{__scopeSelect:t,...r}=n;return VQe(qQe,t).isSelected?Fe.jsx(kh.span,{"aria-hidden":!0,...r,ref:e}):null});YQe.displayName=qQe;var h0e="SelectScrollUpButton",XQe=Qe.forwardRef((n,e)=>{const t=I6(h0e,n.__scopeSelect),r=d0e(h0e,n.__scopeSelect),[i,a]=Qe.useState(!1),o=ly(e,r.onScrollButtonChange);return hb(()=>{if(t.viewport&&t.isPositioned){let s=function(){const c=l.scrollTop>0;a(c)};const l=t.viewport;return s(),l.addEventListener("scroll",s),()=>l.removeEventListener("scroll",s)}},[t.viewport,t.isPositioned]),i?Fe.jsx(ZQe,{...n,ref:o,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=t;s&&l&&(s.scrollTop=s.scrollTop-l.offsetHeight)}}):null});XQe.displayName=h0e;var m0e="SelectScrollDownButton",WQe=Qe.forwardRef((n,e)=>{const t=I6(m0e,n.__scopeSelect),r=d0e(m0e,n.__scopeSelect),[i,a]=Qe.useState(!1),o=ly(e,r.onScrollButtonChange);return hb(()=>{if(t.viewport&&t.isPositioned){let s=function(){const c=l.scrollHeight-l.clientHeight,u=Math.ceil(l.scrollTop)<c;a(u)};const l=t.viewport;return s(),l.addEventListener("scroll",s),()=>l.removeEventListener("scroll",s)}},[t.viewport,t.isPositioned]),i?Fe.jsx(ZQe,{...n,ref:o,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=t;s&&l&&(s.scrollTop=s.scrollTop+l.offsetHeight)}}):null});WQe.displayName=m0e;var ZQe=Qe.forwardRef((n,e)=>{const{__scopeSelect:t,onAutoScroll:r,...i}=n,a=I6("SelectScrollButton",t),o=Qe.useRef(null),s=iH(t),l=Qe.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return Qe.useEffect(()=>()=>l(),[l]),hb(()=>{var u;const c=s().find(f=>f.ref.current===document.activeElement);(u=c==null?void 0:c.ref.current)==null||u.scrollIntoView({block:"nearest"})},[s]),Fe.jsx(kh.div,{"aria-hidden":!0,...i,ref:e,style:{flexShrink:0,...i.style},onPointerDown:zu(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:zu(i.onPointerMove,()=>{var c;(c=a.onItemLeave)==null||c.call(a),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:zu(i.onPointerLeave,()=>{l()})})}),uvn="SelectSeparator",QQe=Qe.forwardRef((n,e)=>{const{__scopeSelect:t,...r}=n;return Fe.jsx(kh.div,{"aria-hidden":!0,...r,ref:e})});QQe.displayName=uvn;var v0e="SelectArrow",fvn=Qe.forwardRef((n,e)=>{const{__scopeSelect:t,...r}=n,i=aH(t),a=k6(v0e,t),o=I6(v0e,t);return a.open&&o.position==="popper"?Fe.jsx(UGe,{...i,...r,ref:e}):null});fvn.displayName=v0e;function KQe(n){return n===""||n===void 0}var JQe=Qe.forwardRef((n,e)=>{const{value:t,...r}=n,i=Qe.useRef(null),a=ly(e,i),o=MQe(t);return Qe.useEffect(()=>{const s=i.current,l=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==t&&u){const f=new Event("change",{bubbles:!0});u.call(s,t),s.dispatchEvent(f)}},[o,t]),Fe.jsx(CQe,{asChild:!0,children:Fe.jsx("select",{...r,ref:a,defaultValue:t})})});JQe.displayName="BubbleSelect";function eKe(n){const e=u3(n),t=Qe.useRef(""),r=Qe.useRef(0),i=Qe.useCallback(o=>{const s=t.current+o;e(s),function l(c){t.current=c,window.clearTimeout(r.current),c!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(s)},[e]),a=Qe.useCallback(()=>{t.current="",window.clearTimeout(r.current)},[]);return Qe.useEffect(()=>()=>window.clearTimeout(r.current),[]),[t,i,a]}function tKe(n,e,t){const i=e.length>1&&Array.from(e).every(c=>c===e[0])?e[0]:e,a=t?n.indexOf(t):-1;let o=dvn(n,Math.max(a,0));i.length===1&&(o=o.filter(c=>c!==t));const l=o.find(c=>c.textValue.toLowerCase().startsWith(i.toLowerCase()));return l!==t?l:void 0}function dvn(n,e){return n.map((t,r)=>n[(e+r)%n.length])}var pvn=RQe,nKe=PQe,hvn=DQe,mvn=LQe,vvn=OQe,rKe=zQe,yvn=FQe,iKe=HQe,aKe=$Qe,gvn=GQe,_vn=YQe,oKe=XQe,sKe=WQe,lKe=QQe;const xvn=pvn,bvn=hvn,cKe=Qe.forwardRef(({className:n,children:e,...t},r)=>Fe.jsxs(nKe,{ref:r,className:O0("rf-flex rf-h-10 rf-w-full rf-items-center rf-justify-between rf-rounded-md rf-border rf-border-input rf-bg-background rf-px-3 rf-py-2 rf-text-sm rf-ring-offset-background rf-placeholder:text-muted-foreground focus:rf-outline-none focus:rf-ring-2 focus:rf-ring-ring focus:rf-ring-offset-2 disabled:rf-cursor-not-allowed disabled:rf-opacity-50 [&>span]:rf-line-clamp-1",n),...t,children:[e,Fe.jsx(mvn,{asChild:!0,children:Fe.jsx(D$e,{className:"rf-h-4 rf-w-4 rf-opacity-50"})})]}));cKe.displayName=nKe.displayName;const uKe=Qe.forwardRef(({className:n,...e},t)=>Fe.jsx(oKe,{ref:t,className:O0("rf-flex rf-cursor-default rf-items-center rf-justify-center rf-py-1",n),...e,children:Fe.jsx(ran,{className:"rf-h-4 rf-w-4"})}));uKe.displayName=oKe.displayName;const fKe=Qe.forwardRef(({className:n,...e},t)=>Fe.jsx(sKe,{ref:t,className:O0("rf-flex rf-cursor-default rf-items-center rf-justify-center rf-py-1",n),...e,children:Fe.jsx(D$e,{className:"rf-h-4 rf-w-4"})}));fKe.displayName=sKe.displayName;const dKe=Qe.forwardRef(({className:n,children:e,position:t="popper",...r},i)=>Fe.jsx(vvn,{children:Fe.jsxs(rKe,{ref:i,className:O0("rf-relative rf-z-[100] rf-max-h-96 rf-min-w-[8rem] rf-overflow-hidden rf-rounded-md rf-border rf-bg-white rf-text-black rf-shadow-md data-[state=open]:rf-animate-in data-[state=closed]:rf-animate-out data-[state=closed]:rf-fade-out-0 data-[state=open]:rf-fade-in-0 data-[state=closed]:rf-zoom-out-95 data-[state=open]:rf-zoom-in-95 data-[side=bottom]:rf-slide-in-from-top-2 data-[side=left]:rf-slide-in-from-right-2 data-[side=right]:rf-slide-in-from-left-2 data-[side=top]:rf-slide-in-from-bottom-2",t==="popper"&&"data-[side=bottom]:rf-translate-y-1 data-[side=left]:-rf-translate-x-1 data-[side=right]:rf-translate-x-1 data-[side=top]:-rf-translate-y-1",n),position:t,...r,children:[Fe.jsx(uKe,{}),Fe.jsx(yvn,{className:O0("rf-p-1",t==="popper"&&"rf-h-[var(--radix-select-trigger-height)] rf-w-full rf-min-w-[var(--radix-select-trigger-width)]"),children:e}),Fe.jsx(fKe,{})]})}));dKe.displayName=rKe.displayName;const Svn=Qe.forwardRef(({className:n,...e},t)=>Fe.jsx(iKe,{ref:t,className:O0("rf-py-1.5 rf-pl-8 rf-pr-2 rf-text-sm rf-font-semibold",n),...e}));Svn.displayName=iKe.displayName;const pKe=Qe.forwardRef(({className:n,children:e,...t},r)=>Fe.jsxs(aKe,{ref:r,className:O0("rf-relative rf-flex rf-w-full rf-cursor-default rf-select-none rf-items-center rf-rounded-sm rf-py-1.5 rf-pl-8 rf-pr-2 rf-text-sm rf-text-gray-800 rf-outline-none focus:rf-bg-gray-100 focus:rf-text-gray-900 data-[disabled]:rf-pointer-events-none data-[disabled]:rf-opacity-50",n),...t,children:[Fe.jsx("span",{className:"rf-absolute rf-left-2 rf-flex rf-h-3.5 rf-w-3.5 rf-items-center rf-justify-center",children:Fe.jsx(_vn,{children:Fe.jsx(MP,{className:"rf-h-4 rf-w-4"})})}),Fe.jsx(gvn,{children:e})]}));pKe.displayName=aKe.displayName;const wvn=Qe.forwardRef(({className:n,...e},t)=>Fe.jsx(lKe,{ref:t,className:O0("-rf-mx-1 rf-my-1 rf-h-px rf-bg-muted",n),...e}));wvn.displayName=lKe.displayName;function hKe({className:n,...e}){return Fe.jsx("div",{className:O0("rf-animate-pulse rf-rounded-md rf-bg-muted",n),...e})}function JP(){const e=typeof window<"u"&&window.__RUNFRAME_REGISTRY_BASE_URL__===!0?"/registry":"https://registry-api.tscircuit.com";return u0e.create({prefixUrl:e,timeout:3e4})}const y0e={get:(n,e)=>JP().get(n,e),post:(n,e)=>JP().post(n,e),put:(n,e)=>JP().put(n,e),delete:(n,e)=>JP().delete(n,e),patch:(n,e)=>JP().patch(n,e)},Evn=({onCancel:n,onContinue:e})=>{const t=[{id:"prototype",name:"Prototype"},{id:"development",name:"Development board"}],[r,i]=Qe.useState(!1),[a,o]=Qe.useState(null),[s,l]=Qe.useState("prototype");Qe.useEffect(()=>{v()},[]);const c=y=>{l(y),o(null),setTimeout(()=>{v()},0)},u=async()=>{const{order_quote_id:y}=await y0e.post("order_quotes/create",{json:{package_release_id:"",vendor_name:""}}).json();return y},f=async y=>{const{order_quote:w}=await y0e.post("order_quotes/get",{json:{order_quote_id:y}}).json();return w},d=async(y,w=30)=>{let b=0;for(;b<w;)try{const S=await f(y);if(S.is_complete)return o(S.total_cost),i(!1),S;if(S.has_error)throw new Error(S.error);b++,await new Promise(M=>setTimeout(M,2e3))}catch(S){console.error("Error polling order quote:",S),i(!1)}throw i(!1),new Error("Polling timed out after maximum attempts")},v=async()=>{if(!s)return;const y=await u();if(!y){console.error("Error creating order quote"),o(null);return}i(!0),o(null);try{const w=await d(y);o(w.total_cost)}catch(w){console.error("Error getting estimate:",w),o(null)}};return Fe.jsxs("div",{className:"rf-flex rf-flex-col rf-bg-white rf-rounded-xl rf-p-8 rf-max-w-md rf-w-full rf-mx-auto",children:[Fe.jsx("h2",{className:"rf-text-3xl rf-font-bold rf-text-center rf-mb-8",children:"Order PCB"}),Fe.jsxs("div",{className:"rf-mb-8",children:[Fe.jsx("label",{htmlFor:"category",className:"rf-block rf-text-sm rf-font-medium rf-text-gray-700 rf-mb-2",children:"Select Product Category"}),Fe.jsxs(xvn,{onValueChange:c,value:s||void 0,children:[Fe.jsx(cKe,{className:"rf-w-full",children:Fe.jsx(bvn,{placeholder:"Select a category"})}),Fe.jsx(dKe,{children:t.map(y=>Fe.jsx(pKe,{value:y.id,children:y.name},y.id))})]})]}),r?Fe.jsxs("div",{className:"rf-flex rf-flex-col rf-items-center rf-mb-8",children:[Fe.jsxs("div",{className:"rf-animate-pulse rf-flex rf-space-x-2 rf-items-center rf-mb-3",children:[Fe.jsx(N$e,{className:"rf-h-5 rf-w-5 rf-text-gray-400"}),Fe.jsx("span",{className:"rf-text-gray-500",children:"Fetching estimate..."})]}),Fe.jsx(hKe,{className:"rf-h-6 rf-w-3/4 rf-mb-2"}),Fe.jsx(hKe,{className:"rf-h-6 rf-w-1/2"})]}):a!==null?Fe.jsxs("div",{className:"rf-bg-gray-50 rf-p-4 rf-rounded-lg rf-mb-8",children:[Fe.jsx("p",{className:"rf-text-sm rf-text-gray-600 rf-mb-2",children:"Estimated Cost:"}),Fe.jsxs("p",{className:"rf-text-2xl rf-font-bold rf-text-gray-900",children:["$",a.toFixed(2)]}),Fe.jsx("p",{className:"rf-text-xs rf-text-gray-500 rf-mt-1",children:"Pricing may vary based on specifications"})]}):null,Fe.jsxs("div",{className:"rf-flex rf-justify-between rf-mt-auto",children:[Fe.jsx(p2,{variant:"outline",onClick:n,className:"rf-px-8 rf-border-red-500 rf-text-red-500 hover:rf-bg-red-50 hover:rf-text-red-600",children:"Cancel"}),Fe.jsx(p2,{onClick:a!==null?e:v,className:a!==null?"rf-px-8 rf-bg-gray-700 hover:rf-bg-gray-800":"rf-px-8 rf-bg-blue-600 hover:rf-bg-blue-700",children:a!==null?"Continue":"Get Estimate"})]})]})};var g0e="Progress",_0e=100,[Tvn,m4n]=l4(g0e),[Mvn,Cvn]=Tvn(g0e),mKe=Qe.forwardRef((n,e)=>{const{__scopeProgress:t,value:r=null,max:i,getValueLabel:a=Rvn,...o}=n;(i||i===0)&&!_Ke(i)&&console.error(Avn(`${i}`,"Progress"));const s=_Ke(i)?i:_0e;r!==null&&!xKe(r,s)&&console.error(Pvn(`${r}`,"Progress"));const l=xKe(r,s)?r:null,c=sH(l)?a(l,s):void 0;return Fe.jsx(Mvn,{scope:t,value:l,max:s,children:Fe.jsx(kh.div,{"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":sH(l)?l:void 0,"aria-valuetext":c,role:"progressbar","data-state":gKe(l,s),"data-value":l??void 0,"data-max":s,...o,ref:e})})});mKe.displayName=g0e;var vKe="ProgressIndicator",yKe=Qe.forwardRef((n,e)=>{const{__scopeProgress:t,...r}=n,i=Cvn(vKe,t);return Fe.jsx(kh.div,{"data-state":gKe(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...r,ref:e})});yKe.displayName=vKe;function Rvn(n,e){return`${Math.round(n/e*100)}%`}function gKe(n,e){return n==null?"indeterminate":n===e?"complete":"loading"}function sH(n){return typeof n=="number"}function _Ke(n){return sH(n)&&!isNaN(n)&&n>0}function xKe(n,e){return sH(n)&&!isNaN(n)&&n<=e&&n>=0}function Avn(n,e){return`Invalid prop \`max\` of value \`${n}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${_0e}\`.`}function Pvn(n,e){return`Invalid prop \`value\` of value \`${n}\` supplied to \`${e}\`. The \`value\` prop must be:
13598
+ `,Jj=16,A1n=({reverseOrder:n,position:e="top-center",toastOptions:t,gutter:r,children:i,containerStyle:a,containerClassName:o})=>{let{toasts:s,handlers:l}=r1n(t);return Qe.createElement("div",{id:"_rht_toaster",style:{position:"fixed",zIndex:9999,top:Jj,left:Jj,right:Jj,bottom:Jj,pointerEvents:"none",...a},className:o,onMouseEnter:l.startPause,onMouseLeave:l.endPause},s.map(c=>{let u=c.position||e,f=l.calculateOffset(c,{reverseOrder:n,gutter:r,defaultPosition:e}),d=C1n(u,f);return Qe.createElement(M1n,{id:c.id,key:c.id,onHeightUpdate:l.updateHeight,className:c.visible?R1n:"",style:d},c.type==="custom"?Qj(c.message,c):i?i(c):Qe.createElement(T1n,{toast:c,position:u}))}))};const P1n=({finalCost:n,onConfirmCheckout:e,onCancel:t})=>{const[r,i]=Qe.useState(null),[a]=Qe.useState([{id:1,name:"Home",street:"123 Main St",city:"San Francisco",state:"CA",zipCode:"94105",country:"USA",isDefault:!0},{id:2,name:"Office",street:"456 Market St",city:"San Francisco",state:"CA",zipCode:"94103",country:"USA",isDefault:!1}]),[o,s]=Qe.useState({name:"",street:"",city:"",state:"",zipCode:"",country:""}),l=f=>{const{name:d,value:v}=f.target;s(y=>({...y,[d]:v}))},c=f=>{i(f);const d=a.find(v=>v.id===f);d&&s({name:d.name,street:d.street,city:d.city,state:d.state,zipCode:d.zipCode,country:d.country})},u=()=>{if(!r&&(!o.street||!o.city||!o.zipCode)){t5.error("Please provide a complete shipping address.");return}t5.success("Your PCB order has been placed successfully."),e()};return Fe.jsxs("div",{className:"rf-bg-white rf-rounded-xl rf-p-6 rf-mx-auto",children:[Fe.jsx("h2",{className:"rf-text-2xl rf-font-bold rf-mb-6",children:"Checkout"}),Fe.jsxs("div",{className:"rf-grid rf-grid-cols-1 md:rf-grid-cols-2 rf-gap-8",children:[Fe.jsxs("div",{className:"rf-space-y-6",children:[Fe.jsx("h3",{className:"rf-text-lg rf-font-semibold",children:"Shipping Address"}),a.length>0&&Fe.jsxs("div",{className:"rf-space-y-4",children:[Fe.jsx("div",{className:"rf-text-sm rf-font-medium rf-text-gray-500",children:"Saved Addresses"}),Fe.jsx("div",{className:"rf-flex rf-flex-wrap rf-gap-3",children:a.map(f=>Fe.jsxs("button",{type:"button",onClick:()=>c(f.id),className:O0("rf-flex rf-items-center rf-gap-2 rf-px-3 rf-py-2 rf-text-sm rf-rounded-md rf-border rf-transition-colors",r===f.id?"rf-border-blue-500 rf-bg-blue-50 rf-text-blue-700":"rf-border-gray-200 rf-hover:bg-gray-50"),children:[Fe.jsx(uan,{className:"rf-h-4 rf-w-4"}),Fe.jsx("span",{children:f.name}),f.isDefault&&Fe.jsx("span",{className:"rf-inline-flex rf-items-center rf-rounded-full rf-bg-blue-100 rf-px-2 rf-py-0.5 rf-text-xs rf-font-medium rf-text-blue-800",children:"Default"})]},f.id))})]}),Fe.jsxs("div",{className:"rf-space-y-4",children:[Fe.jsx("div",{className:"rf-grid rf-grid-cols-2 rf-gap-4",children:Fe.jsxs("div",{className:"rf-space-y-2",children:[Fe.jsx("label",{htmlFor:"name",children:"Address Name"}),Fe.jsx(O6,{id:"name",name:"name",placeholder:"Home, Office, etc.",value:o.name,onChange:l})]})}),Fe.jsxs("div",{className:"rf-space-y-2",children:[Fe.jsx("label",{htmlFor:"street",children:"Street Address"}),Fe.jsx(O6,{id:"street",name:"street",placeholder:"123 Main St",value:o.street,onChange:l})]}),Fe.jsxs("div",{className:"rf-grid rf-grid-cols-2 rf-gap-4",children:[Fe.jsxs("div",{className:"rf-space-y-2",children:[Fe.jsx("label",{htmlFor:"city",children:"City"}),Fe.jsx(O6,{id:"city",name:"city",placeholder:"City",value:o.city,onChange:l})]}),Fe.jsxs("div",{className:"rf-space-y-2",children:[Fe.jsx("label",{htmlFor:"state",children:"State"}),Fe.jsx(O6,{id:"state",name:"state",placeholder:"State",value:o.state,onChange:l})]})]}),Fe.jsxs("div",{className:"rf-grid rf-grid-cols-2 rf-gap-4",children:[Fe.jsxs("div",{className:"rf-space-y-2",children:[Fe.jsx("label",{htmlFor:"zipCode",children:"Zip Code"}),Fe.jsx(O6,{id:"zipCode",name:"zipCode",placeholder:"Zip Code",value:o.zipCode,onChange:l})]}),Fe.jsxs("div",{className:"rf-space-y-2",children:[Fe.jsx("label",{htmlFor:"country",children:"Country"}),Fe.jsx(O6,{id:"country",name:"country",placeholder:"Country",value:o.country,onChange:l})]})]})]})]}),Fe.jsxs("div",{className:"rf-bg-gray-50 rf-p-6 rf-rounded-lg",children:[Fe.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-mb-4",children:"Order Summary"}),Fe.jsxs("div",{className:"rf-space-y-4",children:[Fe.jsxs("div",{className:"rf-flex rf-justify-between rf-py-2 rf-border-b rf-border-gray-200",children:[Fe.jsx("span",{className:"rf-text-gray-600",children:"PCB Manufacturing"}),Fe.jsxs("span",{className:"rf-font-medium",children:["$",(n*.6).toFixed(2)]})]}),Fe.jsxs("div",{className:"rf-flex rf-justify-between rf-py-2 rf-border-b rf-border-gray-200",children:[Fe.jsx("span",{className:"rf-text-gray-600",children:"Components"}),Fe.jsxs("span",{className:"rf-font-medium",children:["$",(n*.3).toFixed(2)]})]}),Fe.jsxs("div",{className:"rf-flex rf-justify-between rf-py-2 rf-border-b rf-border-gray-200",children:[Fe.jsx("span",{className:"rf-text-gray-600",children:"Assembly"}),Fe.jsxs("span",{className:"rf-font-medium",children:["$",(n*.1).toFixed(2)]})]}),Fe.jsxs("div",{className:"rf-flex rf-justify-between rf-py-2 rf-border-b rf-border-gray-200",children:[Fe.jsx("span",{className:"rf-text-gray-600",children:"Shipping"}),Fe.jsx("span",{className:"rf-font-medium",children:"$15.00"})]}),Fe.jsxs("div",{className:"rf-flex rf-justify-between rf-py-2 rf-text-lg rf-font-bold",children:[Fe.jsx("span",{children:"Total"}),Fe.jsxs("span",{children:["$",(n+15).toFixed(2)]})]}),Fe.jsxs("div",{className:"rf-pt-4",children:[Fe.jsx(p2,{onClick:u,className:"rf-w-full rf-bg-gray-700 rf-hover:bg-gray-800 rf-text-white rf-py-3",children:"Confirm and Place Order"}),Fe.jsx(p2,{variant:"outline",onClick:t,className:"rf-w-full rf-mt-3",children:"Cancel"})]})]})]})]})]})};class yQe extends Error{constructor(t,r,i){const a=t.status||t.status===0?t.status:"",o=t.statusText||"",s=`${a} ${o}`.trim(),l=s?`status code ${s}`:"an unknown error";super(`Request failed with ${l}: ${r.method} ${r.url}`);ht(this,"response");ht(this,"request");ht(this,"options");this.name="HTTPError",this.response=t,this.request=r,this.options=i}}class gQe extends Error{constructor(t){super(`Request timed out: ${t.method} ${t.url}`);ht(this,"request");this.name="TimeoutError",this.request=t}}const _Qe=(()=>{let n=!1,e=!1;const t=typeof globalThis.ReadableStream=="function",r=typeof globalThis.Request=="function";if(t&&r)try{e=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return n=!0,"half"}}).headers.has("Content-Type")}catch(i){if(i instanceof Error&&i.message==="unsupported BodyInit type")return!1;throw i}return n&&!e})(),N1n=typeof globalThis.AbortController=="function",D1n=typeof globalThis.ReadableStream=="function",L1n=typeof globalThis.FormData=="function",xQe=["get","post","put","patch","head","delete"],O1n={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},s0e=2147483647,z1n=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,bQe=Symbol("stop"),U1n={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0},k1n={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,dispatcher:!0,duplex:!0,priority:!0},I1n=n=>{if(!n)return 0;if(n instanceof FormData){let e=0;for(const[t,r]of n)e+=z1n,e+=new TextEncoder().encode(`Content-Disposition: form-data; name="${t}"`).length,e+=typeof r=="string"?new TextEncoder().encode(r).length:r.size;return e}if(n instanceof Blob)return n.size;if(n instanceof ArrayBuffer)return n.byteLength;if(typeof n=="string")return new TextEncoder().encode(n).length;if(n instanceof URLSearchParams)return new TextEncoder().encode(n.toString()).length;if("byteLength"in n)return n.byteLength;if(typeof n=="object"&&n!==null)try{const e=JSON.stringify(n);return new TextEncoder().encode(e).length}catch{return 0}return 0},F1n=(n,e)=>{const t=Number(n.headers.get("content-length"))||0;let r=0;return n.status===204?(e&&e({percent:1,totalBytes:t,transferredBytes:r},new Uint8Array),new Response(null,{status:n.status,statusText:n.statusText,headers:n.headers})):new Response(new ReadableStream({async start(i){const a=n.body.getReader();e&&e({percent:0,transferredBytes:0,totalBytes:t},new Uint8Array);async function o(){const{done:s,value:l}=await a.read();if(s){i.close();return}if(e){r+=l.byteLength;const c=t===0?0:r/t;e({percent:c,transferredBytes:r,totalBytes:t},l)}i.enqueue(l),await o()}await o()}}),{status:n.status,statusText:n.statusText,headers:n.headers})},B1n=(n,e)=>{const t=I1n(n.body);let r=0;return new Request(n,{duplex:"half",body:new ReadableStream({async start(i){const a=n.body instanceof ReadableStream?n.body.getReader():new Response("").body.getReader();async function o(){const{done:s,value:l}=await a.read();if(s){e&&e({percent:1,transferredBytes:r,totalBytes:Math.max(t,r)},new Uint8Array),i.close();return}r+=l.byteLength;let c=t===0?0:r/t;(t<r||c===1)&&(c=.99),e&&e({percent:Number(c.toFixed(2)),transferredBytes:r,totalBytes:t},l),i.enqueue(l),await o()}await o()}})})},ZP=n=>n!==null&&typeof n=="object",eH=(...n)=>{for(const e of n)if((!ZP(e)||Array.isArray(e))&&e!==void 0)throw new TypeError("The `options` argument must be an object");return l0e({},...n)},SQe=(n={},e={})=>{const t=new globalThis.Headers(n),r=e instanceof globalThis.Headers,i=new globalThis.Headers(e);for(const[a,o]of i.entries())r&&o==="undefined"||o===void 0?t.delete(a):t.set(a,o);return t};function tH(n,e,t){return Object.hasOwn(e,t)&&e[t]===void 0?[]:l0e(n[t]??[],e[t]??[])}const wQe=(n={},e={})=>({beforeRequest:tH(n,e,"beforeRequest"),beforeRetry:tH(n,e,"beforeRetry"),afterResponse:tH(n,e,"afterResponse"),beforeError:tH(n,e,"beforeError")}),l0e=(...n)=>{let e={},t={},r={};for(const i of n)if(Array.isArray(i))Array.isArray(e)||(e=[]),e=[...e,...i];else if(ZP(i)){for(let[a,o]of Object.entries(i))ZP(o)&&a in e&&(o=l0e(e[a],o)),e={...e,[a]:o};ZP(i.hooks)&&(r=wQe(r,i.hooks),e.hooks=r),ZP(i.headers)&&(t=SQe(t,i.headers),e.headers=t)}return e},j1n=n=>xQe.includes(n)?n.toUpperCase():n,EQe={limit:2,methods:["get","put","head","delete","options","trace"],statusCodes:[408,413,429,500,502,503,504],afterStatusCodes:[413,429,503],maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:n=>.3*2**(n-1)*1e3},H1n=(n={})=>{if(typeof n=="number")return{...EQe,limit:n};if(n.methods&&!Array.isArray(n.methods))throw new Error("retry.methods must be an array");if(n.statusCodes&&!Array.isArray(n.statusCodes))throw new Error("retry.statusCodes must be an array");return{...EQe,...n}};async function V1n(n,e,t,r){return new Promise((i,a)=>{const o=setTimeout(()=>{t&&t.abort(),a(new gQe(n))},r.timeout);r.fetch(n,e).then(i).catch(a).then(()=>{clearTimeout(o)})})}async function $1n(n,{signal:e}){return new Promise((t,r)=>{e&&(e.throwIfAborted(),e.addEventListener("abort",i,{once:!0}));function i(){clearTimeout(a),r(e.reason)}const a=setTimeout(()=>{e==null||e.removeEventListener("abort",i),t()},n)})}const G1n=(n,e)=>{const t={};for(const r in e)!(r in k1n)&&!(r in U1n)&&!(r in n)&&(t[r]=e[r]);return t};class nH{constructor(e,t={}){ht(this,"request");ht(this,"abortController");ht(this,"_retryCount",0);ht(this,"_input");ht(this,"_options");var r,i;if(this._input=e,this._options={...t,headers:SQe(this._input.headers,t.headers),hooks:wQe({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},t.hooks),method:j1n(t.method??this._input.method??"GET"),prefixUrl:String(t.prefixUrl||""),retry:H1n(t.retry),throwHttpErrors:t.throwHttpErrors!==!1,timeout:t.timeout??1e4,fetch:t.fetch??globalThis.fetch.bind(globalThis)},typeof this._input!="string"&&!(this._input instanceof URL||this._input instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this._options.prefixUrl&&typeof this._input=="string"){if(this._input.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this._options.prefixUrl.endsWith("/")||(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input}if(N1n){const a=this._options.signal??this._input.signal;this.abortController=new globalThis.AbortController,this._options.signal=a?AbortSignal.any([a,this.abortController.signal]):this.abortController.signal}if(_Qe&&(this._options.duplex="half"),this._options.json!==void 0&&(this._options.body=((i=(r=this._options).stringifyJson)==null?void 0:i.call(r,this._options.json))??JSON.stringify(this._options.json),this._options.headers.set("content-type",this._options.headers.get("content-type")??"application/json")),this.request=new globalThis.Request(this._input,this._options),this._options.searchParams){const o="?"+(typeof this._options.searchParams=="string"?this._options.searchParams.replace(/^\?/,""):new URLSearchParams(this._options.searchParams).toString()),s=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,o);(L1n&&this._options.body instanceof globalThis.FormData||this._options.body instanceof URLSearchParams)&&!(this._options.headers&&this._options.headers["content-type"])&&this.request.headers.delete("content-type"),this.request=new globalThis.Request(new globalThis.Request(s,{...this.request}),this._options)}if(this._options.onUploadProgress){if(typeof this._options.onUploadProgress!="function")throw new TypeError("The `onUploadProgress` option must be a function");if(!_Qe)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request.body&&(this.request=B1n(this.request,this._options.onUploadProgress))}}static create(e,t){const r=new nH(e,t),i=async()=>{var l;if(typeof r._options.timeout=="number"&&r._options.timeout>s0e)throw new RangeError(`The \`timeout\` option cannot be greater than ${s0e}`);await Promise.resolve();let s=await r._fetch();for(const c of r._options.hooks.afterResponse){const u=await c(r.request,r._options,r._decorateResponse(s.clone()));u instanceof globalThis.Response&&(s=u)}if(r._decorateResponse(s),!s.ok&&r._options.throwHttpErrors){let c=new yQe(s,r.request,r._options);for(const u of r._options.hooks.beforeError)c=await u(c);throw c}if(r.request.bodyUsed||await((l=r.request.body)==null?void 0:l.cancel()),r._options.onDownloadProgress){if(typeof r._options.onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!D1n)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");return F1n(s.clone(),r._options.onDownloadProgress)}return s},o=r._options.retry.methods.includes(r.request.method.toLowerCase())?r._retry(i):i();for(const[s,l]of Object.entries(O1n))o[s]=async()=>{r.request.headers.set("accept",r.request.headers.get("accept")||l);const c=await o;if(s==="json"){if(c.status===204||(await c.clone().arrayBuffer()).byteLength===0)return"";if(t.parseJson)return t.parseJson(await c.text())}return c[s]()};return o}_calculateRetryDelay(e){if(this._retryCount++,this._retryCount>this._options.retry.limit||e instanceof gQe)throw e;if(e instanceof yQe){if(!this._options.retry.statusCodes.includes(e.response.status))throw e;const r=e.response.headers.get("Retry-After")??e.response.headers.get("RateLimit-Reset")??e.response.headers.get("X-RateLimit-Reset")??e.response.headers.get("X-Rate-Limit-Reset");if(r&&this._options.retry.afterStatusCodes.includes(e.response.status)){let i=Number(r)*1e3;Number.isNaN(i)?i=Date.parse(r)-Date.now():i>=Date.parse("2024-01-01")&&(i-=Date.now());const a=this._options.retry.maxRetryAfter??i;return i<a?i:a}if(e.response.status===413)throw e}const t=this._options.retry.delay(this._retryCount);return Math.min(this._options.retry.backoffLimit,t)}_decorateResponse(e){return this._options.parseJson&&(e.json=async()=>this._options.parseJson(await e.text())),e}async _retry(e){try{return await e()}catch(t){const r=Math.min(this._calculateRetryDelay(t),s0e);if(this._retryCount<1)throw t;await $1n(r,{signal:this._options.signal});for(const i of this._options.hooks.beforeRetry)if(await i({request:this.request,options:this._options,error:t,retryCount:this._retryCount})===bQe)return;return this._retry(e)}}async _fetch(){for(const r of this._options.hooks.beforeRequest){const i=await r(this.request,this._options);if(i instanceof Request){this.request=i;break}if(i instanceof Response)return i}const e=G1n(this.request,this._options),t=this.request;return this.request=t.clone(),this._options.timeout===!1?this._options.fetch(t,e):V1n(t,e,this.abortController,this._options)}}/*! MIT License © Sindre Sorhus */const c0e=n=>{const e=(t,r)=>nH.create(t,eH(n,r));for(const t of xQe)e[t]=(r,i)=>nH.create(r,eH(n,i,{method:t}));return e.create=t=>c0e(eH(t)),e.extend=t=>(typeof t=="function"&&(t=t(n??{})),c0e(eH(n,t))),e.stop=bQe,e},u0e=c0e();function TQe(n,[e,t]){return Math.min(t,Math.max(e,n))}function MQe(n){const e=Qe.useRef({value:n,previous:n});return Qe.useMemo(()=>(e.current.value!==n&&(e.current.previous=e.current.value,e.current.value=n),e.current.previous),[n])}var q1n="VisuallyHidden",CQe=Qe.forwardRef((n,e)=>Fe.jsx(kh.span,{...n,ref:e,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...n.style}}));CQe.displayName=q1n;var Y1n=[" ","Enter","ArrowUp","ArrowDown"],X1n=[" ","Enter"],QP="Select",[rH,iH,W1n]=Vq(QP),[uM,h4n]=l4(QP,[W1n,vB]),aH=vB(),[Z1n,k6]=uM(QP),[Q1n,K1n]=uM(QP),RQe=n=>{const{__scopeSelect:e,children:t,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:l,dir:c,name:u,autoComplete:f,disabled:d,required:v,form:y}=n,w=aH(e),[b,S]=Qe.useState(null),[M,N]=Qe.useState(null),[k,G]=Qe.useState(!1),q=jL(c),[X=!1,Y]=X8({prop:r,defaultProp:i,onChange:a}),[ee,W]=X8({prop:o,defaultProp:s,onChange:l}),ue=Qe.useRef(null),pe=b?y||!!b.closest("form"):!0,[de,we]=Qe.useState(new Set),he=Array.from(de).map(_e=>_e.props.value).join(";");return Fe.jsx(cfe,{...w,children:Fe.jsxs(Z1n,{required:v,scope:e,trigger:b,onTriggerChange:S,valueNode:M,onValueNodeChange:N,valueNodeHasChildren:k,onValueNodeHasChildrenChange:G,contentId:O3(),value:ee,onValueChange:W,open:X,onOpenChange:Y,dir:q,triggerPointerDownPosRef:ue,disabled:d,children:[Fe.jsx(rH.Provider,{scope:e,children:Fe.jsx(Q1n,{scope:n.__scopeSelect,onNativeOptionAdd:Qe.useCallback(_e=>{we(Te=>new Set(Te).add(_e))},[]),onNativeOptionRemove:Qe.useCallback(_e=>{we(Te=>{const be=new Set(Te);return be.delete(_e),be})},[]),children:t})}),pe?Fe.jsxs(JQe,{"aria-hidden":!0,required:v,tabIndex:-1,name:u,autoComplete:f,value:ee,onChange:_e=>W(_e.target.value),disabled:d,form:y,children:[ee===void 0?Fe.jsx("option",{value:""}):null,Array.from(de)]},he):null]})})};RQe.displayName=QP;var AQe="SelectTrigger",PQe=Qe.forwardRef((n,e)=>{const{__scopeSelect:t,disabled:r=!1,...i}=n,a=aH(t),o=k6(AQe,t),s=o.disabled||r,l=ly(e,o.onTriggerChange),c=iH(t),u=Qe.useRef("touch"),[f,d,v]=eKe(w=>{const b=c().filter(N=>!N.disabled),S=b.find(N=>N.value===o.value),M=tKe(b,w,S);M!==void 0&&o.onValueChange(M.value)}),y=w=>{s||(o.onOpenChange(!0),v()),w&&(o.triggerPointerDownPosRef.current={x:Math.round(w.pageX),y:Math.round(w.pageY)})};return Fe.jsx(OGe,{asChild:!0,...a,children:Fe.jsx(kh.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":KQe(o.value)?"":void 0,...i,ref:l,onClick:zu(i.onClick,w=>{w.currentTarget.focus(),u.current!=="mouse"&&y(w)}),onPointerDown:zu(i.onPointerDown,w=>{u.current=w.pointerType;const b=w.target;b.hasPointerCapture(w.pointerId)&&b.releasePointerCapture(w.pointerId),w.button===0&&w.ctrlKey===!1&&w.pointerType==="mouse"&&(y(w),w.preventDefault())}),onKeyDown:zu(i.onKeyDown,w=>{const b=f.current!=="";!(w.ctrlKey||w.altKey||w.metaKey)&&w.key.length===1&&d(w.key),!(b&&w.key===" ")&&Y1n.includes(w.key)&&(y(),w.preventDefault())})})})});PQe.displayName=AQe;var NQe="SelectValue",DQe=Qe.forwardRef((n,e)=>{const{__scopeSelect:t,className:r,style:i,children:a,placeholder:o="",...s}=n,l=k6(NQe,t),{onValueNodeHasChildrenChange:c}=l,u=a!==void 0,f=ly(e,l.onValueNodeChange);return hb(()=>{c(u)},[c,u]),Fe.jsx(kh.span,{...s,ref:f,style:{pointerEvents:"none"},children:KQe(l.value)?Fe.jsx(Fe.Fragment,{children:o}):a})});DQe.displayName=NQe;var J1n="SelectIcon",LQe=Qe.forwardRef((n,e)=>{const{__scopeSelect:t,children:r,...i}=n;return Fe.jsx(kh.span,{"aria-hidden":!0,...i,ref:e,children:r||"▼"})});LQe.displayName=J1n;var evn="SelectPortal",OQe=n=>Fe.jsx(yB,{asChild:!0,...n});OQe.displayName=evn;var Aw="SelectContent",zQe=Qe.forwardRef((n,e)=>{const t=k6(Aw,n.__scopeSelect),[r,i]=Qe.useState();if(hb(()=>{i(new DocumentFragment)},[]),!t.open){const a=r;return a?xC.createPortal(Fe.jsx(UQe,{scope:n.__scopeSelect,children:Fe.jsx(rH.Slot,{scope:n.__scopeSelect,children:Fe.jsx("div",{children:n.children})})}),a):null}return Fe.jsx(kQe,{...n,ref:e})});zQe.displayName=Aw;var A4=10,[UQe,I6]=uM(Aw),tvn="SelectContentImpl",nvn=o7("SelectContent.RemoveScroll"),kQe=Qe.forwardRef((n,e)=>{const{__scopeSelect:t,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:f,collisionBoundary:d,collisionPadding:v,sticky:y,hideWhenDetached:w,avoidCollisions:b,...S}=n,M=k6(Aw,t),[N,k]=Qe.useState(null),[G,q]=Qe.useState(null),X=ly(e,bt=>k(bt)),[Y,ee]=Qe.useState(null),[W,ue]=Qe.useState(null),pe=iH(t),[de,we]=Qe.useState(!1),he=Qe.useRef(!1);Qe.useEffect(()=>{if(N)return ffe(N)},[N]),que();const _e=Qe.useCallback(bt=>{const[Ut,...Gt]=pe().map(nn=>nn.ref.current),[hn]=Gt.slice(-1),tn=document.activeElement;for(const nn of bt)if(nn===tn||(nn==null||nn.scrollIntoView({block:"nearest"}),nn===Ut&&G&&(G.scrollTop=0),nn===hn&&G&&(G.scrollTop=G.scrollHeight),nn==null||nn.focus(),document.activeElement!==tn))return},[pe,G]),Te=Qe.useCallback(()=>_e([Y,N]),[_e,Y,N]);Qe.useEffect(()=>{de&&Te()},[de,Te]);const{onOpenChange:be,triggerPointerDownPosRef:Oe}=M;Qe.useEffect(()=>{if(N){let bt={x:0,y:0};const Ut=hn=>{var tn,nn;bt={x:Math.abs(Math.round(hn.pageX)-(((tn=Oe.current)==null?void 0:tn.x)??0)),y:Math.abs(Math.round(hn.pageY)-(((nn=Oe.current)==null?void 0:nn.y)??0))}},Gt=hn=>{bt.x<=10&&bt.y<=10?hn.preventDefault():N.contains(hn.target)||be(!1),document.removeEventListener("pointermove",Ut),Oe.current=null};return Oe.current!==null&&(document.addEventListener("pointermove",Ut),document.addEventListener("pointerup",Gt,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Ut),document.removeEventListener("pointerup",Gt,{capture:!0})}}},[N,be,Oe]),Qe.useEffect(()=>{const bt=()=>be(!1);return window.addEventListener("blur",bt),window.addEventListener("resize",bt),()=>{window.removeEventListener("blur",bt),window.removeEventListener("resize",bt)}},[be]);const[Ne,Ie]=eKe(bt=>{const Ut=pe().filter(tn=>!tn.disabled),Gt=Ut.find(tn=>tn.ref.current===document.activeElement),hn=tKe(Ut,bt,Gt);hn&&setTimeout(()=>hn.ref.current.focus())}),Ae=Qe.useCallback((bt,Ut,Gt)=>{const hn=!he.current&&!Gt;(M.value!==void 0&&M.value===Ut||hn)&&(ee(bt),hn&&(he.current=!0))},[M.value]),qe=Qe.useCallback(()=>N==null?void 0:N.focus(),[N]),Je=Qe.useCallback((bt,Ut,Gt)=>{const hn=!he.current&&!Gt;(M.value!==void 0&&M.value===Ut||hn)&&ue(bt)},[M.value]),ct=r==="popper"?f0e:IQe,dt=ct===f0e?{side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:f,collisionBoundary:d,collisionPadding:v,sticky:y,hideWhenDetached:w,avoidCollisions:b}:{};return Fe.jsx(UQe,{scope:t,content:N,viewport:G,onViewportChange:q,itemRefCallback:Ae,selectedItem:Y,onItemLeave:qe,itemTextRefCallback:Je,focusSelectedItem:Te,selectedItemText:W,position:r,isPositioned:de,searchRef:Ne,children:Fe.jsx(TB,{as:nvn,allowPinchZoom:!0,children:Fe.jsx(oB,{asChild:!0,trapped:M.open,onMountAutoFocus:bt=>{bt.preventDefault()},onUnmountAutoFocus:zu(i,bt=>{var Ut;(Ut=M.trigger)==null||Ut.focus({preventScroll:!0}),bt.preventDefault()}),children:Fe.jsx(aB,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:bt=>bt.preventDefault(),onDismiss:()=>M.onOpenChange(!1),children:Fe.jsx(ct,{role:"listbox",id:M.contentId,"data-state":M.open?"open":"closed",dir:M.dir,onContextMenu:bt=>bt.preventDefault(),...S,...dt,onPlaced:()=>we(!0),ref:X,style:{display:"flex",flexDirection:"column",outline:"none",...S.style},onKeyDown:zu(S.onKeyDown,bt=>{const Ut=bt.ctrlKey||bt.altKey||bt.metaKey;if(bt.key==="Tab"&&bt.preventDefault(),!Ut&&bt.key.length===1&&Ie(bt.key),["ArrowUp","ArrowDown","Home","End"].includes(bt.key)){let hn=pe().filter(tn=>!tn.disabled).map(tn=>tn.ref.current);if(["ArrowUp","End"].includes(bt.key)&&(hn=hn.slice().reverse()),["ArrowUp","ArrowDown"].includes(bt.key)){const tn=bt.target,nn=hn.indexOf(tn);hn=hn.slice(nn+1)}setTimeout(()=>_e(hn)),bt.preventDefault()}})})})})})})});kQe.displayName=tvn;var rvn="SelectItemAlignedPosition",IQe=Qe.forwardRef((n,e)=>{const{__scopeSelect:t,onPlaced:r,...i}=n,a=k6(Aw,t),o=I6(Aw,t),[s,l]=Qe.useState(null),[c,u]=Qe.useState(null),f=ly(e,X=>u(X)),d=iH(t),v=Qe.useRef(!1),y=Qe.useRef(!0),{viewport:w,selectedItem:b,selectedItemText:S,focusSelectedItem:M}=o,N=Qe.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&c&&w&&b&&S){const X=a.trigger.getBoundingClientRect(),Y=c.getBoundingClientRect(),ee=a.valueNode.getBoundingClientRect(),W=S.getBoundingClientRect();if(a.dir!=="rtl"){const tn=W.left-Y.left,nn=ee.left-tn,gn=X.left-nn,Yt=X.width+gn,rt=Math.max(Yt,Y.width),on=window.innerWidth-A4,Nt=TQe(nn,[A4,Math.max(A4,on-rt)]);s.style.minWidth=Yt+"px",s.style.left=Nt+"px"}else{const tn=Y.right-W.right,nn=window.innerWidth-ee.right-tn,gn=window.innerWidth-X.right-nn,Yt=X.width+gn,rt=Math.max(Yt,Y.width),on=window.innerWidth-A4,Nt=TQe(nn,[A4,Math.max(A4,on-rt)]);s.style.minWidth=Yt+"px",s.style.right=Nt+"px"}const ue=d(),pe=window.innerHeight-A4*2,de=w.scrollHeight,we=window.getComputedStyle(c),he=parseInt(we.borderTopWidth,10),_e=parseInt(we.paddingTop,10),Te=parseInt(we.borderBottomWidth,10),be=parseInt(we.paddingBottom,10),Oe=he+_e+de+be+Te,Ne=Math.min(b.offsetHeight*5,Oe),Ie=window.getComputedStyle(w),Ae=parseInt(Ie.paddingTop,10),qe=parseInt(Ie.paddingBottom,10),Je=X.top+X.height/2-A4,ct=pe-Je,dt=b.offsetHeight/2,bt=b.offsetTop+dt,Ut=he+_e+bt,Gt=Oe-Ut;if(Ut<=Je){const tn=ue.length>0&&b===ue[ue.length-1].ref.current;s.style.bottom="0px";const nn=c.clientHeight-w.offsetTop-w.offsetHeight,gn=Math.max(ct,dt+(tn?qe:0)+nn+Te),Yt=Ut+gn;s.style.height=Yt+"px"}else{const tn=ue.length>0&&b===ue[0].ref.current;s.style.top="0px";const gn=Math.max(Je,he+w.offsetTop+(tn?Ae:0)+dt)+Gt;s.style.height=gn+"px",w.scrollTop=Ut-Je+w.offsetTop}s.style.margin=`${A4}px 0`,s.style.minHeight=Ne+"px",s.style.maxHeight=pe+"px",r==null||r(),requestAnimationFrame(()=>v.current=!0)}},[d,a.trigger,a.valueNode,s,c,w,b,S,a.dir,r]);hb(()=>N(),[N]);const[k,G]=Qe.useState();hb(()=>{c&&G(window.getComputedStyle(c).zIndex)},[c]);const q=Qe.useCallback(X=>{X&&y.current===!0&&(N(),M==null||M(),y.current=!1)},[N,M]);return Fe.jsx(avn,{scope:t,contentWrapper:s,shouldExpandOnScrollRef:v,onScrollButtonChange:q,children:Fe.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:Fe.jsx(kh.div,{...i,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});IQe.displayName=rvn;var ivn="SelectPopperPosition",f0e=Qe.forwardRef((n,e)=>{const{__scopeSelect:t,align:r="start",collisionPadding:i=A4,...a}=n,o=aH(t);return Fe.jsx(zGe,{...o,...a,ref:e,align:r,collisionPadding:i,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});f0e.displayName=ivn;var[avn,d0e]=uM(Aw,{}),p0e="SelectViewport",FQe=Qe.forwardRef((n,e)=>{const{__scopeSelect:t,nonce:r,...i}=n,a=I6(p0e,t),o=d0e(p0e,t),s=ly(e,a.onViewportChange),l=Qe.useRef(0);return Fe.jsxs(Fe.Fragment,{children:[Fe.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),Fe.jsx(rH.Slot,{scope:t,children:Fe.jsx(kh.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:zu(i.onScroll,c=>{const u=c.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:d}=o;if(d!=null&&d.current&&f){const v=Math.abs(l.current-u.scrollTop);if(v>0){const y=window.innerHeight-A4*2,w=parseFloat(f.style.minHeight),b=parseFloat(f.style.height),S=Math.max(w,b);if(S<y){const M=S+v,N=Math.min(y,M),k=M-N;f.style.height=N+"px",f.style.bottom==="0px"&&(u.scrollTop=k>0?k:0,f.style.justifyContent="flex-end")}}}l.current=u.scrollTop})})})]})});FQe.displayName=p0e;var BQe="SelectGroup",[ovn,svn]=uM(BQe),lvn=Qe.forwardRef((n,e)=>{const{__scopeSelect:t,...r}=n,i=O3();return Fe.jsx(ovn,{scope:t,id:i,children:Fe.jsx(kh.div,{role:"group","aria-labelledby":i,...r,ref:e})})});lvn.displayName=BQe;var jQe="SelectLabel",HQe=Qe.forwardRef((n,e)=>{const{__scopeSelect:t,...r}=n,i=svn(jQe,t);return Fe.jsx(kh.div,{id:i.id,...r,ref:e})});HQe.displayName=jQe;var oH="SelectItem",[cvn,VQe]=uM(oH),$Qe=Qe.forwardRef((n,e)=>{const{__scopeSelect:t,value:r,disabled:i=!1,textValue:a,...o}=n,s=k6(oH,t),l=I6(oH,t),c=s.value===r,[u,f]=Qe.useState(a??""),[d,v]=Qe.useState(!1),y=ly(e,M=>{var N;return(N=l.itemRefCallback)==null?void 0:N.call(l,M,r,i)}),w=O3(),b=Qe.useRef("touch"),S=()=>{i||(s.onValueChange(r),s.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return Fe.jsx(cvn,{scope:t,value:r,disabled:i,textId:w,isSelected:c,onItemTextChange:Qe.useCallback(M=>{f(N=>N||((M==null?void 0:M.textContent)??"").trim())},[]),children:Fe.jsx(rH.ItemSlot,{scope:t,value:r,disabled:i,textValue:u,children:Fe.jsx(kh.div,{role:"option","aria-labelledby":w,"data-highlighted":d?"":void 0,"aria-selected":c&&d,"data-state":c?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...o,ref:y,onFocus:zu(o.onFocus,()=>v(!0)),onBlur:zu(o.onBlur,()=>v(!1)),onClick:zu(o.onClick,()=>{b.current!=="mouse"&&S()}),onPointerUp:zu(o.onPointerUp,()=>{b.current==="mouse"&&S()}),onPointerDown:zu(o.onPointerDown,M=>{b.current=M.pointerType}),onPointerMove:zu(o.onPointerMove,M=>{var N;b.current=M.pointerType,i?(N=l.onItemLeave)==null||N.call(l):b.current==="mouse"&&M.currentTarget.focus({preventScroll:!0})}),onPointerLeave:zu(o.onPointerLeave,M=>{var N;M.currentTarget===document.activeElement&&((N=l.onItemLeave)==null||N.call(l))}),onKeyDown:zu(o.onKeyDown,M=>{var k;((k=l.searchRef)==null?void 0:k.current)!==""&&M.key===" "||(X1n.includes(M.key)&&S(),M.key===" "&&M.preventDefault())})})})})});$Qe.displayName=oH;var KP="SelectItemText",GQe=Qe.forwardRef((n,e)=>{const{__scopeSelect:t,className:r,style:i,...a}=n,o=k6(KP,t),s=I6(KP,t),l=VQe(KP,t),c=K1n(KP,t),[u,f]=Qe.useState(null),d=ly(e,S=>f(S),l.onItemTextChange,S=>{var M;return(M=s.itemTextRefCallback)==null?void 0:M.call(s,S,l.value,l.disabled)}),v=u==null?void 0:u.textContent,y=Qe.useMemo(()=>Fe.jsx("option",{value:l.value,disabled:l.disabled,children:v},l.value),[l.disabled,l.value,v]),{onNativeOptionAdd:w,onNativeOptionRemove:b}=c;return hb(()=>(w(y),()=>b(y)),[w,b,y]),Fe.jsxs(Fe.Fragment,{children:[Fe.jsx(kh.span,{id:l.textId,...a,ref:d}),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?xC.createPortal(a.children,o.valueNode):null]})});GQe.displayName=KP;var qQe="SelectItemIndicator",YQe=Qe.forwardRef((n,e)=>{const{__scopeSelect:t,...r}=n;return VQe(qQe,t).isSelected?Fe.jsx(kh.span,{"aria-hidden":!0,...r,ref:e}):null});YQe.displayName=qQe;var h0e="SelectScrollUpButton",XQe=Qe.forwardRef((n,e)=>{const t=I6(h0e,n.__scopeSelect),r=d0e(h0e,n.__scopeSelect),[i,a]=Qe.useState(!1),o=ly(e,r.onScrollButtonChange);return hb(()=>{if(t.viewport&&t.isPositioned){let s=function(){const c=l.scrollTop>0;a(c)};const l=t.viewport;return s(),l.addEventListener("scroll",s),()=>l.removeEventListener("scroll",s)}},[t.viewport,t.isPositioned]),i?Fe.jsx(ZQe,{...n,ref:o,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=t;s&&l&&(s.scrollTop=s.scrollTop-l.offsetHeight)}}):null});XQe.displayName=h0e;var m0e="SelectScrollDownButton",WQe=Qe.forwardRef((n,e)=>{const t=I6(m0e,n.__scopeSelect),r=d0e(m0e,n.__scopeSelect),[i,a]=Qe.useState(!1),o=ly(e,r.onScrollButtonChange);return hb(()=>{if(t.viewport&&t.isPositioned){let s=function(){const c=l.scrollHeight-l.clientHeight,u=Math.ceil(l.scrollTop)<c;a(u)};const l=t.viewport;return s(),l.addEventListener("scroll",s),()=>l.removeEventListener("scroll",s)}},[t.viewport,t.isPositioned]),i?Fe.jsx(ZQe,{...n,ref:o,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=t;s&&l&&(s.scrollTop=s.scrollTop+l.offsetHeight)}}):null});WQe.displayName=m0e;var ZQe=Qe.forwardRef((n,e)=>{const{__scopeSelect:t,onAutoScroll:r,...i}=n,a=I6("SelectScrollButton",t),o=Qe.useRef(null),s=iH(t),l=Qe.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return Qe.useEffect(()=>()=>l(),[l]),hb(()=>{var u;const c=s().find(f=>f.ref.current===document.activeElement);(u=c==null?void 0:c.ref.current)==null||u.scrollIntoView({block:"nearest"})},[s]),Fe.jsx(kh.div,{"aria-hidden":!0,...i,ref:e,style:{flexShrink:0,...i.style},onPointerDown:zu(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:zu(i.onPointerMove,()=>{var c;(c=a.onItemLeave)==null||c.call(a),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:zu(i.onPointerLeave,()=>{l()})})}),uvn="SelectSeparator",QQe=Qe.forwardRef((n,e)=>{const{__scopeSelect:t,...r}=n;return Fe.jsx(kh.div,{"aria-hidden":!0,...r,ref:e})});QQe.displayName=uvn;var v0e="SelectArrow",fvn=Qe.forwardRef((n,e)=>{const{__scopeSelect:t,...r}=n,i=aH(t),a=k6(v0e,t),o=I6(v0e,t);return a.open&&o.position==="popper"?Fe.jsx(UGe,{...i,...r,ref:e}):null});fvn.displayName=v0e;function KQe(n){return n===""||n===void 0}var JQe=Qe.forwardRef((n,e)=>{const{value:t,...r}=n,i=Qe.useRef(null),a=ly(e,i),o=MQe(t);return Qe.useEffect(()=>{const s=i.current,l=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==t&&u){const f=new Event("change",{bubbles:!0});u.call(s,t),s.dispatchEvent(f)}},[o,t]),Fe.jsx(CQe,{asChild:!0,children:Fe.jsx("select",{...r,ref:a,defaultValue:t})})});JQe.displayName="BubbleSelect";function eKe(n){const e=u3(n),t=Qe.useRef(""),r=Qe.useRef(0),i=Qe.useCallback(o=>{const s=t.current+o;e(s),function l(c){t.current=c,window.clearTimeout(r.current),c!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(s)},[e]),a=Qe.useCallback(()=>{t.current="",window.clearTimeout(r.current)},[]);return Qe.useEffect(()=>()=>window.clearTimeout(r.current),[]),[t,i,a]}function tKe(n,e,t){const i=e.length>1&&Array.from(e).every(c=>c===e[0])?e[0]:e,a=t?n.indexOf(t):-1;let o=dvn(n,Math.max(a,0));i.length===1&&(o=o.filter(c=>c!==t));const l=o.find(c=>c.textValue.toLowerCase().startsWith(i.toLowerCase()));return l!==t?l:void 0}function dvn(n,e){return n.map((t,r)=>n[(e+r)%n.length])}var pvn=RQe,nKe=PQe,hvn=DQe,mvn=LQe,vvn=OQe,rKe=zQe,yvn=FQe,iKe=HQe,aKe=$Qe,gvn=GQe,_vn=YQe,oKe=XQe,sKe=WQe,lKe=QQe;const xvn=pvn,bvn=hvn,cKe=Qe.forwardRef(({className:n,children:e,...t},r)=>Fe.jsxs(nKe,{ref:r,className:O0("rf-flex rf-h-10 rf-w-full rf-items-center rf-justify-between rf-rounded-md rf-border rf-border-input rf-bg-background rf-px-3 rf-py-2 rf-text-sm rf-ring-offset-background rf-placeholder:text-muted-foreground focus:rf-outline-none focus:rf-ring-2 focus:rf-ring-ring focus:rf-ring-offset-2 disabled:rf-cursor-not-allowed disabled:rf-opacity-50 [&>span]:rf-line-clamp-1",n),...t,children:[e,Fe.jsx(mvn,{asChild:!0,children:Fe.jsx(D$e,{className:"rf-h-4 rf-w-4 rf-opacity-50"})})]}));cKe.displayName=nKe.displayName;const uKe=Qe.forwardRef(({className:n,...e},t)=>Fe.jsx(oKe,{ref:t,className:O0("rf-flex rf-cursor-default rf-items-center rf-justify-center rf-py-1",n),...e,children:Fe.jsx(ran,{className:"rf-h-4 rf-w-4"})}));uKe.displayName=oKe.displayName;const fKe=Qe.forwardRef(({className:n,...e},t)=>Fe.jsx(sKe,{ref:t,className:O0("rf-flex rf-cursor-default rf-items-center rf-justify-center rf-py-1",n),...e,children:Fe.jsx(D$e,{className:"rf-h-4 rf-w-4"})}));fKe.displayName=sKe.displayName;const dKe=Qe.forwardRef(({className:n,children:e,position:t="popper",...r},i)=>Fe.jsx(vvn,{children:Fe.jsxs(rKe,{ref:i,className:O0("rf-relative rf-z-[100] rf-max-h-96 rf-min-w-[8rem] rf-overflow-hidden rf-rounded-md rf-border rf-bg-white rf-text-black rf-shadow-md data-[state=open]:rf-animate-in data-[state=closed]:rf-animate-out data-[state=closed]:rf-fade-out-0 data-[state=open]:rf-fade-in-0 data-[state=closed]:rf-zoom-out-95 data-[state=open]:rf-zoom-in-95 data-[side=bottom]:rf-slide-in-from-top-2 data-[side=left]:rf-slide-in-from-right-2 data-[side=right]:rf-slide-in-from-left-2 data-[side=top]:rf-slide-in-from-bottom-2",t==="popper"&&"data-[side=bottom]:rf-translate-y-1 data-[side=left]:-rf-translate-x-1 data-[side=right]:rf-translate-x-1 data-[side=top]:-rf-translate-y-1",n),position:t,...r,children:[Fe.jsx(uKe,{}),Fe.jsx(yvn,{className:O0("rf-p-1",t==="popper"&&"rf-h-[var(--radix-select-trigger-height)] rf-w-full rf-min-w-[var(--radix-select-trigger-width)]"),children:e}),Fe.jsx(fKe,{})]})}));dKe.displayName=rKe.displayName;const Svn=Qe.forwardRef(({className:n,...e},t)=>Fe.jsx(iKe,{ref:t,className:O0("rf-py-1.5 rf-pl-8 rf-pr-2 rf-text-sm rf-font-semibold",n),...e}));Svn.displayName=iKe.displayName;const pKe=Qe.forwardRef(({className:n,children:e,...t},r)=>Fe.jsxs(aKe,{ref:r,className:O0("rf-relative rf-flex rf-w-full rf-cursor-default rf-select-none rf-items-center rf-rounded-sm rf-py-1.5 rf-pl-8 rf-pr-2 rf-text-sm rf-text-gray-800 rf-outline-none focus:rf-bg-gray-100 focus:rf-text-gray-900 data-[disabled]:rf-pointer-events-none data-[disabled]:rf-opacity-50",n),...t,children:[Fe.jsx("span",{className:"rf-absolute rf-left-2 rf-flex rf-h-3.5 rf-w-3.5 rf-items-center rf-justify-center",children:Fe.jsx(_vn,{children:Fe.jsx(MP,{className:"rf-h-4 rf-w-4"})})}),Fe.jsx(gvn,{children:e})]}));pKe.displayName=aKe.displayName;const wvn=Qe.forwardRef(({className:n,...e},t)=>Fe.jsx(lKe,{ref:t,className:O0("-rf-mx-1 rf-my-1 rf-h-px rf-bg-muted",n),...e}));wvn.displayName=lKe.displayName;function hKe({className:n,...e}){return Fe.jsx("div",{className:O0("rf-animate-pulse rf-rounded-md rf-bg-muted",n),...e})}function JP(){const n=(typeof window<"u"?window.TSCIRCUIT_REGISTRY_API_BASE_URL:null)??"https://registry-api.tscircuit.com";return u0e.create({prefixUrl:n,timeout:3e4})}const y0e={get:(n,e)=>JP().get(n,e),post:(n,e)=>JP().post(n,e),put:(n,e)=>JP().put(n,e),delete:(n,e)=>JP().delete(n,e),patch:(n,e)=>JP().patch(n,e)},Evn=({onCancel:n,onContinue:e})=>{const t=[{id:"prototype",name:"Prototype"},{id:"development",name:"Development board"}],[r,i]=Qe.useState(!1),[a,o]=Qe.useState(null),[s,l]=Qe.useState("prototype");Qe.useEffect(()=>{v()},[]);const c=y=>{l(y),o(null),setTimeout(()=>{v()},0)},u=async()=>{const{order_quote_id:y}=await y0e.post("order_quotes/create",{json:{package_release_id:"",vendor_name:""}}).json();return y},f=async y=>{const{order_quote:w}=await y0e.post("order_quotes/get",{json:{order_quote_id:y}}).json();return w},d=async(y,w=30)=>{let b=0;for(;b<w;)try{const S=await f(y);if(S.is_complete)return o(S.total_cost),i(!1),S;if(S.has_error)throw new Error(S.error);b++,await new Promise(M=>setTimeout(M,2e3))}catch(S){console.error("Error polling order quote:",S),i(!1)}throw i(!1),new Error("Polling timed out after maximum attempts")},v=async()=>{if(!s)return;const y=await u();if(!y){console.error("Error creating order quote"),o(null);return}i(!0),o(null);try{const w=await d(y);o(w.total_cost)}catch(w){console.error("Error getting estimate:",w),o(null)}};return Fe.jsxs("div",{className:"rf-flex rf-flex-col rf-bg-white rf-rounded-xl rf-p-8 rf-max-w-md rf-w-full rf-mx-auto",children:[Fe.jsx("h2",{className:"rf-text-3xl rf-font-bold rf-text-center rf-mb-8",children:"Order PCB"}),Fe.jsxs("div",{className:"rf-mb-8",children:[Fe.jsx("label",{htmlFor:"category",className:"rf-block rf-text-sm rf-font-medium rf-text-gray-700 rf-mb-2",children:"Select Product Category"}),Fe.jsxs(xvn,{onValueChange:c,value:s||void 0,children:[Fe.jsx(cKe,{className:"rf-w-full",children:Fe.jsx(bvn,{placeholder:"Select a category"})}),Fe.jsx(dKe,{children:t.map(y=>Fe.jsx(pKe,{value:y.id,children:y.name},y.id))})]})]}),r?Fe.jsxs("div",{className:"rf-flex rf-flex-col rf-items-center rf-mb-8",children:[Fe.jsxs("div",{className:"rf-animate-pulse rf-flex rf-space-x-2 rf-items-center rf-mb-3",children:[Fe.jsx(N$e,{className:"rf-h-5 rf-w-5 rf-text-gray-400"}),Fe.jsx("span",{className:"rf-text-gray-500",children:"Fetching estimate..."})]}),Fe.jsx(hKe,{className:"rf-h-6 rf-w-3/4 rf-mb-2"}),Fe.jsx(hKe,{className:"rf-h-6 rf-w-1/2"})]}):a!==null?Fe.jsxs("div",{className:"rf-bg-gray-50 rf-p-4 rf-rounded-lg rf-mb-8",children:[Fe.jsx("p",{className:"rf-text-sm rf-text-gray-600 rf-mb-2",children:"Estimated Cost:"}),Fe.jsxs("p",{className:"rf-text-2xl rf-font-bold rf-text-gray-900",children:["$",a.toFixed(2)]}),Fe.jsx("p",{className:"rf-text-xs rf-text-gray-500 rf-mt-1",children:"Pricing may vary based on specifications"})]}):null,Fe.jsxs("div",{className:"rf-flex rf-justify-between rf-mt-auto",children:[Fe.jsx(p2,{variant:"outline",onClick:n,className:"rf-px-8 rf-border-red-500 rf-text-red-500 hover:rf-bg-red-50 hover:rf-text-red-600",children:"Cancel"}),Fe.jsx(p2,{onClick:a!==null?e:v,className:a!==null?"rf-px-8 rf-bg-gray-700 hover:rf-bg-gray-800":"rf-px-8 rf-bg-blue-600 hover:rf-bg-blue-700",children:a!==null?"Continue":"Get Estimate"})]})]})};var g0e="Progress",_0e=100,[Tvn,m4n]=l4(g0e),[Mvn,Cvn]=Tvn(g0e),mKe=Qe.forwardRef((n,e)=>{const{__scopeProgress:t,value:r=null,max:i,getValueLabel:a=Rvn,...o}=n;(i||i===0)&&!_Ke(i)&&console.error(Avn(`${i}`,"Progress"));const s=_Ke(i)?i:_0e;r!==null&&!xKe(r,s)&&console.error(Pvn(`${r}`,"Progress"));const l=xKe(r,s)?r:null,c=sH(l)?a(l,s):void 0;return Fe.jsx(Mvn,{scope:t,value:l,max:s,children:Fe.jsx(kh.div,{"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":sH(l)?l:void 0,"aria-valuetext":c,role:"progressbar","data-state":gKe(l,s),"data-value":l??void 0,"data-max":s,...o,ref:e})})});mKe.displayName=g0e;var vKe="ProgressIndicator",yKe=Qe.forwardRef((n,e)=>{const{__scopeProgress:t,...r}=n,i=Cvn(vKe,t);return Fe.jsx(kh.div,{"data-state":gKe(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...r,ref:e})});yKe.displayName=vKe;function Rvn(n,e){return`${Math.round(n/e*100)}%`}function gKe(n,e){return n==null?"indeterminate":n===e?"complete":"loading"}function sH(n){return typeof n=="number"}function _Ke(n){return sH(n)&&!isNaN(n)&&n>0}function xKe(n,e){return sH(n)&&!isNaN(n)&&n<=e&&n>=0}function Avn(n,e){return`Invalid prop \`max\` of value \`${n}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${_0e}\`.`}function Pvn(n,e){return`Invalid prop \`value\` of value \`${n}\` supplied to \`${e}\`. The \`value\` prop must be:
13599
13599
  - a positive number
13600
13600
  - less than the value passed to \`max\` (or ${_0e} if no \`max\` prop is set)
13601
13601
  - \`null\` or \`undefined\` if the progress is indeterminate.
@@ -13700,4 +13700,4 @@ export const ${e} = (props: ChipProps<typeof pinLabels>) => {
13700
13700
  />
13701
13701
  )
13702
13702
  }
13703
- `.trim()};function qgn(n,e,t,r,i,a,o){const s={x:n,y:e},l={x:t,y:r},c=(n+t)/2,u=(e+r)/2,f=t-n,d=r-e,v=Math.sqrt(f*f+d*d);if(v===0||i<v/2)return[s,l];const y=Math.sqrt(i*i-v*v/4),w=Math.atan2(d,f),b=c+y*Math.sin(w)*(o?-1:1),S=u-y*Math.cos(w)*(o?-1:1),M=Math.atan2(e-S,n-b);let N=Math.atan2(r-S,t-b);o&&N>M?N-=2*Math.PI:!o&&N<M&&(N+=2*Math.PI),(!a&&Math.abs(N-M)>Math.PI||a&&Math.abs(N-M)<Math.PI)&&(N>M?N-=2*Math.PI:N+=2*Math.PI);const k=Math.max(2,Math.ceil(Math.abs(N-M)*i)),G=[];for(let q=0;q<=k;q++){const X=q/k,Y=M+X*(N-M),ee=b+i*Math.cos(Y),W=S+i*Math.sin(Y);G.push({x:ee,y:W})}return G}var Ygn=n=>{const e=n.packageDetail.dataStr.shape.filter(l=>l.type==="PAD"),t=Math.min(...e.map(l=>y5(l.center.x))),r=Math.max(...e.map(l=>y5(l.center.x))),i=Math.min(...e.map(l=>y5(l.center.y))),a=Math.max(...e.map(l=>y5(l.center.y))),o=(t+r)/2,s=(i+a)/2;return{x:o,y:s}},Xgn=n=>{const e=n.map(l=>[...new Set(l)]),t=e.map(()=>[]),r=e.map(()=>null);for(let l=0;l<e.length;l++)for(const c of e[l])if(/^\d+$/.test(c)){r[l]=Number.parseInt(c);break}let i=0;const a=new Set;for(let l=0;l<r.length;l++){const c=r[l];if(c===null||c<1)continue;if(!a.has(c)){a.add(c),t[l].push(`pin${c}`),i=Math.max(i,c);continue}let u=0;for(const f of t[l])f.startsWith(`pin${c}_alt`)&&u++;t[l].push(`pin${c}_alt${u+1}`)}for(let l=0;l<t.length;l++){const c=t[l][0];c!=null&&c.includes("_alt")&&(i++,t[l].unshift(`pin${i}`))}for(let l=0;l<t.length;l++)t[l].length===0&&(i++,t[l].push(`pin${i}`));const o={};for(const l of e)for(const c of l)/^\d+$/.test(c)||(o[c]=(o[c]??0)+1);const s={};for(let l=0;l<e.length;l++){const c=e[l];for(const u of c)/^\d+$/.test(u)||(o[u]===1?t[l].push(u):(s[u]=(s[u]??0)+1,t[l].push(`${u}${s[u]}`)))}return t},By=n=>typeof n=="number"?y5(`${n}mil`):n.match(/^\d+$/)?y5(`${n}mil`):y5(n),Lw=n=>typeof n=="number"||n.match(/^\d+$/)?By(n)*10:By(n),Wgn=(n,e)=>_H.parse({type:"pcb_silkscreen_path",pcb_silkscreen_path_id:`pcb_silkscreen_path_${e+1}`,pcb_component_id:"pcb_component_1",layer:"top",route:n.points.map(t=>({x:Lw(t.x),y:Lw(t.y)})),stroke_width:A0e(n.width)}),Zgn=(n,e)=>{const t=qgn(n.start.x,n.start.y,n.end.x,n.end.y,n.radiusX,n.largeArc,n.sweepDirection==="CW");return _H.parse({type:"pcb_silkscreen_path",pcb_silkscreen_path_id:`pcb_silkscreen_arc_${e+1}`,pcb_component_id:"pcb_component_1",layer:"top",route:t.map(r=>({x:Lw(r.x),y:Lw(r.y)})),stroke_width:A0e(n.width)})},Qgn=(n,e)=>J0e.parse({type:"pcb_hole",x:Lw(n.center.x),y:Lw(n.center.y),hole_diameter:Lw(n.radius)*2,hole_shape:"circle",pcb_hole_id:`pcb_hole_${e+1}`}),Kgn=(n,{useModelCdn:e,shouldRecenter:t=!0}={})=>{var v,y,w;const r=[];Ygn(n);const i=Z0e.parse({type:"source_component",source_component_id:"source_component_1",name:"U1",ftype:"simple_bug"}),a=K0e.parse({type:"pcb_component",pcb_component_id:"pcb_component_1",source_component_id:"source_component_1",name:"U1",ftype:"simple_bug",width:0,height:0,rotation:0,center:{x:0,y:0},layer:"top"});r.push(i,a);const o=n.packageDetail.dataStr.shape.filter(b=>b.type==="PAD"),s=n.dataStr.shape.filter(b=>b.type==="PIN"),l=o.map(b=>{const S=[];b.number&&S.push(b.number.toString());const M=s.find(N=>N.pinNumber===b.number);return M&&S.push(M.label),S}),c=Xgn(l);o.forEach((b,S)=>{const M=c[S],N=Number.parseInt(M.find(k=>k.match(/pin\d+/)).replace("pin",""));if(r.push({type:"source_port",source_port_id:`source_port_${S+1}`,source_component_id:"source_component_1",name:`pin${N}`,pin_number:N,port_hints:M.filter(k=>k!==`pin${N}`)}),b.holeRadius!==void 0&&By(b.holeRadius)!==0){const k={type:"pcb_plated_hole",pcb_plated_hole_id:`pcb_plated_hole_${S+1}`,x:By(b.center.x),y:By(b.center.y),layers:["top"],port_hints:[`pin${N}`],pcb_component_id:"pcb_component_1",pcb_port_id:`pcb_port_${S+1}`};let G;if(b.shape==="OVAL"){const q=By(b.width)>By(b.height)?"width":"height",X=Math.min(By(b.width),By(b.height)),Y=Math.max(By(b.width),By(b.height)),ee=X/2-By(b.holeRadius),W=Y-ee*2,ue=By(b.holeRadius)*2,pe=q==="width"?W:ue,de=q==="height"?W:ue;G={shape:"pill",outer_width:By(b.width),outer_height:By(b.height),hole_width:pe,hole_height:de}}else G={shape:"circle",hole_diameter:By(b.holeRadius)*2,outer_diameter:By(b.width),radius:By(b.holeRadius)};r.push(epe.parse({...k,...G}))}else{let k;if((b.shape==="RECT"||b.shape==="ELLIPSE"||b.shape==="OVAL")&&(k="rect"),!k)throw new Error(`unknown pad.shape: "${b.shape}"`);const G={width:By(b.width),height:By(b.height)};(b.rotation===90||b.rotation===270)&&(G.width=By(b.height),G.height=By(b.width));const q=tpe.parse({type:"pcb_smtpad",pcb_smtpad_id:`pcb_smtpad_${S+1}`,shape:k,x:By(b.center.x),y:By(b.center.y),...k==="rect"?G:{radius:Math.min(By(b.width),By(b.height))/2},layer:"top",port_hints:[`pin${N}`],pcb_component_id:"pcb_component_1",pcb_port_id:`pcb_port_${S+1}`});r.push(q)}}),n.packageDetail.dataStr.shape.filter(b=>b.type==="HOLE").forEach((b,S)=>{r.push(Qgn(b,S))}),n.packageDetail.dataStr.shape.forEach((b,S)=>{b.type==="TRACK"?r.push(Wgn(b,S)):b.type==="ARC"?r.push(Zgn(b,S)):b.type==="TEXT"&&r.push(npe.parse({type:"pcb_silkscreen_text",pcb_silkscreen_text_id:`pcb_silkscreen_text_${S+1}`,pcb_component_id:"pcb_component_1",text:b.text,anchor_position:{x:By(b.x),y:By(b.y)},anchor_alignment:{L:"bottom_left",C:"center",R:"bottom_right"}[b.textAnchor??"L"],font_size:b.size_mm?b.size_mm:void 0,layer:"top"}))});const u=n.packageDetail.dataStr.shape.find(b=>{var S;return!!(b.type==="SVGNODE"&&((S=b.svgData.attrs)!=null&&S.uuid))}),f=(y=(v=u==null?void 0:u.svgData)==null?void 0:v.attrs)==null?void 0:y.uuid,d=f?e?`https://modelcdn.tscircuit.com/easyeda_models/download?uuid=${f}&pn=${n.lcsc.number}`:`https://modules.easyeda.com/3dmodel/${f}`:void 0;if(d!==void 0){const[b,S,M]=(((w=u==null?void 0:u.svgData.attrs)==null?void 0:w.c_rotation)??"0,0,0").split(",").map(Number);r.push(rpe.parse({type:"cad_component",cad_component_id:"cad_component_1",source_component_id:"source_component_1",pcb_component_id:"pcb_component_1",position:{x:0,y:0,z:0},rotation:{x:b,y:S,z:M},model_obj_url:d}))}if(t){const b=Vgn(r.filter(S=>S.type!=="pcb_component"));Fgn(r,gu(yd(-b.center.x,b.center.y),rx(1,-1))),a.center={x:0,y:0}}return r};function Jgn(n){let e=n.replace(/[-]/g,"_").replace(/[^a-zA-Z0-9_$]/g,"_");return/^\d/.test(e)&&(e="A_"+e),e}var e_n=async n=>{const e=ggn.parse(n);return await t_n({betterEasy:e})},t_n=async({betterEasy:n})=>{const e=Kgn(n,{useModelCdn:!0,shouldRecenter:!0}),t=n.dataStr.head.c_para["Manufacturer Part"],r=Jgn(t),i=Dw(e).source_port.list(),a={},o=i.sort((u,f)=>{const d=parseInt(u.name.replace("pin","")),v=parseInt(f.name.replace("pin",""));return d-v});for(const u of o)a[u.name]=[u.name,...u.port_hints??[]];const[s]=Dw(e).cad_component.list();let l;s!=null&&s.model_obj_url&&await n_n(s.model_obj_url)&&(l=s.model_obj_url);const c={jlcpcb:[n.lcsc.number]};return Ggn({componentName:r,manufacturerPartNumber:r,pinLabels:a,objUrl:l,circuitJson:e,supplierPartNumbers:c})},n_n=async n=>{try{return(await fetch(n,{method:"HEAD"})).status===200}catch(e){return console.error(`Error checking model object URL ${n}:`,e),!1}};async function r_n(n,{fetch:e=globalThis.fetch}={}){const t="https://easyeda.com/api/components/search",r=d=>`https://easyeda.com/api/components/${d}?version=6.4.7&uuid=${d}&datastrid=`,i={authority:"easyeda.com",pragma:"no-cache","cache-control":"no-cache",accept:"application/json, text/javascript, */*; q=0.01","x-requested-with":"XMLHttpRequest","user-agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36","content-type":"application/x-www-form-urlencoded; charset=UTF-8",origin:"https://easyeda.com","sec-fetch-site":"same-origin","sec-fetch-mode":"cors","sec-fetch-dest":"empty",referer:"https://easyeda.com/editor","accept-language":"cs,en;q=0.9,sk;q=0.8,en-GB;q=0.7",cookie:"<PUT your cookies here>"},a=`type=3&doctype%5B%5D=2&uid=0819f05c4eef4c71ace90d822a990e87&returnListStyle=classifyarr&wd=${n}&version=6.4.7`,o=await e(t,{method:"POST",headers:i,body:a});if(!o.ok)throw new Error("Failed to search for the component");const s=await o.json();if(!s.success||!s.result.lists.lcsc.length)throw new Error("Component not found");const c=(s.result.lists.lcsc.find(d=>d.dataStr.head.c_para["Supplier Part"]===n)??s.result.lists.lcsc[0]).uuid,u=await e(r(c),{method:"GET",headers:{...i,referer:`https://easyeda.com/editor?uuid=${c}`}});if(!u.ok)throw new Error("Failed to fetch the component details");return(await u.json()).result}const i_n=async n=>{var a;const e=await r_n(n,{fetch:(o,s)=>{var l,c,u,f,d;return fetch(`${VS}/proxy`,{...s,headers:{...s==null?void 0:s.headers,"X-Target-Url":o.toString(),"X-Sender-Origin":((l=s==null?void 0:s.headers)==null?void 0:l.origin)??"","X-Sender-Host":((c=s==null?void 0:s.headers)==null?void 0:c.host)??"https://easyeda.com","X-Sender-Referer":((u=s==null?void 0:s.headers)==null?void 0:u.referer)??"","X-Sender-User-Agent":((f=s==null?void 0:s.headers)==null?void 0:f.userAgent)??"","X-Sender-Cookie":((d=s==null?void 0:s.headers)==null?void 0:d.cookie)??""}})}}),t=await e_n(e),r=(a=t.match(/export const (\w+) = .*/))==null?void 0:a[1];if(!r)throw console.error("COULD NOT DETERMINE FILE NAME OF CONVERTED COMPONENT:",t),new Error("Could not determine file name of converted component");const i=`imports/${r}.tsx`;return await u0e.post(`${VS}/files/upsert`,{json:{file_path:i,text_content:t}}),{filePath:i}},a_n=n=>{const e=OKe(_e=>_e.lastRunEvalVersion),[t,r]=Qe.useState(null),[i,a]=Qe.useState(!1),[o,s]=Qe.useState(!0),[l,c]=Qe.useState(!1),[u,f]=Qe.useState(null),[d,v]=Qe.useState(null),[y,w]=Qe.useState(!1),[b,S]=Qe.useState(null),[M,N]=Qe.useState(null),[k,G]=Qe.useState(!1),[q,X]=Qe.useState(!1),Y=kvn(),ee=s4(_e=>_e.pushEvent),W=s4(_e=>_e.recentEvents),ue=Qe.useMemo(()=>Date.now(),[]);tyn(_e=>{if(!(new Date(_e.created_at).valueOf()<ue+500)){if(_e.event_type==="FILE_UPDATED"){a(!0);return}if(_e.event_type==="SNIPPET_SAVED"){a(!1),s(!1),S("Snippet saved successfully."),G(!1);return}_e.event_type==="REQUEST_EXPORT"&&(X(!0),S("Export processing..."),G(!1)),_e.event_type==="EXPORT_CREATED"&&(S(`Export created: ${_e.exportFilePath}`),G(!1),X(!1))}}),Qe.useEffect(()=>{if(!l||u===null)return;const _e=W.filter(Oe=>new Date(Oe.created_at).valueOf()>u),Te=_e.find(Oe=>Oe.event_type==="FAILED_TO_SAVE_SNIPPET"),be=_e.find(Oe=>Oe.event_type==="SNIPPET_SAVED");Te&&(c(!1),f(null),N(Te.message??"Failed to save snippet. See console for error."),console.error(Te.message),G(!0),Te.error_code==="SNIPPET_UNSET"&&Te.available_snippet_names&&(v(Te.available_snippet_names),w(!0))),be&&(c(!1),f(null),S("Snippet saved successfully."),G(!1))},[W,l]);const pe=async()=>{c(!0),f(Date.now()),S(null),G(!1),await ee({event_type:"REQUEST_TO_SAVE_SNIPPET",snippet_name:t})},de=s4(_e=>_e.circuitJson),[we,he]=Qe.useState(!1);return Fe.jsxs(Fe.Fragment,{children:[Fe.jsxs(Mfe,{children:[Fe.jsx(Cfe,{asChild:!0,children:Fe.jsx("div",{className:"rf-whitespace-nowrap rf-text-xs font-medium rf-p-2 rf-mx-1 rf-cursor-pointer rf-relative",children:"File"})}),Fe.jsxs(AB,{children:[Fe.jsx(C4,{className:"rf-text-xs",onSelect:pe,disabled:l,children:l?"Saving...":"Push"}),parseInt(window.location.port)>5e3&&Fe.jsx(C4,{className:"rf-text-xs",onSelect:()=>{Y.open()},children:"Order"}),Fe.jsx(C4,{className:"rf-text-xs",onSelect:()=>he(!0),disabled:l,children:"Import"}),Fe.jsxs(Xqe,{children:[Fe.jsx(Rfe,{className:"rf-text-xs",disabled:q,children:q?"Exporting...":"Export"}),Fe.jsx(Yqe,{children:Fe.jsx(Afe,{children:V9n.map((_e,Te)=>Fe.jsx(C4,{onSelect:()=>{if(!de){t5.error("No Circuit JSON to export");return}$9n({exportName:_e.name,circuitJson:de,projectName:t??"Untitled"})},disabled:q,children:Fe.jsx("span",{className:"rf-text-xs",children:_e.name})},Te))})})]}),Fe.jsxs(Xqe,{children:[Fe.jsx(Rfe,{className:"rf-text-xs",children:"Advanced"}),Fe.jsx(Yqe,{children:Fe.jsxs(Afe,{children:[Fe.jsx(C4,{className:"rf-flex rf-items-center rf-gap-2",children:Fe.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[Fe.jsx(BKe,{id:"load-latest-eval",checked:n.shouldLoadLatestEval,onCheckedChange:_e=>{n.onChangeShouldLoadLatestEval(_e===!0)}}),Fe.jsx("label",{htmlFor:"load-latest-eval",className:"rf-text-xs rf-cursor-pointer",children:"Force Latest @tscircuit/eval"})]})}),e&&Fe.jsx(C4,{className:"rf-flex rf-items-center rf-gap-2",children:Fe.jsx("div",{className:"rf-flex rf-items-center rf-gap-2",children:Fe.jsxs("span",{className:"rf-text-xs",children:["@tscircuit/eval@",e]})})}),Fe.jsx(C4,{className:"rf-flex rf-items-center rf-gap-2",onClick:()=>{window.open("/api/admin","_blank")},children:Fe.jsx("div",{className:"rf-flex rf-items-center rf-gap-2",children:Fe.jsx("span",{className:"rf-text-xs",children:"CLI Admin Panel"})})})]})})]})]}),Fe.jsx(Uj,{open:k,onOpenChange:G,children:Fe.jsxs($P,{children:[Fe.jsxs(kj,{children:[Fe.jsx(Ij,{children:"Error Saving Snippet"}),Fe.jsx(Fj,{children:M})]}),Fe.jsx(Qde,{children:Fe.jsx(Kde,{onClick:()=>G(!1),children:"Dismiss"})})]})}),Fe.jsx(eyn,{snippetNames:d??[],onSelect:async _e=>{c(!0),f(Date.now()),r(_e),await ee({event_type:"REQUEST_TO_SAVE_SNIPPET",snippet_name:_e}),w(!1)},onCancel:()=>w(!1),isOpen:y})]}),Fe.jsx(fyn,{isOpen:we,onClose:()=>he(!1),onImport:async _e=>{t5.promise(async()=>{if(_e.source==="tscircuit.com")throw await ee({event_type:"INSTALL_PACKAGE",full_package_name:`@tsci/${_e.owner}.${_e.name}`}),new Error("Not implemented");if(_e.source==="jlcpcb"){const{filePath:Te}=await i_n(_e.partNumber);return{filePath:Te}}},{loading:`Importing component: "${_e.name}"`,error:Te=>(console.error("IMPORT ERROR",Te),`Error importing component: "${_e.name}": ${Te.toString()}`),success:Te=>Te!=null&&Te.filePath?`Imported to "${Te.filePath}"`:"Import Successful"})}}),Fe.jsx(A1n,{position:"top-center",reverseOrder:!1}),Fe.jsx(Y.OrderDialog,{isOpen:Y.isOpen,onClose:Y.close,stage:Y.stage,setStage:Y.setStage})]})},o_n=n=>{const[e,t]=Jvn("load-latest-eval",!0);return Fe.jsx(Het,{debug:n.debug,forceLatestEvalVersion:e,defaultToFullScreen:!0,showToggleFullScreen:!1,leftHeaderContent:Fe.jsxs("div",{className:"rf-flex rf-items-center rf-justify-between",children:[Fe.jsx(a_n,{shouldLoadLatestEval:e,onChangeShouldLoadLatestEval:r=>{t(r),globalThis.runFrameWorker=null}}),n.scenarioSelectorContent]})})},s_n=()=>{const n=s4(e=>e.fsMap);Qe.useEffect(()=>{if(!document||!n)return;const e=Array.from(n.keys()),t=l_n(e),r=n.get("package.json");try{if(r){const i=JSON.parse(r);if(i!=null&&i.name){document.title=i.name;return}}}catch{}t&&(document.title=t)},[n])},jet=Dy("run-frame:RunFrameWithApi"),l_n=n=>n.find(e=>e.includes("entrypoint."))??n.find(e=>e.includes("index."))??n.find(e=>e.includes("main."))??n.find(e=>e.endsWith(".tsx")),c_n=n=>n.find(e=>e.includes("manual-edits."))??n.find(e=>e.includes("manual-edit."))??n.find(e=>e.endsWith(".json")),Het=n=>{const{apiBaseUrl:e,leftHeaderContent:t}=n;Qe.useEffect(()=>{n.debug&&Dy.enable("run-frame*")},[n.debug]);const{startPolling:r,stopPolling:i,loadInitialFiles:a}=s4(d=>({startPolling:d.startPolling,stopPolling:d.stopPolling,loadInitialFiles:d.loadInitialFiles})),o=s4(d=>d.fsMap),s=s4(d=>d.circuitJson);Qe.useEffect(()=>{a()},[]),s_n();const{editEventsForRender:l,pushEditEvent:c,markRenderStarted:u,markRenderComplete:f}=fgt();return Qe.useEffect(()=>{e&&(window.API_BASE_URL=e)},[e]),Qe.useEffect(()=>(r(),()=>i()),[r,i]),Fe.jsx(Kvn,{fsMap:o,evalVersion:n.evalVersion,forceLatestEvalVersion:n.forceLatestEvalVersion,leftHeaderContent:t,defaultToFullScreen:n.defaultToFullScreen,showToggleFullScreen:n.showToggleFullScreen,onInitialRender:()=>{jet("onInitialRender / markRenderStarted"),u()},onRenderFinished:()=>{jet("onRenderFinished / markRenderComplete"),f()},editEvents:l,onEditEvent:d=>{c(d),fetch(`${VS}/events/create`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({event_type:"USER_CREATED_MANUAL_EDIT",...d})});const v=c_n(Array.from(o.keys()))??"manual-edits.json",y=o.get(v),w=JSON.parse(y??"{}");X_e({circuitJson:s,editEvents:[d],manualEditsFile:w}),fetch(`${VS}/files/upsert`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file_path:v,text_content:JSON.stringify(w),initiator:"runframe"})})}})},Vet=Nhe.createRoot(document.getElementById("root"));window.TSCIRCUIT_USE_RUNFRAME_FOR_CLI?Vet.render(Fe.jsx(o_n,{})):Vet.render(Fe.jsx(Het,{}))});
13703
+ `.trim()};function qgn(n,e,t,r,i,a,o){const s={x:n,y:e},l={x:t,y:r},c=(n+t)/2,u=(e+r)/2,f=t-n,d=r-e,v=Math.sqrt(f*f+d*d);if(v===0||i<v/2)return[s,l];const y=Math.sqrt(i*i-v*v/4),w=Math.atan2(d,f),b=c+y*Math.sin(w)*(o?-1:1),S=u-y*Math.cos(w)*(o?-1:1),M=Math.atan2(e-S,n-b);let N=Math.atan2(r-S,t-b);o&&N>M?N-=2*Math.PI:!o&&N<M&&(N+=2*Math.PI),(!a&&Math.abs(N-M)>Math.PI||a&&Math.abs(N-M)<Math.PI)&&(N>M?N-=2*Math.PI:N+=2*Math.PI);const k=Math.max(2,Math.ceil(Math.abs(N-M)*i)),G=[];for(let q=0;q<=k;q++){const X=q/k,Y=M+X*(N-M),ee=b+i*Math.cos(Y),W=S+i*Math.sin(Y);G.push({x:ee,y:W})}return G}var Ygn=n=>{const e=n.packageDetail.dataStr.shape.filter(l=>l.type==="PAD"),t=Math.min(...e.map(l=>y5(l.center.x))),r=Math.max(...e.map(l=>y5(l.center.x))),i=Math.min(...e.map(l=>y5(l.center.y))),a=Math.max(...e.map(l=>y5(l.center.y))),o=(t+r)/2,s=(i+a)/2;return{x:o,y:s}},Xgn=n=>{const e=n.map(l=>[...new Set(l)]),t=e.map(()=>[]),r=e.map(()=>null);for(let l=0;l<e.length;l++)for(const c of e[l])if(/^\d+$/.test(c)){r[l]=Number.parseInt(c);break}let i=0;const a=new Set;for(let l=0;l<r.length;l++){const c=r[l];if(c===null||c<1)continue;if(!a.has(c)){a.add(c),t[l].push(`pin${c}`),i=Math.max(i,c);continue}let u=0;for(const f of t[l])f.startsWith(`pin${c}_alt`)&&u++;t[l].push(`pin${c}_alt${u+1}`)}for(let l=0;l<t.length;l++){const c=t[l][0];c!=null&&c.includes("_alt")&&(i++,t[l].unshift(`pin${i}`))}for(let l=0;l<t.length;l++)t[l].length===0&&(i++,t[l].push(`pin${i}`));const o={};for(const l of e)for(const c of l)/^\d+$/.test(c)||(o[c]=(o[c]??0)+1);const s={};for(let l=0;l<e.length;l++){const c=e[l];for(const u of c)/^\d+$/.test(u)||(o[u]===1?t[l].push(u):(s[u]=(s[u]??0)+1,t[l].push(`${u}${s[u]}`)))}return t},By=n=>typeof n=="number"?y5(`${n}mil`):n.match(/^\d+$/)?y5(`${n}mil`):y5(n),Lw=n=>typeof n=="number"||n.match(/^\d+$/)?By(n)*10:By(n),Wgn=(n,e)=>_H.parse({type:"pcb_silkscreen_path",pcb_silkscreen_path_id:`pcb_silkscreen_path_${e+1}`,pcb_component_id:"pcb_component_1",layer:"top",route:n.points.map(t=>({x:Lw(t.x),y:Lw(t.y)})),stroke_width:A0e(n.width)}),Zgn=(n,e)=>{const t=qgn(n.start.x,n.start.y,n.end.x,n.end.y,n.radiusX,n.largeArc,n.sweepDirection==="CW");return _H.parse({type:"pcb_silkscreen_path",pcb_silkscreen_path_id:`pcb_silkscreen_arc_${e+1}`,pcb_component_id:"pcb_component_1",layer:"top",route:t.map(r=>({x:Lw(r.x),y:Lw(r.y)})),stroke_width:A0e(n.width)})},Qgn=(n,e)=>J0e.parse({type:"pcb_hole",x:Lw(n.center.x),y:Lw(n.center.y),hole_diameter:Lw(n.radius)*2,hole_shape:"circle",pcb_hole_id:`pcb_hole_${e+1}`}),Kgn=(n,{useModelCdn:e,shouldRecenter:t=!0}={})=>{var v,y,w;const r=[];Ygn(n);const i=Z0e.parse({type:"source_component",source_component_id:"source_component_1",name:"U1",ftype:"simple_bug"}),a=K0e.parse({type:"pcb_component",pcb_component_id:"pcb_component_1",source_component_id:"source_component_1",name:"U1",ftype:"simple_bug",width:0,height:0,rotation:0,center:{x:0,y:0},layer:"top"});r.push(i,a);const o=n.packageDetail.dataStr.shape.filter(b=>b.type==="PAD"),s=n.dataStr.shape.filter(b=>b.type==="PIN"),l=o.map(b=>{const S=[];b.number&&S.push(b.number.toString());const M=s.find(N=>N.pinNumber===b.number);return M&&S.push(M.label),S}),c=Xgn(l);o.forEach((b,S)=>{const M=c[S],N=Number.parseInt(M.find(k=>k.match(/pin\d+/)).replace("pin",""));if(r.push({type:"source_port",source_port_id:`source_port_${S+1}`,source_component_id:"source_component_1",name:`pin${N}`,pin_number:N,port_hints:M.filter(k=>k!==`pin${N}`)}),b.holeRadius!==void 0&&By(b.holeRadius)!==0){const k={type:"pcb_plated_hole",pcb_plated_hole_id:`pcb_plated_hole_${S+1}`,x:By(b.center.x),y:By(b.center.y),layers:["top"],port_hints:[`pin${N}`],pcb_component_id:"pcb_component_1",pcb_port_id:`pcb_port_${S+1}`};let G;if(b.shape==="OVAL"){const q=By(b.width)>By(b.height)?"width":"height",X=Math.min(By(b.width),By(b.height)),Y=Math.max(By(b.width),By(b.height)),ee=X/2-By(b.holeRadius),W=Y-ee*2,ue=By(b.holeRadius)*2,pe=q==="width"?W:ue,de=q==="height"?W:ue;G={shape:"pill",outer_width:By(b.width),outer_height:By(b.height),hole_width:pe,hole_height:de}}else G={shape:"circle",hole_diameter:By(b.holeRadius)*2,outer_diameter:By(b.width),radius:By(b.holeRadius)};r.push(epe.parse({...k,...G}))}else{let k;if((b.shape==="RECT"||b.shape==="ELLIPSE"||b.shape==="OVAL")&&(k="rect"),!k)throw new Error(`unknown pad.shape: "${b.shape}"`);const G={width:By(b.width),height:By(b.height)};(b.rotation===90||b.rotation===270)&&(G.width=By(b.height),G.height=By(b.width));const q=tpe.parse({type:"pcb_smtpad",pcb_smtpad_id:`pcb_smtpad_${S+1}`,shape:k,x:By(b.center.x),y:By(b.center.y),...k==="rect"?G:{radius:Math.min(By(b.width),By(b.height))/2},layer:"top",port_hints:[`pin${N}`],pcb_component_id:"pcb_component_1",pcb_port_id:`pcb_port_${S+1}`});r.push(q)}}),n.packageDetail.dataStr.shape.filter(b=>b.type==="HOLE").forEach((b,S)=>{r.push(Qgn(b,S))}),n.packageDetail.dataStr.shape.forEach((b,S)=>{b.type==="TRACK"?r.push(Wgn(b,S)):b.type==="ARC"?r.push(Zgn(b,S)):b.type==="TEXT"&&r.push(npe.parse({type:"pcb_silkscreen_text",pcb_silkscreen_text_id:`pcb_silkscreen_text_${S+1}`,pcb_component_id:"pcb_component_1",text:b.text,anchor_position:{x:By(b.x),y:By(b.y)},anchor_alignment:{L:"bottom_left",C:"center",R:"bottom_right"}[b.textAnchor??"L"],font_size:b.size_mm?b.size_mm:void 0,layer:"top"}))});const u=n.packageDetail.dataStr.shape.find(b=>{var S;return!!(b.type==="SVGNODE"&&((S=b.svgData.attrs)!=null&&S.uuid))}),f=(y=(v=u==null?void 0:u.svgData)==null?void 0:v.attrs)==null?void 0:y.uuid,d=f?e?`https://modelcdn.tscircuit.com/easyeda_models/download?uuid=${f}&pn=${n.lcsc.number}`:`https://modules.easyeda.com/3dmodel/${f}`:void 0;if(d!==void 0){const[b,S,M]=(((w=u==null?void 0:u.svgData.attrs)==null?void 0:w.c_rotation)??"0,0,0").split(",").map(Number);r.push(rpe.parse({type:"cad_component",cad_component_id:"cad_component_1",source_component_id:"source_component_1",pcb_component_id:"pcb_component_1",position:{x:0,y:0,z:0},rotation:{x:b,y:S,z:M},model_obj_url:d}))}if(t){const b=Vgn(r.filter(S=>S.type!=="pcb_component"));Fgn(r,gu(yd(-b.center.x,b.center.y),rx(1,-1))),a.center={x:0,y:0}}return r};function Jgn(n){let e=n.replace(/[-]/g,"_").replace(/[^a-zA-Z0-9_$]/g,"_");return/^\d/.test(e)&&(e="A_"+e),e}var e_n=async n=>{const e=ggn.parse(n);return await t_n({betterEasy:e})},t_n=async({betterEasy:n})=>{const e=Kgn(n,{useModelCdn:!0,shouldRecenter:!0}),t=n.dataStr.head.c_para["Manufacturer Part"],r=Jgn(t),i=Dw(e).source_port.list(),a={},o=i.sort((u,f)=>{const d=parseInt(u.name.replace("pin","")),v=parseInt(f.name.replace("pin",""));return d-v});for(const u of o)a[u.name]=[u.name,...u.port_hints??[]];const[s]=Dw(e).cad_component.list();let l;s!=null&&s.model_obj_url&&await n_n(s.model_obj_url)&&(l=s.model_obj_url);const c={jlcpcb:[n.lcsc.number]};return Ggn({componentName:r,manufacturerPartNumber:r,pinLabels:a,objUrl:l,circuitJson:e,supplierPartNumbers:c})},n_n=async n=>{try{return(await fetch(n,{method:"HEAD"})).status===200}catch(e){return console.error(`Error checking model object URL ${n}:`,e),!1}};async function r_n(n,{fetch:e=globalThis.fetch}={}){const t="https://easyeda.com/api/components/search",r=d=>`https://easyeda.com/api/components/${d}?version=6.4.7&uuid=${d}&datastrid=`,i={authority:"easyeda.com",pragma:"no-cache","cache-control":"no-cache",accept:"application/json, text/javascript, */*; q=0.01","x-requested-with":"XMLHttpRequest","user-agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36","content-type":"application/x-www-form-urlencoded; charset=UTF-8",origin:"https://easyeda.com","sec-fetch-site":"same-origin","sec-fetch-mode":"cors","sec-fetch-dest":"empty",referer:"https://easyeda.com/editor","accept-language":"cs,en;q=0.9,sk;q=0.8,en-GB;q=0.7",cookie:"<PUT your cookies here>"},a=`type=3&doctype%5B%5D=2&uid=0819f05c4eef4c71ace90d822a990e87&returnListStyle=classifyarr&wd=${n}&version=6.4.7`,o=await e(t,{method:"POST",headers:i,body:a});if(!o.ok)throw new Error("Failed to search for the component");const s=await o.json();if(!s.success||!s.result.lists.lcsc.length)throw new Error("Component not found");const c=(s.result.lists.lcsc.find(d=>d.dataStr.head.c_para["Supplier Part"]===n)??s.result.lists.lcsc[0]).uuid,u=await e(r(c),{method:"GET",headers:{...i,referer:`https://easyeda.com/editor?uuid=${c}`}});if(!u.ok)throw new Error("Failed to fetch the component details");return(await u.json()).result}const i_n=async n=>{var a;const e=await r_n(n,{fetch:(o,s)=>{var l,c,u,f,d;return fetch(`${VS}/proxy`,{...s,headers:{...s==null?void 0:s.headers,"X-Target-Url":o.toString(),"X-Sender-Origin":((l=s==null?void 0:s.headers)==null?void 0:l.origin)??"","X-Sender-Host":((c=s==null?void 0:s.headers)==null?void 0:c.host)??"https://easyeda.com","X-Sender-Referer":((u=s==null?void 0:s.headers)==null?void 0:u.referer)??"","X-Sender-User-Agent":((f=s==null?void 0:s.headers)==null?void 0:f.userAgent)??"","X-Sender-Cookie":((d=s==null?void 0:s.headers)==null?void 0:d.cookie)??""}})}}),t=await e_n(e),r=(a=t.match(/export const (\w+) = .*/))==null?void 0:a[1];if(!r)throw console.error("COULD NOT DETERMINE FILE NAME OF CONVERTED COMPONENT:",t),new Error("Could not determine file name of converted component");const i=`imports/${r}.tsx`;return await u0e.post(`${VS}/files/upsert`,{json:{file_path:i,text_content:t}}),{filePath:i}},a_n=n=>{const e=OKe(_e=>_e.lastRunEvalVersion),[t,r]=Qe.useState(null),[i,a]=Qe.useState(!1),[o,s]=Qe.useState(!0),[l,c]=Qe.useState(!1),[u,f]=Qe.useState(null),[d,v]=Qe.useState(null),[y,w]=Qe.useState(!1),[b,S]=Qe.useState(null),[M,N]=Qe.useState(null),[k,G]=Qe.useState(!1),[q,X]=Qe.useState(!1),Y=kvn(),ee=s4(_e=>_e.pushEvent),W=s4(_e=>_e.recentEvents),ue=Qe.useMemo(()=>Date.now(),[]);tyn(_e=>{if(!(new Date(_e.created_at).valueOf()<ue+500)){if(_e.event_type==="FILE_UPDATED"){a(!0);return}if(_e.event_type==="SNIPPET_SAVED"){a(!1),s(!1),S("Snippet saved successfully."),G(!1);return}_e.event_type==="REQUEST_EXPORT"&&(X(!0),S("Export processing..."),G(!1)),_e.event_type==="EXPORT_CREATED"&&(S(`Export created: ${_e.exportFilePath}`),G(!1),X(!1))}}),Qe.useEffect(()=>{if(!l||u===null)return;const _e=W.filter(Oe=>new Date(Oe.created_at).valueOf()>u),Te=_e.find(Oe=>Oe.event_type==="FAILED_TO_SAVE_SNIPPET"),be=_e.find(Oe=>Oe.event_type==="SNIPPET_SAVED");Te&&(c(!1),f(null),N(Te.message??"Failed to save snippet. See console for error."),console.error(Te.message),G(!0),Te.error_code==="SNIPPET_UNSET"&&Te.available_snippet_names&&(v(Te.available_snippet_names),w(!0))),be&&(c(!1),f(null),S("Snippet saved successfully."),G(!1))},[W,l]);const pe=async()=>{c(!0),f(Date.now()),S(null),G(!1),await ee({event_type:"REQUEST_TO_SAVE_SNIPPET",snippet_name:t})},de=s4(_e=>_e.circuitJson),[we,he]=Qe.useState(!1);return Fe.jsxs(Fe.Fragment,{children:[Fe.jsxs(Mfe,{children:[Fe.jsx(Cfe,{asChild:!0,children:Fe.jsx("div",{className:"rf-whitespace-nowrap rf-text-xs font-medium rf-p-2 rf-mx-1 rf-cursor-pointer rf-relative",children:"File"})}),Fe.jsxs(AB,{children:[Fe.jsx(C4,{className:"rf-text-xs",onSelect:pe,disabled:l,children:l?"Saving...":"Push"}),parseInt(window.location.port)>5e3&&Fe.jsx(C4,{className:"rf-text-xs",onSelect:()=>{Y.open()},children:"Order"}),Fe.jsx(C4,{className:"rf-text-xs",onSelect:()=>he(!0),disabled:l,children:"Import"}),Fe.jsxs(Xqe,{children:[Fe.jsx(Rfe,{className:"rf-text-xs",disabled:q,children:q?"Exporting...":"Export"}),Fe.jsx(Yqe,{children:Fe.jsx(Afe,{children:V9n.map((_e,Te)=>Fe.jsx(C4,{onSelect:()=>{if(!de){t5.error("No Circuit JSON to export");return}$9n({exportName:_e.name,circuitJson:de,projectName:t??"Untitled"})},disabled:q,children:Fe.jsx("span",{className:"rf-text-xs",children:_e.name})},Te))})})]}),Fe.jsxs(Xqe,{children:[Fe.jsx(Rfe,{className:"rf-text-xs",children:"Advanced"}),Fe.jsx(Yqe,{children:Fe.jsxs(Afe,{children:[Fe.jsx(C4,{className:"rf-flex rf-items-center rf-gap-2",children:Fe.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[Fe.jsx(BKe,{id:"load-latest-eval",checked:n.shouldLoadLatestEval,onCheckedChange:_e=>{n.onChangeShouldLoadLatestEval(_e===!0)}}),Fe.jsx("label",{htmlFor:"load-latest-eval",className:"rf-text-xs rf-cursor-pointer",children:"Force Latest @tscircuit/eval"})]})}),e&&Fe.jsx(C4,{className:"rf-flex rf-items-center rf-gap-2",children:Fe.jsx("div",{className:"rf-flex rf-items-center rf-gap-2",children:Fe.jsxs("span",{className:"rf-text-xs",children:["@tscircuit/eval@",e]})})}),Fe.jsx(C4,{className:"rf-flex rf-items-center rf-gap-2",onClick:()=>{window.open("/api/admin","_blank")},children:Fe.jsx("div",{className:"rf-flex rf-items-center rf-gap-2",children:Fe.jsx("span",{className:"rf-text-xs",children:"CLI Admin Panel"})})})]})})]})]}),Fe.jsx(Uj,{open:k,onOpenChange:G,children:Fe.jsxs($P,{children:[Fe.jsxs(kj,{children:[Fe.jsx(Ij,{children:"Error Saving Snippet"}),Fe.jsx(Fj,{children:M})]}),Fe.jsx(Qde,{children:Fe.jsx(Kde,{onClick:()=>G(!1),children:"Dismiss"})})]})}),Fe.jsx(eyn,{snippetNames:d??[],onSelect:async _e=>{c(!0),f(Date.now()),r(_e),await ee({event_type:"REQUEST_TO_SAVE_SNIPPET",snippet_name:_e}),w(!1)},onCancel:()=>w(!1),isOpen:y})]}),Fe.jsx(fyn,{isOpen:we,onClose:()=>he(!1),onImport:async _e=>{t5.promise(async()=>{if(_e.source==="tscircuit.com")throw await ee({event_type:"INSTALL_PACKAGE",full_package_name:`@tsci/${_e.owner}.${_e.name}`}),new Error("Not implemented");if(_e.source==="jlcpcb"){const{filePath:Te}=await i_n(_e.partNumber);return{filePath:Te}}},{loading:`Importing component: "${_e.name}"`,error:Te=>(console.error("IMPORT ERROR",Te),`Error importing component: "${_e.name}": ${Te.toString()}`),success:Te=>Te!=null&&Te.filePath?`Imported to "${Te.filePath}"`:"Import Successful"})}}),Fe.jsx(A1n,{position:"top-center",reverseOrder:!1}),Fe.jsx(Y.OrderDialog,{isOpen:Y.isOpen,onClose:Y.close,stage:Y.stage,setStage:Y.setStage})]})},o_n=n=>{const[e,t]=Jvn("load-latest-eval",!0);return Fe.jsx(Het,{debug:n.debug,forceLatestEvalVersion:e,defaultToFullScreen:!0,showToggleFullScreen:!1,leftHeaderContent:Fe.jsxs("div",{className:"rf-flex rf-items-center rf-justify-between",children:[Fe.jsx(a_n,{shouldLoadLatestEval:e,onChangeShouldLoadLatestEval:r=>{t(r),globalThis.runFrameWorker=null}}),n.scenarioSelectorContent]})})},s_n=()=>{const n=s4(e=>e.fsMap);Qe.useEffect(()=>{if(!document||!n)return;const e=Array.from(n.keys()),t=l_n(e),r=n.get("package.json");try{if(r){const i=JSON.parse(r);if(i!=null&&i.name){document.title=i.name;return}}}catch{}t&&(document.title=t)},[n])},jet=Dy("run-frame:RunFrameWithApi"),l_n=n=>n.find(e=>e.includes("entrypoint."))??n.find(e=>e.includes("index."))??n.find(e=>e.includes("main."))??n.find(e=>e.endsWith(".tsx")),c_n=n=>n.find(e=>e.includes("manual-edits."))??n.find(e=>e.includes("manual-edit."))??n.find(e=>e.endsWith(".json")),Het=n=>{const{apiBaseUrl:e,leftHeaderContent:t}=n;Qe.useEffect(()=>{n.debug&&Dy.enable("run-frame*")},[n.debug]);const{startPolling:r,stopPolling:i,loadInitialFiles:a}=s4(d=>({startPolling:d.startPolling,stopPolling:d.stopPolling,loadInitialFiles:d.loadInitialFiles})),o=s4(d=>d.fsMap),s=s4(d=>d.circuitJson);Qe.useEffect(()=>{a()},[]),s_n();const{editEventsForRender:l,pushEditEvent:c,markRenderStarted:u,markRenderComplete:f}=fgt();return Qe.useEffect(()=>{e&&(window.TSCIRCUIT_FILESERVER_API_BASE_URL=e)},[e]),Qe.useEffect(()=>(r(),()=>i()),[r,i]),Fe.jsx(Kvn,{fsMap:o,evalVersion:n.evalVersion,forceLatestEvalVersion:n.forceLatestEvalVersion,leftHeaderContent:t,defaultToFullScreen:n.defaultToFullScreen,showToggleFullScreen:n.showToggleFullScreen,onInitialRender:()=>{jet("onInitialRender / markRenderStarted"),u()},onRenderFinished:()=>{jet("onRenderFinished / markRenderComplete"),f()},editEvents:l,onEditEvent:d=>{c(d),fetch(`${VS}/events/create`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({event_type:"USER_CREATED_MANUAL_EDIT",...d})});const v=c_n(Array.from(o.keys()))??"manual-edits.json",y=o.get(v),w=JSON.parse(y??"{}");X_e({circuitJson:s,editEvents:[d],manualEditsFile:w}),fetch(`${VS}/files/upsert`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file_path:v,text_content:JSON.stringify(w),initiator:"runframe"})})}})},Vet=Nhe.createRoot(document.getElementById("root"));window.TSCIRCUIT_USE_RUNFRAME_FOR_CLI?Vet.render(Fe.jsx(o_n,{})):Vet.render(Fe.jsx(Het,{}))});