@tscircuit/runframe 0.0.1841 → 0.0.1842
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.
package/dist/standalone.min.js
CHANGED
|
@@ -79,7 +79,7 @@ This will cause a hydration error.%s`,Le,W,k,le)):console.error(`In HTML, %s can
|
|
|
79
79
|
This will cause a hydration error.%s`,Le,W,le),C&&(P=C.return,Z===null||P===null||Z===P&&P._debugOwner===C._debugOwner||Zt(Z,function(){console.error(`<%s> cannot contain a nested %s.
|
|
80
80
|
See this log for the ancestor stack trace.`,W,Le)})),!1}function mm(P,C,k){if(k||$_("#text",C,!1))return!0;if(k="#text|"+C,Ht[k])return!1;Ht[k]=!0;var W=(k=t_)?cf(k,C):null;return k=k!==null&&W!==null?Dd(W,k,k.tag!==6?{children:null}:null):"",/\S/.test(P)?console.error(`In HTML, text nodes cannot be a child of <%s>.
|
|
81
81
|
This will cause a hydration error.%s`,C,k):console.error(`In HTML, whitespace text nodes cannot be a child of <%s>. Make sure you don't have any extra whitespace between tags on each line of your source code.
|
|
82
|
-
This will cause a hydration error.%s`,C,k),!1}function m_(P,C){if(C){var k=P.firstChild;if(k&&k===P.lastChild&&k.nodeType===3){k.nodeValue=C;return}}P.textContent=C}function y2(P){return P.replace(yr,function(C,k){return k.toUpperCase()})}function uf(P,C,k){var W=C.indexOf("--")===0;W||(-1<C.indexOf("-")?Io.hasOwnProperty(C)&&Io[C]||(Io[C]=!0,console.error("Unsupported style property %s. Did you mean %s?",C,y2(C.replace(Xo,"ms-")))):vo.test(C)?Io.hasOwnProperty(C)&&Io[C]||(Io[C]=!0,console.error("Unsupported vendor-prefixed style property %s. Did you mean %s?",C,C.charAt(0).toUpperCase()+C.slice(1))):!Ai.test(k)||To.hasOwnProperty(k)&&To[k]||(To[k]=!0,console.error(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,C,k.replace(Ai,""))),typeof k=="number"&&(isNaN(k)?fo||(fo=!0,console.error("`NaN` is an invalid value for the `%s` css style property.",C)):isFinite(k)||_r||(_r=!0,console.error("`Infinity` is an invalid value for the `%s` css style property.",C)))),k==null||typeof k=="boolean"||k===""?W?P.setProperty(C,""):C==="float"?P.cssFloat="":P[C]="":W?P.setProperty(C,k):typeof k!="number"||k===0||na.has(C)?C==="float"?P.cssFloat=k:(ae(k,C),P[C]=(""+k).trim()):P[C]=k+"px"}function W_(P,C,k){if(C!=null&&typeof C!="object")throw Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");if(C&&Object.freeze(C),P=P.style,k!=null){if(C){var W={};if(k){for(var Z in k)if(k.hasOwnProperty(Z)&&!C.hasOwnProperty(Z))for(var le=gn[Z]||[Z],Le=0;Le<le.length;Le++)W[le[Le]]=Z}for(var qe in C)if(C.hasOwnProperty(qe)&&(!k||k[qe]!==C[qe]))for(Z=gn[qe]||[qe],le=0;le<Z.length;le++)W[Z[le]]=qe;qe={};for(var dt in C)for(Z=gn[dt]||[dt],le=0;le<Z.length;le++)qe[Z[le]]=dt;dt={};for(var yt in W)if(Z=W[yt],(le=qe[yt])&&Z!==le&&(Le=Z+","+le,!dt[Le])){dt[Le]=!0,Le=console;var mn=C[Z];Le.error.call(Le,"%s a style property during rerender (%s) when a conflicting property is set (%s) can lead to styling bugs. To avoid this, don't mix shorthand and non-shorthand properties for the same value; instead, replace the shorthand with separate values.",mn==null||typeof mn=="boolean"||mn===""?"Removing":"Updating",Z,le)}}for(var vn in k)!k.hasOwnProperty(vn)||C!=null&&C.hasOwnProperty(vn)||(vn.indexOf("--")===0?P.setProperty(vn,""):vn==="float"?P.cssFloat="":P[vn]="");for(var _n in C)yt=C[_n],C.hasOwnProperty(_n)&&k[_n]!==yt&&uf(P,_n,yt)}else for(W in C)C.hasOwnProperty(W)&&uf(P,W,C[W])}function p_(P){if(P.indexOf("-")===-1)return!1;switch(P){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function ku(P){return Y1.get(P)||P}function bh(P,C){if(Ip.call(th,C)&&th[C])return!0;if(Gf.test(C)){if(P="aria-"+C.slice(4).toLowerCase(),P=q1.hasOwnProperty(P)?P:null,P==null)return console.error("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",C),th[C]=!0;if(C!==P)return console.error("Invalid ARIA attribute `%s`. Did you mean `%s`?",C,P),th[C]=!0}if(J1.test(C)){if(P=C.toLowerCase(),P=q1.hasOwnProperty(P)?P:null,P==null)return th[C]=!0,!1;C!==P&&(console.error("Unknown ARIA attribute `%s`. Did you mean `%s`?",C,P),th[C]=!0)}return!0}function f_(P,C){var k=[],W;for(W in C)bh(P,W)||k.push(W);C=k.map(function(Z){return"`"+Z+"`"}).join(", "),k.length===1?console.error("Invalid aria prop %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",C,P):1<k.length&&console.error("Invalid aria props %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",C,P)}function Ph(P,C,k,W){if(Ip.call(nr,C)&&nr[C])return!0;var Z=C.toLowerCase();if(Z==="onfocusin"||Z==="onfocusout")return console.error("React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."),nr[C]=!0;if(typeof k=="function"&&(P==="form"&&C==="action"||P==="input"&&C==="formAction"||P==="button"&&C==="formAction"))return!0;if(W!=null){if(P=W.possibleRegistrationNames,W.registrationNameDependencies.hasOwnProperty(C))return!0;if(W=P.hasOwnProperty(Z)?P[Z]:null,W!=null)return console.error("Invalid event handler property `%s`. Did you mean `%s`?",C,W),nr[C]=!0;if(Yf.test(C))return console.error("Unknown event handler property `%s`. It will be ignored.",C),nr[C]=!0}else if(Yf.test(C))return E.test(C)&&console.error("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",C),nr[C]=!0;if(N.test(C)||$.test(C))return!0;if(Z==="innerhtml")return console.error("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),nr[C]=!0;if(Z==="aria")return console.error("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),nr[C]=!0;if(Z==="is"&&k!==null&&k!==void 0&&typeof k!="string")return console.error("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof k),nr[C]=!0;if(typeof k=="number"&&isNaN(k))return console.error("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",C),nr[C]=!0;if(Fp.hasOwnProperty(Z)){if(Z=Fp[Z],Z!==C)return console.error("Invalid DOM property `%s`. Did you mean `%s`?",C,Z),nr[C]=!0}else if(C!==Z)return console.error("React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.",C,Z),nr[C]=!0;switch(C){case"dangerouslySetInnerHTML":case"children":case"style":case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":return!0;case"innerText":case"textContent":return!0}switch(typeof k){case"boolean":switch(C){case"autoFocus":case"checked":case"multiple":case"muted":case"selected":case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":case"capture":case"download":case"inert":return!0;default:return Z=C.toLowerCase().slice(0,5),Z==="data-"||Z==="aria-"?!0:(k?console.error('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.',k,C,C,k,C):console.error('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',k,C,C,k,C,C,C),nr[C]=!0)}case"function":case"symbol":return nr[C]=!0,!1;case"string":if(k==="false"||k==="true"){switch(C){case"checked":case"selected":case"multiple":case"muted":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":case"inert":break;default:return!0}console.error("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",k,C,k==="false"?"The browser will interpret it as a truthy value.":'Although this works, it will not work as expected if you pass the string "false".',C,k),nr[C]=!0}}return!0}function vh(P,C,k){var W=[],Z;for(Z in C)Ph(P,Z,C[Z],k)||W.push(Z);C=W.map(function(le){return"`"+le+"`"}).join(", "),W.length===1?console.error("Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://react.dev/link/attribute-behavior ",C,P):1<W.length&&console.error("Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://react.dev/link/attribute-behavior ",C,P)}function Ad(P){return Q.test(""+P)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":P}function U_(P){return P=P.target||P.srcElement||window,P.correspondingUseElement&&(P=P.correspondingUseElement),P.nodeType===3?P.parentNode:P}function Fi(P){var C=Wt(P);if(C&&(P=C.stateNode)){var k=P[Ja]||null;e:switch(P=C.stateNode,C.type){case"input":if(Qn(P,k.value,k.defaultValue,k.defaultValue,k.checked,k.defaultChecked,k.type,k.name),C=k.name,k.type==="radio"&&C!=null){for(k=P;k.parentNode;)k=k.parentNode;for(ie(C,"name"),k=k.querySelectorAll('input[name="'+Vn(""+C)+'"][type="radio"]'),C=0;C<k.length;C++){var W=k[C];if(W!==P&&W.form===P.form){var Z=W[Ja]||null;if(!Z)throw Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");Qn(W,Z.value,Z.defaultValue,Z.defaultValue,Z.checked,Z.defaultChecked,Z.type,Z.name)}}for(C=0;C<k.length;C++)W=k[C],W.form===P.form&&qt(W)}break e;case"textarea":xi(P,k.value,k.defaultValue);break e;case"select":C=k.value,C!=null&&Eo(P,!!k.multiple,C,!1)}}}function pm(P,C,k){if(st)return P(C,k);st=!0;try{var W=P(C);return W}finally{if(st=!1,(ve!==null||Qe!==null)&&(L1(),ve&&(C=ve,P=Qe,Qe=ve=null,Fi(C),P)))for(C=0;C<P.length;C++)Fi(P[C])}}function ja(P,C){var k=P.stateNode;if(k===null)return null;var W=k[Ja]||null;if(W===null)return null;k=W[C];e:switch(C){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(W=!W.disabled)||(P=P.type,W=!(P==="button"||P==="input"||P==="select"||P==="textarea")),P=!W;break e;default:P=!1}if(P)return null;if(k&&typeof k!="function")throw Error("Expected `"+C+"` listener to be a function, instead got a value of `"+typeof k+"` type.");return k}function Nu(){if(ln)return ln;var P,C=tn,k=C.length,W,Z="value"in kn?kn.value:kn.textContent,le=Z.length;for(P=0;P<k&&C[P]===Z[P];P++);var Le=k-P;for(W=1;W<=Le&&C[k-W]===Z[le-W];W++);return ln=Z.slice(P,1<W?1-W:void 0)}function Hu(P){var C=P.keyCode;return"charCode"in P?(P=P.charCode,P===0&&C===13&&(P=13)):P=C,P===10&&(P=13),32<=P||P===13?P:0}function X_(){return!0}function Rd(){return!1}function mc(P){function C(k,W,Z,le,Le){this._reactName=k,this._targetInst=Z,this.type=W,this.nativeEvent=le,this.target=Le,this.currentTarget=null;for(var qe in P)P.hasOwnProperty(qe)&&(k=P[qe],this[qe]=k?k(le):le[qe]);return this.isDefaultPrevented=(le.defaultPrevented!=null?le.defaultPrevented:le.returnValue===!1)?X_:Rd,this.isPropagationStopped=Rd,this}return Lr(C.prototype,{preventDefault:function(){this.defaultPrevented=!0;var k=this.nativeEvent;k&&(k.preventDefault?k.preventDefault():typeof k.returnValue!="unknown"&&(k.returnValue=!1),this.isDefaultPrevented=X_)},stopPropagation:function(){var k=this.nativeEvent;k&&(k.stopPropagation?k.stopPropagation():typeof k.cancelBubble!="unknown"&&(k.cancelBubble=!0),this.isPropagationStopped=X_)},persist:function(){},isPersistent:X_}),C}function ga(P){var C=this.nativeEvent;return C.getModifierState?C.getModifierState(P):(P=hq[P])?!!C[P]:!1}function kd(){return ga}function oc(P,C){switch(P){case"keyup":return J5e.indexOf(C.keyCode)!==-1;case"keydown":return C.keyCode!==_C;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ac(P){return P=P.detail,typeof P=="object"&&"data"in P?P.data:null}function lp(P,C){switch(P){case"compositionend":return Ac(C);case"keypress":return C.which!==e7?null:(fq=!0,hC);case"textInput":return P=C.data,P===hC&&fq?null:P;default:return null}}function uu(P,C){if(yd)return P==="compositionend"||!Zv&&oc(P,C)?(P=Nu(),ln=tn=kn=null,yd=!1,P):null;switch(P){case"paste":return null;case"keypress":if(!(C.ctrlKey||C.altKey||C.metaKey)||C.ctrlKey&&C.altKey){if(C.char&&1<C.char.length)return C.char;if(C.which)return String.fromCharCode(C.which)}return null;case"compositionend":return dC&&C.locale!=="ko"?null:C.data;default:return null}}function j_(P){var C=P&&P.nodeName&&P.nodeName.toLowerCase();return C==="input"?!!Bp[P.type]:C==="textarea"}function G_(P){if(!St)return!1;P="on"+P;var C=P in document;return C||(C=document.createElement("div"),C.setAttribute(P,"return;"),C=typeof C[P]=="function"),C}function fm(P,C,k,W){ve?Qe?Qe.push(W):Qe=[W]:ve=W,C=Hm(C,"onChange"),0<C.length&&(k=new Zo("onChange","change",null,k,W),P.push({event:k,listeners:C}))}function Zl(P){h0(P,0)}function _u(P){var C=Cn(P);if(qt(C))return P}function dl(P,C){if(P==="change")return C}function jx(){zp&&(zp.detachEvent("onpropertychange",kl),hx=zp=null)}function kl(P){if(P.propertyName==="value"&&_u(hx)){var C=[];fm(C,hx,P,U_(P)),pm(Zl,C)}}function up(P,C,k){P==="focusin"?(jx(),zp=C,hx=k,zp.attachEvent("onpropertychange",kl)):P==="focusout"&&jx()}function Sh(P){if(P==="selectionchange"||P==="keyup"||P==="keydown")return _u(hx)}function y1(P,C){if(P==="click")return _u(C)}function Fo(P,C){if(P==="input"||P==="change")return _u(C)}function Xn(P,C){return P===C&&(P!==0||1/P===1/C)||P!==P&&C!==C}function Os(P,C){if(bd(P,C))return!0;if(typeof P!="object"||P===null||typeof C!="object"||C===null)return!1;var k=Object.keys(P),W=Object.keys(C);if(k.length!==W.length)return!1;for(W=0;W<k.length;W++){var Z=k[W];if(!Ip.call(C,Z)||!bd(P[Z],C[Z]))return!1}return!0}function x_(P){for(;P&&P.firstChild;)P=P.firstChild;return P}function Ds(P,C){var k=x_(P);P=0;for(var W;k;){if(k.nodeType===3){if(W=P+k.textContent.length,P<=C&&W>=C)return{node:k,offset:C-P};P=W}e:{for(;k;){if(k.nextSibling){k=k.nextSibling;break e}k=k.parentNode}k=void 0}k=x_(k)}}function Nd(P,C){return P&&C?P===C?!0:P&&P.nodeType===3?!1:C&&C.nodeType===3?Nd(P,C.parentNode):"contains"in P?P.contains(C):P.compareDocumentPosition?!!(P.compareDocumentPosition(C)&16):!1:!1}function b2(P){P=P!=null&&P.ownerDocument!=null&&P.ownerDocument.defaultView!=null?P.ownerDocument.defaultView:window;for(var C=Vt(P.document);C instanceof P.HTMLIFrameElement;){try{var k=typeof C.contentWindow.location.href=="string"}catch{k=!1}if(k)P=C.contentWindow;else break;C=Vt(P.document)}return C}function Gx(P){var C=P&&P.nodeName&&P.nodeName.toLowerCase();return C&&(C==="input"&&(P.type==="text"||P.type==="search"||P.type==="tel"||P.type==="url"||P.type==="password")||C==="textarea"||P.contentEditable==="true")}function P2(P,C,k){var W=k.window===k?k.document:k.nodeType===9?k:k.ownerDocument;Ws||yg==null||yg!==Vt(W)||(W=yg,"selectionStart"in W&&Gx(W)?W={start:W.selectionStart,end:W.selectionEnd}:(W=(W.ownerDocument&&W.ownerDocument.defaultView||window).getSelection(),W={anchorNode:W.anchorNode,anchorOffset:W.anchorOffset,focusNode:W.focusNode,focusOffset:W.focusOffset}),o7&&Os(o7,W)||(o7=W,W=Hm(n7,"onSelect"),0<W.length&&(C=new Zo("onSelect","select",null,C,k),P.push({event:C,listeners:W}),C.target=yg)))}function _p(P,C){var k={};return k[P.toLowerCase()]=C.toLowerCase(),k["Webkit"+P]="webkit"+C,k["Moz"+P]="moz"+C,k}function e0(P){if(xs[P])return xs[P];if(!Ka[P])return P;var C=Ka[P],k;for(k in C)if(C.hasOwnProperty(k)&&k in ks)return xs[P]=C[k];return P}function Iu(P,C){i7.set(P,C),ct(C,[P])}function Lu(P,C){if(typeof P=="object"&&P!==null){var k=J4.get(P);return k!==void 0?k:(C={value:P,source:C,stack:pn(C)},J4.set(P,C),C)}return{value:P,source:C,stack:pn(C)}}function Nl(){for(var P=Vy,C=fC=Vy=0;C<P;){var k=nh[C];nh[C++]=null;var W=nh[C];nh[C++]=null;var Z=nh[C];nh[C++]=null;var le=nh[C];if(nh[C++]=null,W!==null&&Z!==null){var Le=W.pending;Le===null?Z.next=Z:(Z.next=Le.next,Le.next=Z),W.pending=Z}le!==0&&rc(k,Z,le)}}function As(P,C,k,W){nh[Vy++]=P,nh[Vy++]=C,nh[Vy++]=k,nh[Vy++]=W,fC|=W,P.lanes|=W,P=P.alternate,P!==null&&(P.lanes|=W)}function Yx(P,C,k,W){return As(P,C,k,W),xm(P)}function k0(P,C){return As(P,null,null,C),xm(P)}function rc(P,C,k){P.lanes|=k;var W=P.alternate;W!==null&&(W.lanes|=k);for(var Z=!1,le=P.return;le!==null;)le.childLanes|=k,W=le.alternate,W!==null&&(W.childLanes|=k),le.tag===22&&(P=le.stateNode,P===null||P._visibility&Oa||(Z=!0)),P=le,le=le.return;return P.tag===3?(le=P.stateNode,Z&&C!==null&&(Z=31-Jc(k),P=le.hiddenUpdates,W=P[Z],W===null?P[Z]=[C]:W.push(C),C.lane=k|536870912),le):null}function xm(P){if(QI>Pro)throw wC=QI=0,ZI=x4e=null,Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");wC>vro&&(wC=0,ZI=null,console.error("Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render.")),P.alternate===null&&(P.flags&4098)!==0&&$s(P);for(var C=P,k=C.return;k!==null;)C.alternate===null&&(C.flags&4098)!==0&&$s(P),C=k,k=C.return;return C.tag===3?C.stateNode:null}function N0(P){if(Fa===null)return P;var C=Fa(P);return C===void 0?P:C.current}function qx(P){if(Fa===null)return P;var C=Fa(P);return C===void 0?P!=null&&typeof P.render=="function"&&(C=N0(P.render),P.render!==C)?(C={$$typeof:Bm,render:C},P.displayName!==void 0&&(C.displayName=P.displayName),C):P:C.current}function b1(P,C){if(Fa===null)return!1;var k=P.elementType;C=C.type;var W=!1,Z=typeof C=="object"&&C!==null?C.$$typeof:null;switch(P.tag){case 1:typeof C=="function"&&(W=!0);break;case 0:(typeof C=="function"||Z===k_)&&(W=!0);break;case 11:(Z===Bm||Z===k_)&&(W=!0);break;case 14:case 15:(Z===hg||Z===k_)&&(W=!0);break;default:return!1}return!!(W&&(P=Fa(k),P!==void 0&&P===Fa(C)))}function gm(P){Fa!==null&&typeof WeakSet=="function"&&(mx===null&&(mx=new WeakSet),mx.add(P))}function Ch(P,C,k){var W=P.alternate,Z=P.child,le=P.sibling,Le=P.tag,qe=P.type,dt=null;switch(Le){case 0:case 15:case 1:dt=qe;break;case 11:dt=qe.render}if(Fa===null)throw Error("Expected resolveFamily to be set during hot reload.");var yt=!1;qe=!1,dt!==null&&(dt=Fa(dt),dt!==void 0&&(k.has(dt)?qe=!0:C.has(dt)&&(Le===1?qe=!0:yt=!0))),mx!==null&&(mx.has(P)||W!==null&&mx.has(W))&&(qe=!0),qe&&(P._debugNeedsRemount=!0),(qe||yt)&&(W=k0(P,2),W!==null&&Zs(W,P,2)),Z===null||qe||Ch(Z,C,k),le!==null&&Ch(le,C,k)}function Mh(P,C,k,W){this.tag=P,this.key=k,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=C,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=W,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null,this.actualDuration=-0,this.actualStartTime=-1.1,this.treeBaseDuration=this.selfBaseDuration=-0,this._debugTask=this._debugStack=this._debugOwner=this._debugInfo=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,xC||typeof Object.preventExtensions!="function"||Object.preventExtensions(this)}function v2(P){return P=P.prototype,!(!P||!P.isReactComponent)}function Th(P,C){var k=P.alternate;switch(k===null?(k=m(P.tag,C,P.key,P.mode),k.elementType=P.elementType,k.type=P.type,k.stateNode=P.stateNode,k._debugOwner=P._debugOwner,k._debugStack=P._debugStack,k._debugTask=P._debugTask,k._debugHookTypes=P._debugHookTypes,k.alternate=P,P.alternate=k):(k.pendingProps=C,k.type=P.type,k.flags=0,k.subtreeFlags=0,k.deletions=null,k.actualDuration=-0,k.actualStartTime=-1.1),k.flags=P.flags&65011712,k.childLanes=P.childLanes,k.lanes=P.lanes,k.child=P.child,k.memoizedProps=P.memoizedProps,k.memoizedState=P.memoizedState,k.updateQueue=P.updateQueue,C=P.dependencies,k.dependencies=C===null?null:{lanes:C.lanes,firstContext:C.firstContext,_debugThenableState:C._debugThenableState},k.sibling=P.sibling,k.index=P.index,k.ref=P.ref,k.refCleanup=P.refCleanup,k.selfBaseDuration=P.selfBaseDuration,k.treeBaseDuration=P.treeBaseDuration,k._debugInfo=P._debugInfo,k._debugNeedsRemount=P._debugNeedsRemount,k.tag){case 0:case 15:k.type=N0(P.type);break;case 1:k.type=N0(P.type);break;case 11:k.type=qx(P.type)}return k}function cy(P,C){P.flags&=65011714;var k=P.alternate;return k===null?(P.childLanes=0,P.lanes=C,P.child=null,P.subtreeFlags=0,P.memoizedProps=null,P.memoizedState=null,P.updateQueue=null,P.dependencies=null,P.stateNode=null,P.selfBaseDuration=0,P.treeBaseDuration=0):(P.childLanes=k.childLanes,P.lanes=k.lanes,P.child=k.child,P.subtreeFlags=0,P.deletions=null,P.memoizedProps=k.memoizedProps,P.memoizedState=k.memoizedState,P.updateQueue=k.updateQueue,P.type=k.type,C=k.dependencies,P.dependencies=C===null?null:{lanes:C.lanes,firstContext:C.firstContext,_debugThenableState:C._debugThenableState},P.selfBaseDuration=k.selfBaseDuration,P.treeBaseDuration=k.treeBaseDuration),P}function S2(P,C,k,W,Z,le){var Le=0,qe=P;if(typeof P=="function")v2(P)&&(Le=1),qe=N0(qe);else if(typeof P=="string")Le=q(),Le=V1(P,k,Le)?26:P==="html"||P==="head"||P==="body"?27:5;else e:switch(P){case $f:return C=m(31,k,C,Z),C.elementType=$f,C.lanes=le,C;case Di:return dp(k.children,Z,le,C);case Iy:Le=8,Z|=o_,Z|=Jf;break;case Ly:return P=k,W=Z,typeof P.id!="string"&&console.error('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',typeof P.id),C=m(12,P,C,W|Oc),C.elementType=Ly,C.lanes=le,C.stateNode={effectDuration:0,passiveEffectDuration:0},C;case dg:return C=m(13,k,C,Z),C.elementType=dg,C.lanes=le,C;case $1:return C=m(19,k,C,Z),C.elementType=$1,C.lanes=le,C;default:if(typeof P=="object"&&P!==null)switch(P.$$typeof){case ib:case fs:Le=10;break e;case Zu:Le=9;break e;case Bm:Le=11,qe=qx(qe);break e;case hg:Le=14;break e;case k_:Le=16,qe=null;break e}qe="",(P===void 0||typeof P=="object"&&P!==null&&Object.keys(P).length===0)&&(qe+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),P===null?k="null":gi(P)?k="array":P!==void 0&&P.$$typeof===Cu?(k="<"+(w(P.type)||"Unknown")+" />",qe=" Did you accidentally export a JSX literal instead of a component?"):k=typeof P,(Le=W?D(W):null)&&(qe+=`
|
|
82
|
+
This will cause a hydration error.%s`,C,k),!1}function m_(P,C){if(C){var k=P.firstChild;if(k&&k===P.lastChild&&k.nodeType===3){k.nodeValue=C;return}}P.textContent=C}function y2(P){return P.replace(yr,function(C,k){return k.toUpperCase()})}function uf(P,C,k){var W=C.indexOf("--")===0;W||(-1<C.indexOf("-")?Io.hasOwnProperty(C)&&Io[C]||(Io[C]=!0,console.error("Unsupported style property %s. Did you mean %s?",C,y2(C.replace(Xo,"ms-")))):vo.test(C)?Io.hasOwnProperty(C)&&Io[C]||(Io[C]=!0,console.error("Unsupported vendor-prefixed style property %s. Did you mean %s?",C,C.charAt(0).toUpperCase()+C.slice(1))):!Ai.test(k)||To.hasOwnProperty(k)&&To[k]||(To[k]=!0,console.error(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,C,k.replace(Ai,""))),typeof k=="number"&&(isNaN(k)?fo||(fo=!0,console.error("`NaN` is an invalid value for the `%s` css style property.",C)):isFinite(k)||_r||(_r=!0,console.error("`Infinity` is an invalid value for the `%s` css style property.",C)))),k==null||typeof k=="boolean"||k===""?W?P.setProperty(C,""):C==="float"?P.cssFloat="":P[C]="":W?P.setProperty(C,k):typeof k!="number"||k===0||na.has(C)?C==="float"?P.cssFloat=k:(ae(k,C),P[C]=(""+k).trim()):P[C]=k+"px"}function W_(P,C,k){if(C!=null&&typeof C!="object")throw Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");if(C&&Object.freeze(C),P=P.style,k!=null){if(C){var W={};if(k){for(var Z in k)if(k.hasOwnProperty(Z)&&!C.hasOwnProperty(Z))for(var le=gn[Z]||[Z],Le=0;Le<le.length;Le++)W[le[Le]]=Z}for(var qe in C)if(C.hasOwnProperty(qe)&&(!k||k[qe]!==C[qe]))for(Z=gn[qe]||[qe],le=0;le<Z.length;le++)W[Z[le]]=qe;qe={};for(var dt in C)for(Z=gn[dt]||[dt],le=0;le<Z.length;le++)qe[Z[le]]=dt;dt={};for(var yt in W)if(Z=W[yt],(le=qe[yt])&&Z!==le&&(Le=Z+","+le,!dt[Le])){dt[Le]=!0,Le=console;var mn=C[Z];Le.error.call(Le,"%s a style property during rerender (%s) when a conflicting property is set (%s) can lead to styling bugs. To avoid this, don't mix shorthand and non-shorthand properties for the same value; instead, replace the shorthand with separate values.",mn==null||typeof mn=="boolean"||mn===""?"Removing":"Updating",Z,le)}}for(var vn in k)!k.hasOwnProperty(vn)||C!=null&&C.hasOwnProperty(vn)||(vn.indexOf("--")===0?P.setProperty(vn,""):vn==="float"?P.cssFloat="":P[vn]="");for(var _n in C)yt=C[_n],C.hasOwnProperty(_n)&&k[_n]!==yt&&uf(P,_n,yt)}else for(W in C)C.hasOwnProperty(W)&&uf(P,W,C[W])}function p_(P){if(P.indexOf("-")===-1)return!1;switch(P){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function ku(P){return Y1.get(P)||P}function bh(P,C){if(Ip.call(th,C)&&th[C])return!0;if(Gf.test(C)){if(P="aria-"+C.slice(4).toLowerCase(),P=q1.hasOwnProperty(P)?P:null,P==null)return console.error("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",C),th[C]=!0;if(C!==P)return console.error("Invalid ARIA attribute `%s`. Did you mean `%s`?",C,P),th[C]=!0}if(J1.test(C)){if(P=C.toLowerCase(),P=q1.hasOwnProperty(P)?P:null,P==null)return th[C]=!0,!1;C!==P&&(console.error("Unknown ARIA attribute `%s`. Did you mean `%s`?",C,P),th[C]=!0)}return!0}function f_(P,C){var k=[],W;for(W in C)bh(P,W)||k.push(W);C=k.map(function(Z){return"`"+Z+"`"}).join(", "),k.length===1?console.error("Invalid aria prop %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",C,P):1<k.length&&console.error("Invalid aria props %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",C,P)}function Ph(P,C,k,W){if(Ip.call(nr,C)&&nr[C])return!0;var Z=C.toLowerCase();if(Z==="onfocusin"||Z==="onfocusout")return console.error("React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."),nr[C]=!0;if(typeof k=="function"&&(P==="form"&&C==="action"||P==="input"&&C==="formAction"||P==="button"&&C==="formAction"))return!0;if(W!=null){if(P=W.possibleRegistrationNames,W.registrationNameDependencies.hasOwnProperty(C))return!0;if(W=P.hasOwnProperty(Z)?P[Z]:null,W!=null)return console.error("Invalid event handler property `%s`. Did you mean `%s`?",C,W),nr[C]=!0;if(Yf.test(C))return console.error("Unknown event handler property `%s`. It will be ignored.",C),nr[C]=!0}else if(Yf.test(C))return E.test(C)&&console.error("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",C),nr[C]=!0;if(N.test(C)||$.test(C))return!0;if(Z==="innerhtml")return console.error("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),nr[C]=!0;if(Z==="aria")return console.error("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),nr[C]=!0;if(Z==="is"&&k!==null&&k!==void 0&&typeof k!="string")return console.error("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof k),nr[C]=!0;if(typeof k=="number"&&isNaN(k))return console.error("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",C),nr[C]=!0;if(Fp.hasOwnProperty(Z)){if(Z=Fp[Z],Z!==C)return console.error("Invalid DOM property `%s`. Did you mean `%s`?",C,Z),nr[C]=!0}else if(C!==Z)return console.error("React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.",C,Z),nr[C]=!0;switch(C){case"dangerouslySetInnerHTML":case"children":case"style":case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":return!0;case"innerText":case"textContent":return!0}switch(typeof k){case"boolean":switch(C){case"autoFocus":case"checked":case"multiple":case"muted":case"selected":case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":case"capture":case"download":case"inert":return!0;default:return Z=C.toLowerCase().slice(0,5),Z==="data-"||Z==="aria-"?!0:(k?console.error('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.',k,C,C,k,C):console.error('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',k,C,C,k,C,C,C),nr[C]=!0)}case"function":case"symbol":return nr[C]=!0,!1;case"string":if(k==="false"||k==="true"){switch(C){case"checked":case"selected":case"multiple":case"muted":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":case"inert":break;default:return!0}console.error("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",k,C,k==="false"?"The browser will interpret it as a truthy value.":'Although this works, it will not work as expected if you pass the string "false".',C,k),nr[C]=!0}}return!0}function vh(P,C,k){var W=[],Z;for(Z in C)Ph(P,Z,C[Z],k)||W.push(Z);C=W.map(function(le){return"`"+le+"`"}).join(", "),W.length===1?console.error("Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://react.dev/link/attribute-behavior ",C,P):1<W.length&&console.error("Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://react.dev/link/attribute-behavior ",C,P)}function Ad(P){return Q.test(""+P)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":P}function U_(P){return P=P.target||P.srcElement||window,P.correspondingUseElement&&(P=P.correspondingUseElement),P.nodeType===3?P.parentNode:P}function Fi(P){var C=Wt(P);if(C&&(P=C.stateNode)){var k=P[Ja]||null;e:switch(P=C.stateNode,C.type){case"input":if(Qn(P,k.value,k.defaultValue,k.defaultValue,k.checked,k.defaultChecked,k.type,k.name),C=k.name,k.type==="radio"&&C!=null){for(k=P;k.parentNode;)k=k.parentNode;for(ie(C,"name"),k=k.querySelectorAll('input[name="'+Vn(""+C)+'"][type="radio"]'),C=0;C<k.length;C++){var W=k[C];if(W!==P&&W.form===P.form){var Z=W[Ja]||null;if(!Z)throw Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");Qn(W,Z.value,Z.defaultValue,Z.defaultValue,Z.checked,Z.defaultChecked,Z.type,Z.name)}}for(C=0;C<k.length;C++)W=k[C],W.form===P.form&&qt(W)}break e;case"textarea":xi(P,k.value,k.defaultValue);break e;case"select":C=k.value,C!=null&&Eo(P,!!k.multiple,C,!1)}}}function pm(P,C,k){if(st)return P(C,k);st=!0;try{var W=P(C);return W}finally{if(st=!1,(ve!==null||Qe!==null)&&(L1(),ve&&(C=ve,P=Qe,Qe=ve=null,Fi(C),P)))for(C=0;C<P.length;C++)Fi(P[C])}}function ja(P,C){var k=P.stateNode;if(k===null)return null;var W=k[Ja]||null;if(W===null)return null;k=W[C];e:switch(C){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(W=!W.disabled)||(P=P.type,W=!(P==="button"||P==="input"||P==="select"||P==="textarea")),P=!W;break e;default:P=!1}if(P)return null;if(k&&typeof k!="function")throw Error("Expected `"+C+"` listener to be a function, instead got a value of `"+typeof k+"` type.");return k}function Nu(){if(ln)return ln;var P,C=tn,k=C.length,W,Z="value"in kn?kn.value:kn.textContent,le=Z.length;for(P=0;P<k&&C[P]===Z[P];P++);var Le=k-P;for(W=1;W<=Le&&C[k-W]===Z[le-W];W++);return ln=Z.slice(P,1<W?1-W:void 0)}function Hu(P){var C=P.keyCode;return"charCode"in P?(P=P.charCode,P===0&&C===13&&(P=13)):P=C,P===10&&(P=13),32<=P||P===13?P:0}function X_(){return!0}function Rd(){return!1}function mc(P){function C(k,W,Z,le,Le){this._reactName=k,this._targetInst=Z,this.type=W,this.nativeEvent=le,this.target=Le,this.currentTarget=null;for(var qe in P)P.hasOwnProperty(qe)&&(k=P[qe],this[qe]=k?k(le):le[qe]);return this.isDefaultPrevented=(le.defaultPrevented!=null?le.defaultPrevented:le.returnValue===!1)?X_:Rd,this.isPropagationStopped=Rd,this}return Lr(C.prototype,{preventDefault:function(){this.defaultPrevented=!0;var k=this.nativeEvent;k&&(k.preventDefault?k.preventDefault():typeof k.returnValue!="unknown"&&(k.returnValue=!1),this.isDefaultPrevented=X_)},stopPropagation:function(){var k=this.nativeEvent;k&&(k.stopPropagation?k.stopPropagation():typeof k.cancelBubble!="unknown"&&(k.cancelBubble=!0),this.isPropagationStopped=X_)},persist:function(){},isPersistent:X_}),C}function ga(P){var C=this.nativeEvent;return C.getModifierState?C.getModifierState(P):(P=hq[P])?!!C[P]:!1}function kd(){return ga}function oc(P,C){switch(P){case"keyup":return J5e.indexOf(C.keyCode)!==-1;case"keydown":return C.keyCode!==_C;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ac(P){return P=P.detail,typeof P=="object"&&"data"in P?P.data:null}function lp(P,C){switch(P){case"compositionend":return Ac(C);case"keypress":return C.which!==e7?null:(fq=!0,hC);case"textInput":return P=C.data,P===hC&&fq?null:P;default:return null}}function uu(P,C){if(yd)return P==="compositionend"||!Zv&&oc(P,C)?(P=Nu(),ln=tn=kn=null,yd=!1,P):null;switch(P){case"paste":return null;case"keypress":if(!(C.ctrlKey||C.altKey||C.metaKey)||C.ctrlKey&&C.altKey){if(C.char&&1<C.char.length)return C.char;if(C.which)return String.fromCharCode(C.which)}return null;case"compositionend":return dC&&C.locale!=="ko"?null:C.data;default:return null}}function j_(P){var C=P&&P.nodeName&&P.nodeName.toLowerCase();return C==="input"?!!Bp[P.type]:C==="textarea"}function G_(P){if(!St)return!1;P="on"+P;var C=P in document;return C||(C=document.createElement("div"),C.setAttribute(P,"return;"),C=typeof C[P]=="function"),C}function fm(P,C,k,W){ve?Qe?Qe.push(W):Qe=[W]:ve=W,C=Hm(C,"onChange"),0<C.length&&(k=new Zo("onChange","change",null,k,W),P.push({event:k,listeners:C}))}function Zl(P){h0(P,0)}function _u(P){var C=Cn(P);if(qt(C))return P}function dl(P,C){if(P==="change")return C}function jx(){zp&&(zp.detachEvent("onpropertychange",kl),hx=zp=null)}function kl(P){if(P.propertyName==="value"&&_u(hx)){var C=[];fm(C,hx,P,U_(P)),pm(Zl,C)}}function up(P,C,k){P==="focusin"?(jx(),zp=C,hx=k,zp.attachEvent("onpropertychange",kl)):P==="focusout"&&jx()}function Sh(P){if(P==="selectionchange"||P==="keyup"||P==="keydown")return _u(hx)}function y1(P,C){if(P==="click")return _u(C)}function Fo(P,C){if(P==="input"||P==="change")return _u(C)}function Xn(P,C){return P===C&&(P!==0||1/P===1/C)||P!==P&&C!==C}function Os(P,C){if(bd(P,C))return!0;if(typeof P!="object"||P===null||typeof C!="object"||C===null)return!1;var k=Object.keys(P),W=Object.keys(C);if(k.length!==W.length)return!1;for(W=0;W<k.length;W++){var Z=k[W];if(!Ip.call(C,Z)||!bd(P[Z],C[Z]))return!1}return!0}function x_(P){for(;P&&P.firstChild;)P=P.firstChild;return P}function Ds(P,C){var k=x_(P);P=0;for(var W;k;){if(k.nodeType===3){if(W=P+k.textContent.length,P<=C&&W>=C)return{node:k,offset:C-P};P=W}e:{for(;k;){if(k.nextSibling){k=k.nextSibling;break e}k=k.parentNode}k=void 0}k=x_(k)}}function Nd(P,C){return P&&C?P===C?!0:P&&P.nodeType===3?!1:C&&C.nodeType===3?Nd(P,C.parentNode):"contains"in P?P.contains(C):P.compareDocumentPosition?!!(P.compareDocumentPosition(C)&16):!1:!1}function b2(P){P=P!=null&&P.ownerDocument!=null&&P.ownerDocument.defaultView!=null?P.ownerDocument.defaultView:window;for(var C=Vt(P.document);C instanceof P.HTMLIFrameElement;){try{var k=typeof C.contentWindow.location.href=="string"}catch{k=!1}if(k)P=C.contentWindow;else break;C=Vt(P.document)}return C}function Gx(P){var C=P&&P.nodeName&&P.nodeName.toLowerCase();return C&&(C==="input"&&(P.type==="text"||P.type==="search"||P.type==="tel"||P.type==="url"||P.type==="password")||C==="textarea"||P.contentEditable==="true")}function P2(P,C,k){var W=k.window===k?k.document:k.nodeType===9?k:k.ownerDocument;Ws||yg==null||yg!==Vt(W)||(W=yg,"selectionStart"in W&&Gx(W)?W={start:W.selectionStart,end:W.selectionEnd}:(W=(W.ownerDocument&&W.ownerDocument.defaultView||window).getSelection(),W={anchorNode:W.anchorNode,anchorOffset:W.anchorOffset,focusNode:W.focusNode,focusOffset:W.focusOffset}),o7&&Os(o7,W)||(o7=W,W=Hm(n7,"onSelect"),0<W.length&&(C=new Zo("onSelect","select",null,C,k),P.push({event:C,listeners:W}),C.target=yg)))}function _p(P,C){var k={};return k[P.toLowerCase()]=C.toLowerCase(),k["Webkit"+P]="webkit"+C,k["Moz"+P]="moz"+C,k}function e0(P){if(xs[P])return xs[P];if(!Ka[P])return P;var C=Ka[P],k;for(k in C)if(C.hasOwnProperty(k)&&k in ks)return xs[P]=C[k];return P}function Iu(P,C){i7.set(P,C),ct(C,[P])}function Lu(P,C){if(typeof P=="object"&&P!==null){var k=J4.get(P);return k!==void 0?k:(C={value:P,source:C,stack:pn(C)},J4.set(P,C),C)}return{value:P,source:C,stack:pn(C)}}function Nl(){for(var P=Vy,C=fC=Vy=0;C<P;){var k=nh[C];nh[C++]=null;var W=nh[C];nh[C++]=null;var Z=nh[C];nh[C++]=null;var le=nh[C];if(nh[C++]=null,W!==null&&Z!==null){var Le=W.pending;Le===null?Z.next=Z:(Z.next=Le.next,Le.next=Z),W.pending=Z}le!==0&&rc(k,Z,le)}}function As(P,C,k,W){nh[Vy++]=P,nh[Vy++]=C,nh[Vy++]=k,nh[Vy++]=W,fC|=W,P.lanes|=W,P=P.alternate,P!==null&&(P.lanes|=W)}function Yx(P,C,k,W){return As(P,C,k,W),xm(P)}function k0(P,C){return As(P,null,null,C),xm(P)}function rc(P,C,k){P.lanes|=k;var W=P.alternate;W!==null&&(W.lanes|=k);for(var Z=!1,le=P.return;le!==null;)le.childLanes|=k,W=le.alternate,W!==null&&(W.childLanes|=k),le.tag===22&&(P=le.stateNode,P===null||P._visibility&Oa||(Z=!0)),P=le,le=le.return;return P.tag===3?(le=P.stateNode,Z&&C!==null&&(Z=31-Jc(k),P=le.hiddenUpdates,W=P[Z],W===null?P[Z]=[C]:W.push(C),C.lane=k|536870912),le):null}function xm(P){if(QI>vro)throw wC=QI=0,ZI=x4e=null,Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");wC>Sro&&(wC=0,ZI=null,console.error("Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render.")),P.alternate===null&&(P.flags&4098)!==0&&$s(P);for(var C=P,k=C.return;k!==null;)C.alternate===null&&(C.flags&4098)!==0&&$s(P),C=k,k=C.return;return C.tag===3?C.stateNode:null}function N0(P){if(Fa===null)return P;var C=Fa(P);return C===void 0?P:C.current}function qx(P){if(Fa===null)return P;var C=Fa(P);return C===void 0?P!=null&&typeof P.render=="function"&&(C=N0(P.render),P.render!==C)?(C={$$typeof:Bm,render:C},P.displayName!==void 0&&(C.displayName=P.displayName),C):P:C.current}function b1(P,C){if(Fa===null)return!1;var k=P.elementType;C=C.type;var W=!1,Z=typeof C=="object"&&C!==null?C.$$typeof:null;switch(P.tag){case 1:typeof C=="function"&&(W=!0);break;case 0:(typeof C=="function"||Z===k_)&&(W=!0);break;case 11:(Z===Bm||Z===k_)&&(W=!0);break;case 14:case 15:(Z===hg||Z===k_)&&(W=!0);break;default:return!1}return!!(W&&(P=Fa(k),P!==void 0&&P===Fa(C)))}function gm(P){Fa!==null&&typeof WeakSet=="function"&&(mx===null&&(mx=new WeakSet),mx.add(P))}function Ch(P,C,k){var W=P.alternate,Z=P.child,le=P.sibling,Le=P.tag,qe=P.type,dt=null;switch(Le){case 0:case 15:case 1:dt=qe;break;case 11:dt=qe.render}if(Fa===null)throw Error("Expected resolveFamily to be set during hot reload.");var yt=!1;qe=!1,dt!==null&&(dt=Fa(dt),dt!==void 0&&(k.has(dt)?qe=!0:C.has(dt)&&(Le===1?qe=!0:yt=!0))),mx!==null&&(mx.has(P)||W!==null&&mx.has(W))&&(qe=!0),qe&&(P._debugNeedsRemount=!0),(qe||yt)&&(W=k0(P,2),W!==null&&Zs(W,P,2)),Z===null||qe||Ch(Z,C,k),le!==null&&Ch(le,C,k)}function Mh(P,C,k,W){this.tag=P,this.key=k,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=C,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=W,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null,this.actualDuration=-0,this.actualStartTime=-1.1,this.treeBaseDuration=this.selfBaseDuration=-0,this._debugTask=this._debugStack=this._debugOwner=this._debugInfo=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,xC||typeof Object.preventExtensions!="function"||Object.preventExtensions(this)}function v2(P){return P=P.prototype,!(!P||!P.isReactComponent)}function Th(P,C){var k=P.alternate;switch(k===null?(k=m(P.tag,C,P.key,P.mode),k.elementType=P.elementType,k.type=P.type,k.stateNode=P.stateNode,k._debugOwner=P._debugOwner,k._debugStack=P._debugStack,k._debugTask=P._debugTask,k._debugHookTypes=P._debugHookTypes,k.alternate=P,P.alternate=k):(k.pendingProps=C,k.type=P.type,k.flags=0,k.subtreeFlags=0,k.deletions=null,k.actualDuration=-0,k.actualStartTime=-1.1),k.flags=P.flags&65011712,k.childLanes=P.childLanes,k.lanes=P.lanes,k.child=P.child,k.memoizedProps=P.memoizedProps,k.memoizedState=P.memoizedState,k.updateQueue=P.updateQueue,C=P.dependencies,k.dependencies=C===null?null:{lanes:C.lanes,firstContext:C.firstContext,_debugThenableState:C._debugThenableState},k.sibling=P.sibling,k.index=P.index,k.ref=P.ref,k.refCleanup=P.refCleanup,k.selfBaseDuration=P.selfBaseDuration,k.treeBaseDuration=P.treeBaseDuration,k._debugInfo=P._debugInfo,k._debugNeedsRemount=P._debugNeedsRemount,k.tag){case 0:case 15:k.type=N0(P.type);break;case 1:k.type=N0(P.type);break;case 11:k.type=qx(P.type)}return k}function cy(P,C){P.flags&=65011714;var k=P.alternate;return k===null?(P.childLanes=0,P.lanes=C,P.child=null,P.subtreeFlags=0,P.memoizedProps=null,P.memoizedState=null,P.updateQueue=null,P.dependencies=null,P.stateNode=null,P.selfBaseDuration=0,P.treeBaseDuration=0):(P.childLanes=k.childLanes,P.lanes=k.lanes,P.child=k.child,P.subtreeFlags=0,P.deletions=null,P.memoizedProps=k.memoizedProps,P.memoizedState=k.memoizedState,P.updateQueue=k.updateQueue,P.type=k.type,C=k.dependencies,P.dependencies=C===null?null:{lanes:C.lanes,firstContext:C.firstContext,_debugThenableState:C._debugThenableState},P.selfBaseDuration=k.selfBaseDuration,P.treeBaseDuration=k.treeBaseDuration),P}function S2(P,C,k,W,Z,le){var Le=0,qe=P;if(typeof P=="function")v2(P)&&(Le=1),qe=N0(qe);else if(typeof P=="string")Le=q(),Le=V1(P,k,Le)?26:P==="html"||P==="head"||P==="body"?27:5;else e:switch(P){case $f:return C=m(31,k,C,Z),C.elementType=$f,C.lanes=le,C;case Di:return dp(k.children,Z,le,C);case Iy:Le=8,Z|=o_,Z|=Jf;break;case Ly:return P=k,W=Z,typeof P.id!="string"&&console.error('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',typeof P.id),C=m(12,P,C,W|Oc),C.elementType=Ly,C.lanes=le,C.stateNode={effectDuration:0,passiveEffectDuration:0},C;case dg:return C=m(13,k,C,Z),C.elementType=dg,C.lanes=le,C;case $1:return C=m(19,k,C,Z),C.elementType=$1,C.lanes=le,C;default:if(typeof P=="object"&&P!==null)switch(P.$$typeof){case ib:case fs:Le=10;break e;case Zu:Le=9;break e;case Bm:Le=11,qe=qx(qe);break e;case hg:Le=14;break e;case k_:Le=16,qe=null;break e}qe="",(P===void 0||typeof P=="object"&&P!==null&&Object.keys(P).length===0)&&(qe+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),P===null?k="null":gi(P)?k="array":P!==void 0&&P.$$typeof===Cu?(k="<"+(w(P.type)||"Unknown")+" />",qe=" Did you accidentally export a JSX literal instead of a component?"):k=typeof P,(Le=W?D(W):null)&&(qe+=`
|
|
83
83
|
|
|
84
84
|
Check the render method of \``+Le+"`."),Le=29,k=Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+(k+"."+qe)),qe=null}return C=m(Le,k,C,Z),C.elementType=P,C.type=qe,C.lanes=le,C._debugOwner=W,C}function P1(P,C,k){return C=S2(P.type,P.key,P.props,P._owner,C,k),C._debugOwner=P._owner,C._debugStack=P._debugStack,C._debugTask=P._debugTask,C}function dp(P,C,k,W){return P=m(7,P,W,C),P.lanes=k,P}function Hl(P,C,k){return P=m(6,P,null,C),P.lanes=k,P}function v1(P,C,k){return C=m(4,P.children!==null?P.children:[],P.key,C),C.lanes=k,C.stateNode={containerInfo:P.containerInfo,pendingChildren:null,implementation:P.implementation},C}function g_(P,C){t0(),_b[Z5++]=H3,_b[Z5++]=s7,s7=P,H3=C}function B5(P,C,k){t0(),oh[bg++]=K4,oh[bg++]=Kf,oh[bg++]=db,db=P;var W=K4;P=Kf;var Z=32-Jc(W)-1;W&=~(1<<Z),k+=1;var le=32-Jc(C)+Z;if(30<le){var Le=Z-Z%5;le=(W&(1<<Le)-1).toString(32),W>>=Le,Z-=Le,K4=1<<32-Jc(C)+Z|k<<Z|W,Kf=le+P}else K4=1<<le|k<<Z|W,Kf=P}function C2(P){t0(),P.return!==null&&(g_(P,1),B5(P,1,0))}function _f(P){for(;P===s7;)s7=_b[--Z5],_b[Z5]=null,H3=_b[--Z5],_b[Z5]=null;for(;P===db;)db=oh[--bg],oh[bg]=null,Kf=oh[--bg],oh[bg]=null,K4=oh[--bg],oh[bg]=null}function t0(){ha||console.error("Expected to be hydrating. This is a bug in React. Please file an issue.")}function Y_(P,C){if(P.return===null){if(Z1===null)Z1={fiber:P,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:C};else{if(Z1.fiber!==P)throw Error("Saw multiple hydration diff roots in a pass. This is a bug in React.");Z1.distanceFromLeaf>C&&(Z1.distanceFromLeaf=C)}return Z1}var k=Y_(P.return,C+1).children;return 0<k.length&&k[k.length-1].fiber===P?(k=k[k.length-1],k.distanceFromLeaf>C&&(k.distanceFromLeaf=C),k):(C={fiber:P,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:C},k.push(C),C)}function z5(P,C){Q4||(P=Y_(P,0),P.serverProps=null,C!==null&&(C=wr(C),P.serverTail.push(C)))}function wh(P){var C="",k=Z1;throw k!==null&&(Z1=null,C=_l(k)),df(Lu(Error(`Hydration failed because the server rendered HTML didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:
|
|
85
85
|
|
|
@@ -116,14 +116,14 @@ Please update the following component: %s`,Z),On=!0}return(Fc&px)!==Wy?(Z=W.pend
|
|
|
116
116
|
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`)}function fc(P,C){if(VI)return!1;if(C===null)return console.error("%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",yn),!1;P.length!==C.length&&console.error(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.
|
|
117
117
|
|
|
118
118
|
Previous: %s
|
|
119
|
-
Incoming: %s`,yn,"["+C.join(", ")+"]","["+P.join(", ")+"]");for(var k=0;k<C.length&&k<P.length;k++)if(!bd(P[k],C[k]))return!1;return!0}function Pm(P,C,k,W,Z,le){p7=le,Zi=C,e4=P!==null?P._debugHookTypes:null,yb=-1,VI=P!==null&&P.type!==C.type,(Object.prototype.toString.call(k)==="[object AsyncFunction]"||Object.prototype.toString.call(k)==="[object AsyncGeneratorFunction]")&&(le=A(Zi),$y.has(le)||($y.add(le),console.error("%s is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.",le===null?"An unknown Component":"<"+le+">"))),C.memoizedState=null,C.updateQueue=null,C.lanes=0,an.H=P!==null&&P.memoizedState!==null?Q5e:e4!==null?uft:K5e,PC=le=(C.mode&o_)!==Ba;var Le=Z5e(k,W,Z);if(PC=!1,fD&&(Le=xf(C,k,W,Z)),le){Ce(!0);try{Le=xf(C,k,W,Z)}finally{Ce(!1)}}return o0(P,C),Le}function o0(P,C){C._debugHookTypes=e4,C.dependencies===null?gb!==null&&(C.dependencies={lanes:0,firstContext:null,_debugThenableState:gb}):C.dependencies._debugThenableState=gb,an.H=vq;var k=Xl!==null&&Xl.next!==null;if(p7=0,e4=yn=qh=Xl=Zi=null,yb=-1,P!==null&&(P.flags&65011712)!==(C.flags&65011712)&&console.error("Internal React error: Expected static flag was missing. Please notify the React team."),bq=!1,zI=0,gb=null,k)throw Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");P===null||Wp||(P=P.dependencies,P!==null&&Dh(P)&&(Wp=!0)),oo?(oo=!1,P=!0):P=!1,P&&(C=A(C)||"Unknown",i_.has(C)||$y.has(C)||(i_.add(C),console.error("`use` was called from inside a try/catch block. This is not allowed and can lead to unexpected behavior. To handle errors triggered by `use`, wrap your component in a error boundary.")))}function xf(P,C,k,W){Zi=P;var Z=0;do{if(fD&&(gb=null),zI=0,fD=!1,Z>=uro)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(Z+=1,VI=!1,qh=Xl=null,P.updateQueue!=null){var le=P.updateQueue;le.lastEffect=null,le.events=null,le.stores=null,le.memoCache!=null&&(le.memoCache.index=0)}yb=-1,an.H=_ft,le=Z5e(C,k,W)}while(fD);return le}function C_(){var P=an.H,C=P.useState()[0];return C=typeof C.then=="function"?gf(C):C,P=P.useState()[0],(Xl!==null?Xl.memoizedState:null)!==P&&(Zi.flags|=1024),C}function ed(){var P=Pq!==0;return Pq=0,P}function zs(P,C,k){C.updateQueue=P.updateQueue,C.flags=(C.mode&Jf)!==Ba?C.flags&-402655237:C.flags&-2053,P.lanes&=~k}function r0(P){if(bq){for(P=P.memoizedState;P!==null;){var C=P.queue;C!==null&&(C.pending=null),P=P.next}bq=!1}p7=0,e4=qh=Xl=Zi=null,yb=-1,yn=null,fD=!1,zI=Pq=0,gb=null}function Qs(){var P={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return qh===null?Zi.memoizedState=qh=P:qh=qh.next=P,qh}function Mi(){if(Xl===null){var P=Zi.alternate;P=P!==null?P.memoizedState:null}else P=Xl.next;var C=qh===null?Zi.memoizedState:qh.next;if(C!==null)qh=C,Xl=P;else{if(P===null)throw Zi.alternate===null?Error("Update hook called on initial render. This is likely a bug in React. Please file an issue."):Error("Rendered more hooks than during the previous render.");Xl=P,P={memoizedState:Xl.memoizedState,baseState:Xl.baseState,baseQueue:Xl.baseQueue,queue:Xl.queue,next:null},qh===null?Zi.memoizedState=qh=P:qh=qh.next=P}return qh}function Kx(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function gf(P){var C=zI;return zI+=1,gb===null&&(gb=hu()),P=b_(gb,P,C),C=Zi,(qh===null?C.memoizedState:qh.next)===null&&(C=C.alternate,an.H=C!==null&&C.memoizedState!==null?Q5e:K5e),P}function td(P){if(P!==null&&typeof P=="object"){if(typeof P.then=="function")return gf(P);if(P.$$typeof===fs)return Ps(P)}throw Error("An unsupported type was passed to use(): "+String(P))}function Ta(P){var C=null,k=Zi.updateQueue;if(k!==null&&(C=k.memoCache),C==null){var W=Zi.alternate;W!==null&&(W=W.updateQueue,W!==null&&(W=W.memoCache,W!=null&&(C={data:W.data.map(function(Z){return Z.slice()}),index:0})))}if(C==null&&(C={data:[],index:0}),k===null&&(k=Kx(),Zi.updateQueue=k),k.memoCache=C,k=C.data[C.index],k===void 0||VI)for(k=C.data[C.index]=Array(P),W=0;W<P;W++)k[W]=rx;else k.length!==P&&console.error("Expected a constant size argument for each invocation of useMemoCache. The previous cache was allocated with size %s but size %s was requested.",k.length,P);return C.index++,k}function ms(P,C){return typeof C=="function"?C(P):C}function as(P,C,k){var W=Qs();if(k!==void 0){var Z=k(C);if(PC){Ce(!0);try{k(C)}finally{Ce(!1)}}}else Z=C;return W.memoizedState=W.baseState=Z,P={pending:null,lanes:0,dispatch:null,lastRenderedReducer:P,lastRenderedState:Z},W.queue=P,P=P.dispatch=id.bind(null,Zi,P),[W.memoizedState,P]}function Fd(P){var C=Mi();return nd(C,Xl,P)}function nd(P,C,k){var W=P.queue;if(W===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");W.lastRenderedReducer=k;var Z=P.baseQueue,le=W.pending;if(le!==null){if(Z!==null){var Le=Z.next;Z.next=le.next,le.next=Le}C.baseQueue!==Z&&console.error("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),C.baseQueue=Z=le,W.pending=null}if(le=P.baseState,Z===null)P.memoizedState=le;else{C=Z.next;var qe=Le=null,dt=null,yt=C,mn=!1;do{var vn=yt.lane&-536870913;if(vn!==yt.lane?(oa&vn)===vn:(p7&vn)===vn){var _n=yt.revertLane;if(_n===0)dt!==null&&(dt=dt.next={lane:0,revertLane:0,action:yt.action,hasEagerState:yt.hasEagerState,eagerState:yt.eagerState,next:null}),vn===L3&&(mn=!0);else if((p7&_n)===_n){yt=yt.next,_n===L3&&(mn=!0);continue}else vn={lane:0,revertLane:yt.revertLane,action:yt.action,hasEagerState:yt.hasEagerState,eagerState:yt.eagerState,next:null},dt===null?(qe=dt=vn,Le=le):dt=dt.next=vn,Zi.lanes|=_n,g7|=_n;vn=yt.action,PC&&k(le,vn),le=yt.hasEagerState?yt.eagerState:k(le,vn)}else _n={lane:vn,revertLane:yt.revertLane,action:yt.action,hasEagerState:yt.hasEagerState,eagerState:yt.eagerState,next:null},dt===null?(qe=dt=_n,Le=le):dt=dt.next=_n,Zi.lanes|=vn,g7|=vn;yt=yt.next}while(yt!==null&&yt!==C);if(dt===null?Le=le:dt.next=qe,!bd(le,P.memoizedState)&&(Wp=!0,mn&&(k=fb,k!==null)))throw k;P.memoizedState=le,P.baseState=Le,P.baseQueue=dt,W.lastRenderedState=le}return Z===null&&(W.lanes=0),[P.memoizedState,W.dispatch]}function mp(P){var C=Mi(),k=C.queue;if(k===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");k.lastRenderedReducer=P;var W=k.dispatch,Z=k.pending,le=C.memoizedState;if(Z!==null){k.pending=null;var Le=Z=Z.next;do le=P(le,Le.action),Le=Le.next;while(Le!==Z);bd(le,C.memoizedState)||(Wp=!0),C.memoizedState=le,C.baseQueue===null&&(C.baseState=le),k.lastRenderedState=le}return[le,W]}function Bd(P,C,k){var W=Zi,Z=Qs();if(ha){if(k===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");var le=k();yi||le===k()||(console.error("The result of getServerSnapshot should be cached to avoid an infinite loop"),yi=!0)}else{if(le=C(),yi||(k=C(),bd(le,k)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),yi=!0)),g0===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");(oa&124)!==0||pp(W,C,le)}return Z.memoizedState=le,k={value:le,getSnapshot:C},Z.queue=k,Sf(yf.bind(null,W,k,P),[P]),W.flags|=2048,zu(mo|G0,kh(),Rh.bind(null,W,k,le,C),null),le}function A2(P,C,k){var W=Zi,Z=Mi(),le=ha;if(le){if(k===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");k=k()}else if(k=C(),!yi){var Le=C();bd(k,Le)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),yi=!0)}(Le=!bd((Xl||Z).memoizedState,k))&&(Z.memoizedState=k,Wp=!0),Z=Z.queue;var qe=yf.bind(null,W,Z,P);if(Xc(2048,G0,qe,[P]),Z.getSnapshot!==C||Le||qh!==null&&qh.memoizedState.tag&mo){if(W.flags|=2048,zu(mo|G0,kh(),Rh.bind(null,W,Z,k,C),null),g0===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");le||(p7&124)!==0||pp(W,C,k)}return k}function pp(P,C,k){P.flags|=16384,P={getSnapshot:C,value:k},C=Zi.updateQueue,C===null?(C=Kx(),Zi.updateQueue=C,C.stores=[P]):(k=C.stores,k===null?C.stores=[P]:k.push(P))}function Rh(P,C,k,W){C.value=k,C.getSnapshot=W,dy(C)&&M1(P)}function yf(P,C,k){return k(function(){dy(C)&&M1(P)})}function dy(P){var C=P.getSnapshot;P=P.value;try{var k=C();return!bd(P,k)}catch{return!0}}function M1(P){var C=k0(P,2);C!==null&&Zs(C,P,2)}function T1(P){var C=Qs();if(typeof P=="function"){var k=P;if(P=k(),PC){Ce(!0);try{k()}finally{Ce(!1)}}}return C.memoizedState=C.baseState=P,C.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ms,lastRenderedState:P},C}function vm(P){P=T1(P);var C=P.queue,k=D1.bind(null,Zi,C);return C.dispatch=k,[P.memoizedState,k]}function Il(P){var C=Qs();C.memoizedState=C.baseState=P;var k={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return C.queue=k,C=Sr.bind(null,Zi,!0,k),k.dispatch=C,[P,C]}function M_(P,C){var k=Mi();return Sm(k,Xl,P,C)}function Sm(P,C,k,W){return P.baseState=k,nd(P,Xl,typeof W=="function"?W:ms)}function R2(P,C){var k=Mi();return Xl!==null?Sm(k,Xl,P,C):(k.baseState=P,[P,k.queue.dispatch])}function di(P,C,k,W,Z){if(B2(P))throw Error("Cannot update form state while rendering.");if(P=C.action,P!==null){var le={payload:Z,action:P,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(Le){le.listeners.push(Le)}};an.T!==null?k(!0):le.isTransition=!1,W(le),k=C.pending,k===null?(le.next=C.pending=le,bf(C,le)):(le.next=k.next,C.pending=k.next=le)}}function bf(P,C){var k=C.action,W=C.payload,Z=P.state;if(C.isTransition){var le=an.T,Le={};an.T=Le,an.T._updatedFibers=new Set;try{var qe=k(Z,W),dt=an.S;dt!==null&&dt(Le,qe),k2(P,C,qe)}catch(yt){i0(P,C,yt)}finally{an.T=le,le===null&&Le._updatedFibers&&(P=Le._updatedFibers.size,Le._updatedFibers.clear(),10<P&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."))}}else try{Le=k(Z,W),k2(P,C,Le)}catch(yt){i0(P,C,yt)}}function k2(P,C,k){k!==null&&typeof k=="object"&&typeof k.then=="function"?(k.then(function(W){fp(P,C,W)},function(W){return i0(P,C,W)}),C.isTransition||console.error("An async function with useActionState was called outside of a transition. This is likely not what you intended (for example, isPending will not update correctly). Either call the returned function inside startTransition, or pass it to an `action` or `formAction` prop.")):fp(P,C,k)}function fp(P,C,k){C.status="fulfilled",C.value=k,N2(C),P.state=k,C=P.pending,C!==null&&(k=C.next,k===C?P.pending=null:(k=k.next,C.next=k,bf(P,k)))}function i0(P,C,k){var W=P.pending;if(P.pending=null,W!==null){W=W.next;do C.status="rejected",C.reason=k,N2(C),C=C.next;while(C!==W)}P.action=null}function N2(P){P=P.listeners;for(var C=0;C<P.length;C++)(0,P[C])()}function hy(P,C){return C}function H2(P,C){if(ha){var k=g0.formState;if(k!==null){e:{var W=Zi;if(ha){if(Tu){t:{for(var Z=Tu,le=Um;Z.nodeType!==8;){if(!le){Z=null;break t}if(Z=Cr(Z.nextSibling),Z===null){Z=null;break t}}le=Z.data,Z=le===M4e||le===l1t?Z:null}if(Z){Tu=Cr(Z.nextSibling),W=Z.data===M4e;break e}}wh(W)}W=!1}W&&(C=k[0])}}return k=Qs(),k.memoizedState=k.baseState=C,W={pending:null,lanes:0,dispatch:null,lastRenderedReducer:hy,lastRenderedState:C},k.queue=W,k=D1.bind(null,Zi,W),W.dispatch=k,W=T1(!1),le=Sr.bind(null,Zi,!1,W.queue),W=Qs(),Z={state:C,dispatch:null,action:P,pending:null},W.queue=Z,k=di.bind(null,Zi,Z,le,k),Z.dispatch=k,W.memoizedState=P,[C,k,!1]}function Pf(P){var C=Mi();return od(C,Xl,P)}function od(P,C,k){if(C=nd(P,C,hy)[0],P=Fd(ms)[0],typeof C=="object"&&C!==null&&typeof C.then=="function")try{var W=gf(C)}catch(Le){throw Le===ye?pt:Le}else W=C;C=Mi();var Z=C.queue,le=Z.dispatch;return k!==C.memoizedState&&(Zi.flags|=2048,zu(mo|G0,kh(),hi.bind(null,Z,k),null)),[W,le,P]}function hi(P,C){P.action=C}function vf(P){var C=Mi(),k=Xl;if(k!==null)return od(C,k,P);Mi(),C=C.memoizedState,k=Mi();var W=k.queue.dispatch;return k.memoizedState=P,[C,W,!1]}function zu(P,C,k,W){return P={tag:P,create:k,deps:W,inst:C,next:null},C=Zi.updateQueue,C===null&&(C=Kx(),Zi.updateQueue=C),k=C.lastEffect,k===null?C.lastEffect=P.next=P:(W=k.next,k.next=P,P.next=W,C.lastEffect=P),P}function kh(){return{destroy:void 0,resource:void 0}}function Vu(P){var C=Qs();return P={current:P},C.memoizedState=P}function zd(P,C,k,W){var Z=Qs();W=W===void 0?null:W,Zi.flags|=P,Z.memoizedState=zu(mo|C,kh(),k,W)}function Xc(P,C,k,W){var Z=Mi();W=W===void 0?null:W;var le=Z.memoizedState.inst;Xl!==null&&W!==null&&fc(W,Xl.memoizedState.deps)?Z.memoizedState=zu(C,le,k,W):(Zi.flags|=P,Z.memoizedState=zu(mo|C,le,k,W))}function Sf(P,C){(Zi.mode&Jf)!==Ba&&(Zi.mode&Vp)===Ba?zd(276826112,G0,P,C):zd(8390656,G0,P,C)}function Cm(P,C){var k=4194308;return(Zi.mode&Jf)!==Ba&&(k|=134217728),zd(k,Ri,P,C)}function $5(P,C){if(typeof C=="function"){P=P();var k=C(P);return function(){typeof k=="function"?k():C(null)}}if(C!=null)return C.hasOwnProperty("current")||console.error("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(C).join(", ")+"}"),P=P(),C.current=P,function(){C.current=null}}function I2(P,C,k){typeof C!="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",C!==null?typeof C:"null"),k=k!=null?k.concat([P]):null;var W=4194308;(Zi.mode&Jf)!==Ba&&(W|=134217728),zd(W,Ri,$5.bind(null,C,P),k)}function rd(P,C,k){typeof C!="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",C!==null?typeof C:"null"),k=k!=null?k.concat([P]):null,Xc(4,Ri,$5.bind(null,C,P),k)}function Ti(P,C){return Qs().memoizedState=[P,C===void 0?null:C],P}function L2(P,C){var k=Mi();C=C===void 0?null:C;var W=k.memoizedState;return C!==null&&fc(C,W[1])?W[0]:(k.memoizedState=[P,C],P)}function pu(P,C){var k=Qs();C=C===void 0?null:C;var W=P();if(PC){Ce(!0);try{P()}finally{Ce(!1)}}return k.memoizedState=[W,C],W}function xp(P,C){var k=Mi();C=C===void 0?null:C;var W=k.memoizedState;if(C!==null&&fc(C,W[1]))return W[0];if(W=P(),PC){Ce(!0);try{P()}finally{Ce(!1)}}return k.memoizedState=[W,C],W}function Cf(P,C){var k=Qs();return Mf(k,P,C)}function fu(P,C){var k=Mi();return w1(k,Xl.memoizedState,P,C)}function gp(P,C){var k=Mi();return Xl===null?Mf(k,P,C):w1(k,Xl.memoizedState,P,C)}function Mf(P,C,k){return k===void 0||(p7&1073741824)!==0?P.memoizedState=C:(P.memoizedState=k,P=U4(),Zi.lanes|=P,g7|=P,k)}function w1(P,C,k,W){return bd(k,C)?k:qr.current!==null?(P=Mf(P,k,W),bd(P,C)||(Wp=!0),P):(p7&42)===0?(Wp=!0,P.memoizedState=k):(P=U4(),Zi.lanes|=P,g7|=P,C)}function O2(P,C,k,W,Z){var le=Or.p;Or.p=le!==0&&le<N_?le:N_;var Le=an.T,qe={};an.T=qe,Sr(P,!1,C,k),qe._updatedFibers=new Set;try{var dt=Z(),yt=an.S;if(yt!==null&&yt(qe,dt),dt!==null&&typeof dt=="object"&&typeof dt.then=="function"){var mn=bm(dt,W);Vd(P,C,mn,bu(P))}else Vd(P,C,W,bu(P))}catch(vn){Vd(P,C,{then:function(){},status:"rejected",reason:vn},bu(P))}finally{Or.p=le,an.T=Le,Le===null&&qe._updatedFibers&&(P=qe._updatedFibers.size,qe._updatedFibers.clear(),10<P&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."))}}function E1(P,C,k,W){if(P.tag!==5)throw Error("Expected the form instance to be a HostComponent. This is a bug in React.");var Z=Qx(P).queue;O2(P,Z,C,kC,k===null?_:function(){return Nh(P),k(W)})}function Qx(P){var C=P.memoizedState;if(C!==null)return C;C={memoizedState:kC,baseState:kC,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ms,lastRenderedState:kC},next:null};var k={};return C.next={memoizedState:k,baseState:k,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ms,lastRenderedState:k},next:null},P.memoizedState=C,P=P.alternate,P!==null&&(P.memoizedState=C),C}function Nh(P){an.T===null&&console.error("requestFormReset was called outside a transition or action. To fix, move to an action, or wrap with startTransition.");var C=Qx(P).next.queue;Vd(P,C,{},bu(P))}function T_(){var P=T1(!1);return P=O2.bind(null,Zi,P.queue,!0,!1),Qs().memoizedState=P,[!1,P]}function Zx(){var P=Fd(ms)[0],C=Mi().memoizedState;return[typeof P=="boolean"?P:gf(P),C]}function F2(){var P=mp(ms)[0],C=Mi().memoizedState;return[typeof P=="boolean"?P:gf(P),C]}function xu(){return Ps(rL)}function gu(){var P=Qs(),C=g0.identifierPrefix;if(ha){var k=Kf,W=K4;k=(W&~(1<<32-Jc(W)-1)).toString(32)+k,C="«"+C+"R"+k,k=Pq++,0<k&&(C+="H"+k.toString(32)),C+="»"}else k=lro++,C="«"+C+"r"+k.toString(32)+"»";return P.memoizedState=C}function yp(){return Qs().memoizedState=W5.bind(null,Zi)}function W5(P,C){for(var k=P.return;k!==null;){switch(k.tag){case 24:case 3:var W=bu(k);P=P_(W);var Z=Rc(k,P,W);Z!==null&&(Zs(Z,k,W),Od(Z,k,W)),k=hl(),C!=null&&Z!==null&&console.error("The seed argument is not enabled outside experimental channels."),P.payload={cache:k};return}k=k.return}}function id(P,C,k){var W=arguments;typeof W[3]=="function"&&console.error("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."),W=bu(P);var Z={lane:W,revertLane:0,action:k,hasEagerState:!1,eagerState:null,next:null};B2(P)?Qr(C,Z):(Z=Yx(P,C,Z,W),Z!==null&&(Zs(Z,P,W),bp(Z,C,W))),Je(P,W)}function D1(P,C,k){var W=arguments;typeof W[3]=="function"&&console.error("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."),W=bu(P),Vd(P,C,k,W),Je(P,W)}function Vd(P,C,k,W){var Z={lane:W,revertLane:0,action:k,hasEagerState:!1,eagerState:null,next:null};if(B2(P))Qr(C,Z);else{var le=P.alternate;if(P.lanes===0&&(le===null||le.lanes===0)&&(le=C.lastRenderedReducer,le!==null)){var Le=an.H;an.H=t6;try{var qe=C.lastRenderedState,dt=le(qe,k);if(Z.hasEagerState=!0,Z.eagerState=dt,bd(dt,qe))return As(P,C,Z,0),g0===null&&Nl(),!1}catch{}finally{an.H=Le}}if(k=Yx(P,C,Z,W),k!==null)return Zs(k,P,W),bp(k,C,W),!0}return!1}function Sr(P,C,k,W){if(an.T===null&&L3===0&&console.error("An optimistic state update occurred outside a transition or action. To fix, move the update to an action, or wrap with startTransition."),W={lane:2,revertLane:Ay(),action:W,hasEagerState:!1,eagerState:null,next:null},B2(P)){if(C)throw Error("Cannot update optimistic state while rendering.");console.error("Cannot call startTransition while rendering.")}else C=Yx(P,k,W,2),C!==null&&Zs(C,P,2);Je(P,2)}function B2(P){var C=P.alternate;return P===Zi||C!==null&&C===Zi}function Qr(P,C){fD=bq=!0;var k=P.pending;k===null?C.next=C:(C.next=k.next,k.next=C),P.pending=C}function bp(P,C,k){if((k&4194048)!==0){var W=C.lanes;W&=P.pendingLanes,k|=W,C.lanes=k,ot(P,k)}}function ps(P){var C=Ns;return P!=null&&(Ns=C===null?P:C.concat(P)),C}function kc(P,C,k){for(var W=Object.keys(P.props),Z=0;Z<W.length;Z++){var le=W[Z];if(le!=="children"&&le!=="key"){C===null&&(C=P1(P,k.mode,0),C._debugInfo=Ns,C.return=k),Zt(C,function(Le){console.error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Le)},le);break}}}function L0(P){var C=$I;return $I+=1,xD===null&&(xD=hu()),b_(xD,P,C)}function $d(P,C){C=C.props.ref,P.ref=C!==void 0?C:null}function jr(P,C){throw C.$$typeof===Fm?Error(`A React Element from an older version of React was rendered. This is not supported. It can happen if:
|
|
119
|
+
Incoming: %s`,yn,"["+C.join(", ")+"]","["+P.join(", ")+"]");for(var k=0;k<C.length&&k<P.length;k++)if(!bd(P[k],C[k]))return!1;return!0}function Pm(P,C,k,W,Z,le){p7=le,Zi=C,e4=P!==null?P._debugHookTypes:null,yb=-1,VI=P!==null&&P.type!==C.type,(Object.prototype.toString.call(k)==="[object AsyncFunction]"||Object.prototype.toString.call(k)==="[object AsyncGeneratorFunction]")&&(le=A(Zi),$y.has(le)||($y.add(le),console.error("%s is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.",le===null?"An unknown Component":"<"+le+">"))),C.memoizedState=null,C.updateQueue=null,C.lanes=0,an.H=P!==null&&P.memoizedState!==null?Q5e:e4!==null?uft:K5e,PC=le=(C.mode&o_)!==Ba;var Le=Z5e(k,W,Z);if(PC=!1,fD&&(Le=xf(C,k,W,Z)),le){Ce(!0);try{Le=xf(C,k,W,Z)}finally{Ce(!1)}}return o0(P,C),Le}function o0(P,C){C._debugHookTypes=e4,C.dependencies===null?gb!==null&&(C.dependencies={lanes:0,firstContext:null,_debugThenableState:gb}):C.dependencies._debugThenableState=gb,an.H=vq;var k=Xl!==null&&Xl.next!==null;if(p7=0,e4=yn=qh=Xl=Zi=null,yb=-1,P!==null&&(P.flags&65011712)!==(C.flags&65011712)&&console.error("Internal React error: Expected static flag was missing. Please notify the React team."),bq=!1,zI=0,gb=null,k)throw Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");P===null||Wp||(P=P.dependencies,P!==null&&Dh(P)&&(Wp=!0)),oo?(oo=!1,P=!0):P=!1,P&&(C=A(C)||"Unknown",i_.has(C)||$y.has(C)||(i_.add(C),console.error("`use` was called from inside a try/catch block. This is not allowed and can lead to unexpected behavior. To handle errors triggered by `use`, wrap your component in a error boundary.")))}function xf(P,C,k,W){Zi=P;var Z=0;do{if(fD&&(gb=null),zI=0,fD=!1,Z>=_ro)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(Z+=1,VI=!1,qh=Xl=null,P.updateQueue!=null){var le=P.updateQueue;le.lastEffect=null,le.events=null,le.stores=null,le.memoCache!=null&&(le.memoCache.index=0)}yb=-1,an.H=_ft,le=Z5e(C,k,W)}while(fD);return le}function C_(){var P=an.H,C=P.useState()[0];return C=typeof C.then=="function"?gf(C):C,P=P.useState()[0],(Xl!==null?Xl.memoizedState:null)!==P&&(Zi.flags|=1024),C}function ed(){var P=Pq!==0;return Pq=0,P}function zs(P,C,k){C.updateQueue=P.updateQueue,C.flags=(C.mode&Jf)!==Ba?C.flags&-402655237:C.flags&-2053,P.lanes&=~k}function r0(P){if(bq){for(P=P.memoizedState;P!==null;){var C=P.queue;C!==null&&(C.pending=null),P=P.next}bq=!1}p7=0,e4=qh=Xl=Zi=null,yb=-1,yn=null,fD=!1,zI=Pq=0,gb=null}function Qs(){var P={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return qh===null?Zi.memoizedState=qh=P:qh=qh.next=P,qh}function Mi(){if(Xl===null){var P=Zi.alternate;P=P!==null?P.memoizedState:null}else P=Xl.next;var C=qh===null?Zi.memoizedState:qh.next;if(C!==null)qh=C,Xl=P;else{if(P===null)throw Zi.alternate===null?Error("Update hook called on initial render. This is likely a bug in React. Please file an issue."):Error("Rendered more hooks than during the previous render.");Xl=P,P={memoizedState:Xl.memoizedState,baseState:Xl.baseState,baseQueue:Xl.baseQueue,queue:Xl.queue,next:null},qh===null?Zi.memoizedState=qh=P:qh=qh.next=P}return qh}function Kx(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function gf(P){var C=zI;return zI+=1,gb===null&&(gb=hu()),P=b_(gb,P,C),C=Zi,(qh===null?C.memoizedState:qh.next)===null&&(C=C.alternate,an.H=C!==null&&C.memoizedState!==null?Q5e:K5e),P}function td(P){if(P!==null&&typeof P=="object"){if(typeof P.then=="function")return gf(P);if(P.$$typeof===fs)return Ps(P)}throw Error("An unsupported type was passed to use(): "+String(P))}function Ta(P){var C=null,k=Zi.updateQueue;if(k!==null&&(C=k.memoCache),C==null){var W=Zi.alternate;W!==null&&(W=W.updateQueue,W!==null&&(W=W.memoCache,W!=null&&(C={data:W.data.map(function(Z){return Z.slice()}),index:0})))}if(C==null&&(C={data:[],index:0}),k===null&&(k=Kx(),Zi.updateQueue=k),k.memoCache=C,k=C.data[C.index],k===void 0||VI)for(k=C.data[C.index]=Array(P),W=0;W<P;W++)k[W]=rx;else k.length!==P&&console.error("Expected a constant size argument for each invocation of useMemoCache. The previous cache was allocated with size %s but size %s was requested.",k.length,P);return C.index++,k}function ms(P,C){return typeof C=="function"?C(P):C}function as(P,C,k){var W=Qs();if(k!==void 0){var Z=k(C);if(PC){Ce(!0);try{k(C)}finally{Ce(!1)}}}else Z=C;return W.memoizedState=W.baseState=Z,P={pending:null,lanes:0,dispatch:null,lastRenderedReducer:P,lastRenderedState:Z},W.queue=P,P=P.dispatch=id.bind(null,Zi,P),[W.memoizedState,P]}function Fd(P){var C=Mi();return nd(C,Xl,P)}function nd(P,C,k){var W=P.queue;if(W===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");W.lastRenderedReducer=k;var Z=P.baseQueue,le=W.pending;if(le!==null){if(Z!==null){var Le=Z.next;Z.next=le.next,le.next=Le}C.baseQueue!==Z&&console.error("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),C.baseQueue=Z=le,W.pending=null}if(le=P.baseState,Z===null)P.memoizedState=le;else{C=Z.next;var qe=Le=null,dt=null,yt=C,mn=!1;do{var vn=yt.lane&-536870913;if(vn!==yt.lane?(oa&vn)===vn:(p7&vn)===vn){var _n=yt.revertLane;if(_n===0)dt!==null&&(dt=dt.next={lane:0,revertLane:0,action:yt.action,hasEagerState:yt.hasEagerState,eagerState:yt.eagerState,next:null}),vn===L3&&(mn=!0);else if((p7&_n)===_n){yt=yt.next,_n===L3&&(mn=!0);continue}else vn={lane:0,revertLane:yt.revertLane,action:yt.action,hasEagerState:yt.hasEagerState,eagerState:yt.eagerState,next:null},dt===null?(qe=dt=vn,Le=le):dt=dt.next=vn,Zi.lanes|=_n,g7|=_n;vn=yt.action,PC&&k(le,vn),le=yt.hasEagerState?yt.eagerState:k(le,vn)}else _n={lane:vn,revertLane:yt.revertLane,action:yt.action,hasEagerState:yt.hasEagerState,eagerState:yt.eagerState,next:null},dt===null?(qe=dt=_n,Le=le):dt=dt.next=_n,Zi.lanes|=vn,g7|=vn;yt=yt.next}while(yt!==null&&yt!==C);if(dt===null?Le=le:dt.next=qe,!bd(le,P.memoizedState)&&(Wp=!0,mn&&(k=fb,k!==null)))throw k;P.memoizedState=le,P.baseState=Le,P.baseQueue=dt,W.lastRenderedState=le}return Z===null&&(W.lanes=0),[P.memoizedState,W.dispatch]}function mp(P){var C=Mi(),k=C.queue;if(k===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");k.lastRenderedReducer=P;var W=k.dispatch,Z=k.pending,le=C.memoizedState;if(Z!==null){k.pending=null;var Le=Z=Z.next;do le=P(le,Le.action),Le=Le.next;while(Le!==Z);bd(le,C.memoizedState)||(Wp=!0),C.memoizedState=le,C.baseQueue===null&&(C.baseState=le),k.lastRenderedState=le}return[le,W]}function Bd(P,C,k){var W=Zi,Z=Qs();if(ha){if(k===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");var le=k();yi||le===k()||(console.error("The result of getServerSnapshot should be cached to avoid an infinite loop"),yi=!0)}else{if(le=C(),yi||(k=C(),bd(le,k)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),yi=!0)),g0===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");(oa&124)!==0||pp(W,C,le)}return Z.memoizedState=le,k={value:le,getSnapshot:C},Z.queue=k,Sf(yf.bind(null,W,k,P),[P]),W.flags|=2048,zu(mo|G0,kh(),Rh.bind(null,W,k,le,C),null),le}function A2(P,C,k){var W=Zi,Z=Mi(),le=ha;if(le){if(k===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");k=k()}else if(k=C(),!yi){var Le=C();bd(k,Le)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),yi=!0)}(Le=!bd((Xl||Z).memoizedState,k))&&(Z.memoizedState=k,Wp=!0),Z=Z.queue;var qe=yf.bind(null,W,Z,P);if(Xc(2048,G0,qe,[P]),Z.getSnapshot!==C||Le||qh!==null&&qh.memoizedState.tag&mo){if(W.flags|=2048,zu(mo|G0,kh(),Rh.bind(null,W,Z,k,C),null),g0===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");le||(p7&124)!==0||pp(W,C,k)}return k}function pp(P,C,k){P.flags|=16384,P={getSnapshot:C,value:k},C=Zi.updateQueue,C===null?(C=Kx(),Zi.updateQueue=C,C.stores=[P]):(k=C.stores,k===null?C.stores=[P]:k.push(P))}function Rh(P,C,k,W){C.value=k,C.getSnapshot=W,dy(C)&&M1(P)}function yf(P,C,k){return k(function(){dy(C)&&M1(P)})}function dy(P){var C=P.getSnapshot;P=P.value;try{var k=C();return!bd(P,k)}catch{return!0}}function M1(P){var C=k0(P,2);C!==null&&Zs(C,P,2)}function T1(P){var C=Qs();if(typeof P=="function"){var k=P;if(P=k(),PC){Ce(!0);try{k()}finally{Ce(!1)}}}return C.memoizedState=C.baseState=P,C.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ms,lastRenderedState:P},C}function vm(P){P=T1(P);var C=P.queue,k=D1.bind(null,Zi,C);return C.dispatch=k,[P.memoizedState,k]}function Il(P){var C=Qs();C.memoizedState=C.baseState=P;var k={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return C.queue=k,C=Sr.bind(null,Zi,!0,k),k.dispatch=C,[P,C]}function M_(P,C){var k=Mi();return Sm(k,Xl,P,C)}function Sm(P,C,k,W){return P.baseState=k,nd(P,Xl,typeof W=="function"?W:ms)}function R2(P,C){var k=Mi();return Xl!==null?Sm(k,Xl,P,C):(k.baseState=P,[P,k.queue.dispatch])}function di(P,C,k,W,Z){if(B2(P))throw Error("Cannot update form state while rendering.");if(P=C.action,P!==null){var le={payload:Z,action:P,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(Le){le.listeners.push(Le)}};an.T!==null?k(!0):le.isTransition=!1,W(le),k=C.pending,k===null?(le.next=C.pending=le,bf(C,le)):(le.next=k.next,C.pending=k.next=le)}}function bf(P,C){var k=C.action,W=C.payload,Z=P.state;if(C.isTransition){var le=an.T,Le={};an.T=Le,an.T._updatedFibers=new Set;try{var qe=k(Z,W),dt=an.S;dt!==null&&dt(Le,qe),k2(P,C,qe)}catch(yt){i0(P,C,yt)}finally{an.T=le,le===null&&Le._updatedFibers&&(P=Le._updatedFibers.size,Le._updatedFibers.clear(),10<P&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."))}}else try{Le=k(Z,W),k2(P,C,Le)}catch(yt){i0(P,C,yt)}}function k2(P,C,k){k!==null&&typeof k=="object"&&typeof k.then=="function"?(k.then(function(W){fp(P,C,W)},function(W){return i0(P,C,W)}),C.isTransition||console.error("An async function with useActionState was called outside of a transition. This is likely not what you intended (for example, isPending will not update correctly). Either call the returned function inside startTransition, or pass it to an `action` or `formAction` prop.")):fp(P,C,k)}function fp(P,C,k){C.status="fulfilled",C.value=k,N2(C),P.state=k,C=P.pending,C!==null&&(k=C.next,k===C?P.pending=null:(k=k.next,C.next=k,bf(P,k)))}function i0(P,C,k){var W=P.pending;if(P.pending=null,W!==null){W=W.next;do C.status="rejected",C.reason=k,N2(C),C=C.next;while(C!==W)}P.action=null}function N2(P){P=P.listeners;for(var C=0;C<P.length;C++)(0,P[C])()}function hy(P,C){return C}function H2(P,C){if(ha){var k=g0.formState;if(k!==null){e:{var W=Zi;if(ha){if(Tu){t:{for(var Z=Tu,le=Um;Z.nodeType!==8;){if(!le){Z=null;break t}if(Z=Cr(Z.nextSibling),Z===null){Z=null;break t}}le=Z.data,Z=le===M4e||le===l1t?Z:null}if(Z){Tu=Cr(Z.nextSibling),W=Z.data===M4e;break e}}wh(W)}W=!1}W&&(C=k[0])}}return k=Qs(),k.memoizedState=k.baseState=C,W={pending:null,lanes:0,dispatch:null,lastRenderedReducer:hy,lastRenderedState:C},k.queue=W,k=D1.bind(null,Zi,W),W.dispatch=k,W=T1(!1),le=Sr.bind(null,Zi,!1,W.queue),W=Qs(),Z={state:C,dispatch:null,action:P,pending:null},W.queue=Z,k=di.bind(null,Zi,Z,le,k),Z.dispatch=k,W.memoizedState=P,[C,k,!1]}function Pf(P){var C=Mi();return od(C,Xl,P)}function od(P,C,k){if(C=nd(P,C,hy)[0],P=Fd(ms)[0],typeof C=="object"&&C!==null&&typeof C.then=="function")try{var W=gf(C)}catch(Le){throw Le===ye?pt:Le}else W=C;C=Mi();var Z=C.queue,le=Z.dispatch;return k!==C.memoizedState&&(Zi.flags|=2048,zu(mo|G0,kh(),hi.bind(null,Z,k),null)),[W,le,P]}function hi(P,C){P.action=C}function vf(P){var C=Mi(),k=Xl;if(k!==null)return od(C,k,P);Mi(),C=C.memoizedState,k=Mi();var W=k.queue.dispatch;return k.memoizedState=P,[C,W,!1]}function zu(P,C,k,W){return P={tag:P,create:k,deps:W,inst:C,next:null},C=Zi.updateQueue,C===null&&(C=Kx(),Zi.updateQueue=C),k=C.lastEffect,k===null?C.lastEffect=P.next=P:(W=k.next,k.next=P,P.next=W,C.lastEffect=P),P}function kh(){return{destroy:void 0,resource:void 0}}function Vu(P){var C=Qs();return P={current:P},C.memoizedState=P}function zd(P,C,k,W){var Z=Qs();W=W===void 0?null:W,Zi.flags|=P,Z.memoizedState=zu(mo|C,kh(),k,W)}function Xc(P,C,k,W){var Z=Mi();W=W===void 0?null:W;var le=Z.memoizedState.inst;Xl!==null&&W!==null&&fc(W,Xl.memoizedState.deps)?Z.memoizedState=zu(C,le,k,W):(Zi.flags|=P,Z.memoizedState=zu(mo|C,le,k,W))}function Sf(P,C){(Zi.mode&Jf)!==Ba&&(Zi.mode&Vp)===Ba?zd(276826112,G0,P,C):zd(8390656,G0,P,C)}function Cm(P,C){var k=4194308;return(Zi.mode&Jf)!==Ba&&(k|=134217728),zd(k,Ri,P,C)}function $5(P,C){if(typeof C=="function"){P=P();var k=C(P);return function(){typeof k=="function"?k():C(null)}}if(C!=null)return C.hasOwnProperty("current")||console.error("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(C).join(", ")+"}"),P=P(),C.current=P,function(){C.current=null}}function I2(P,C,k){typeof C!="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",C!==null?typeof C:"null"),k=k!=null?k.concat([P]):null;var W=4194308;(Zi.mode&Jf)!==Ba&&(W|=134217728),zd(W,Ri,$5.bind(null,C,P),k)}function rd(P,C,k){typeof C!="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",C!==null?typeof C:"null"),k=k!=null?k.concat([P]):null,Xc(4,Ri,$5.bind(null,C,P),k)}function Ti(P,C){return Qs().memoizedState=[P,C===void 0?null:C],P}function L2(P,C){var k=Mi();C=C===void 0?null:C;var W=k.memoizedState;return C!==null&&fc(C,W[1])?W[0]:(k.memoizedState=[P,C],P)}function pu(P,C){var k=Qs();C=C===void 0?null:C;var W=P();if(PC){Ce(!0);try{P()}finally{Ce(!1)}}return k.memoizedState=[W,C],W}function xp(P,C){var k=Mi();C=C===void 0?null:C;var W=k.memoizedState;if(C!==null&&fc(C,W[1]))return W[0];if(W=P(),PC){Ce(!0);try{P()}finally{Ce(!1)}}return k.memoizedState=[W,C],W}function Cf(P,C){var k=Qs();return Mf(k,P,C)}function fu(P,C){var k=Mi();return w1(k,Xl.memoizedState,P,C)}function gp(P,C){var k=Mi();return Xl===null?Mf(k,P,C):w1(k,Xl.memoizedState,P,C)}function Mf(P,C,k){return k===void 0||(p7&1073741824)!==0?P.memoizedState=C:(P.memoizedState=k,P=U4(),Zi.lanes|=P,g7|=P,k)}function w1(P,C,k,W){return bd(k,C)?k:qr.current!==null?(P=Mf(P,k,W),bd(P,C)||(Wp=!0),P):(p7&42)===0?(Wp=!0,P.memoizedState=k):(P=U4(),Zi.lanes|=P,g7|=P,C)}function O2(P,C,k,W,Z){var le=Or.p;Or.p=le!==0&&le<N_?le:N_;var Le=an.T,qe={};an.T=qe,Sr(P,!1,C,k),qe._updatedFibers=new Set;try{var dt=Z(),yt=an.S;if(yt!==null&&yt(qe,dt),dt!==null&&typeof dt=="object"&&typeof dt.then=="function"){var mn=bm(dt,W);Vd(P,C,mn,bu(P))}else Vd(P,C,W,bu(P))}catch(vn){Vd(P,C,{then:function(){},status:"rejected",reason:vn},bu(P))}finally{Or.p=le,an.T=Le,Le===null&&qe._updatedFibers&&(P=qe._updatedFibers.size,qe._updatedFibers.clear(),10<P&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."))}}function E1(P,C,k,W){if(P.tag!==5)throw Error("Expected the form instance to be a HostComponent. This is a bug in React.");var Z=Qx(P).queue;O2(P,Z,C,kC,k===null?_:function(){return Nh(P),k(W)})}function Qx(P){var C=P.memoizedState;if(C!==null)return C;C={memoizedState:kC,baseState:kC,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ms,lastRenderedState:kC},next:null};var k={};return C.next={memoizedState:k,baseState:k,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ms,lastRenderedState:k},next:null},P.memoizedState=C,P=P.alternate,P!==null&&(P.memoizedState=C),C}function Nh(P){an.T===null&&console.error("requestFormReset was called outside a transition or action. To fix, move to an action, or wrap with startTransition.");var C=Qx(P).next.queue;Vd(P,C,{},bu(P))}function T_(){var P=T1(!1);return P=O2.bind(null,Zi,P.queue,!0,!1),Qs().memoizedState=P,[!1,P]}function Zx(){var P=Fd(ms)[0],C=Mi().memoizedState;return[typeof P=="boolean"?P:gf(P),C]}function F2(){var P=mp(ms)[0],C=Mi().memoizedState;return[typeof P=="boolean"?P:gf(P),C]}function xu(){return Ps(rL)}function gu(){var P=Qs(),C=g0.identifierPrefix;if(ha){var k=Kf,W=K4;k=(W&~(1<<32-Jc(W)-1)).toString(32)+k,C="«"+C+"R"+k,k=Pq++,0<k&&(C+="H"+k.toString(32)),C+="»"}else k=uro++,C="«"+C+"r"+k.toString(32)+"»";return P.memoizedState=C}function yp(){return Qs().memoizedState=W5.bind(null,Zi)}function W5(P,C){for(var k=P.return;k!==null;){switch(k.tag){case 24:case 3:var W=bu(k);P=P_(W);var Z=Rc(k,P,W);Z!==null&&(Zs(Z,k,W),Od(Z,k,W)),k=hl(),C!=null&&Z!==null&&console.error("The seed argument is not enabled outside experimental channels."),P.payload={cache:k};return}k=k.return}}function id(P,C,k){var W=arguments;typeof W[3]=="function"&&console.error("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."),W=bu(P);var Z={lane:W,revertLane:0,action:k,hasEagerState:!1,eagerState:null,next:null};B2(P)?Qr(C,Z):(Z=Yx(P,C,Z,W),Z!==null&&(Zs(Z,P,W),bp(Z,C,W))),Je(P,W)}function D1(P,C,k){var W=arguments;typeof W[3]=="function"&&console.error("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."),W=bu(P),Vd(P,C,k,W),Je(P,W)}function Vd(P,C,k,W){var Z={lane:W,revertLane:0,action:k,hasEagerState:!1,eagerState:null,next:null};if(B2(P))Qr(C,Z);else{var le=P.alternate;if(P.lanes===0&&(le===null||le.lanes===0)&&(le=C.lastRenderedReducer,le!==null)){var Le=an.H;an.H=t6;try{var qe=C.lastRenderedState,dt=le(qe,k);if(Z.hasEagerState=!0,Z.eagerState=dt,bd(dt,qe))return As(P,C,Z,0),g0===null&&Nl(),!1}catch{}finally{an.H=Le}}if(k=Yx(P,C,Z,W),k!==null)return Zs(k,P,W),bp(k,C,W),!0}return!1}function Sr(P,C,k,W){if(an.T===null&&L3===0&&console.error("An optimistic state update occurred outside a transition or action. To fix, move the update to an action, or wrap with startTransition."),W={lane:2,revertLane:Ay(),action:W,hasEagerState:!1,eagerState:null,next:null},B2(P)){if(C)throw Error("Cannot update optimistic state while rendering.");console.error("Cannot call startTransition while rendering.")}else C=Yx(P,k,W,2),C!==null&&Zs(C,P,2);Je(P,2)}function B2(P){var C=P.alternate;return P===Zi||C!==null&&C===Zi}function Qr(P,C){fD=bq=!0;var k=P.pending;k===null?C.next=C:(C.next=k.next,k.next=C),P.pending=C}function bp(P,C,k){if((k&4194048)!==0){var W=C.lanes;W&=P.pendingLanes,k|=W,C.lanes=k,ot(P,k)}}function ps(P){var C=Ns;return P!=null&&(Ns=C===null?P:C.concat(P)),C}function kc(P,C,k){for(var W=Object.keys(P.props),Z=0;Z<W.length;Z++){var le=W[Z];if(le!=="children"&&le!=="key"){C===null&&(C=P1(P,k.mode,0),C._debugInfo=Ns,C.return=k),Zt(C,function(Le){console.error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Le)},le);break}}}function L0(P){var C=$I;return $I+=1,xD===null&&(xD=hu()),b_(xD,P,C)}function $d(P,C){C=C.props.ref,P.ref=C!==void 0?C:null}function jr(P,C){throw C.$$typeof===Fm?Error(`A React Element from an older version of React was rendered. This is not supported. It can happen if:
|
|
120
120
|
- Multiple copies of the "react" package is used.
|
|
121
121
|
- A library pre-bundled an old copy of "react" or "react/jsx-runtime".
|
|
122
122
|
- A compiler tries to "inline" JSX instead of using the runtime.`):(P=Object.prototype.toString.call(C),Error("Objects are not valid as a React child (found: "+(P==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":P)+"). If you meant to render a collection of children, use an array instead."))}function Vs(P,C){var k=A(P)||"Component";Tft[k]||(Tft[k]=!0,C=C.displayName||C.name||"Component",P.tag===3?console.error(`Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.
|
|
123
123
|
root.render(%s)`,C,C,C):console.error(`Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.
|
|
124
124
|
<%s>{%s}</%s>`,C,C,k,C,k))}function Yi(P,C){var k=A(P)||"Component";wft[k]||(wft[k]=!0,C=String(C),P.tag===3?console.error(`Symbols are not valid as a React child.
|
|
125
125
|
root.render(%s)`,C):console.error(`Symbols are not valid as a React child.
|
|
126
|
-
<%s>%s</%s>`,k,C,k))}function Tf(P){function C(Mt,Et){if(P){var Ft=Mt.deletions;Ft===null?(Mt.deletions=[Et],Mt.flags|=16):Ft.push(Et)}}function k(Mt,Et){if(!P)return null;for(;Et!==null;)C(Mt,Et),Et=Et.sibling;return null}function W(Mt){for(var Et=new Map;Mt!==null;)Mt.key!==null?Et.set(Mt.key,Mt):Et.set(Mt.index,Mt),Mt=Mt.sibling;return Et}function Z(Mt,Et){return Mt=Th(Mt,Et),Mt.index=0,Mt.sibling=null,Mt}function le(Mt,Et,Ft){return Mt.index=Ft,P?(Ft=Mt.alternate,Ft!==null?(Ft=Ft.index,Ft<Et?(Mt.flags|=67108866,Et):Ft):(Mt.flags|=67108866,Et)):(Mt.flags|=1048576,Et)}function Le(Mt){return P&&Mt.alternate===null&&(Mt.flags|=67108866),Mt}function qe(Mt,Et,Ft,Rn){return Et===null||Et.tag!==6?(Et=Hl(Ft,Mt.mode,Rn),Et.return=Mt,Et._debugOwner=Mt,Et._debugTask=Mt._debugTask,Et._debugInfo=Ns,Et):(Et=Z(Et,Ft),Et.return=Mt,Et._debugInfo=Ns,Et)}function dt(Mt,Et,Ft,Rn){var Po=Ft.type;return Po===Di?(Et=mn(Mt,Et,Ft.props.children,Rn,Ft.key),kc(Ft,Et,Mt),Et):Et!==null&&(Et.elementType===Po||b1(Et,Ft)||typeof Po=="object"&&Po!==null&&Po.$$typeof===k_&&f7(Po)===Et.type)?(Et=Z(Et,Ft.props),$d(Et,Ft),Et.return=Mt,Et._debugOwner=Ft._owner,Et._debugInfo=Ns,Et):(Et=P1(Ft,Mt.mode,Rn),$d(Et,Ft),Et.return=Mt,Et._debugInfo=Ns,Et)}function yt(Mt,Et,Ft,Rn){return Et===null||Et.tag!==4||Et.stateNode.containerInfo!==Ft.containerInfo||Et.stateNode.implementation!==Ft.implementation?(Et=v1(Ft,Mt.mode,Rn),Et.return=Mt,Et._debugInfo=Ns,Et):(Et=Z(Et,Ft.children||[]),Et.return=Mt,Et._debugInfo=Ns,Et)}function mn(Mt,Et,Ft,Rn,Po){return Et===null||Et.tag!==7?(Et=dp(Ft,Mt.mode,Rn,Po),Et.return=Mt,Et._debugOwner=Mt,Et._debugTask=Mt._debugTask,Et._debugInfo=Ns,Et):(Et=Z(Et,Ft),Et.return=Mt,Et._debugInfo=Ns,Et)}function vn(Mt,Et,Ft){if(typeof Et=="string"&&Et!==""||typeof Et=="number"||typeof Et=="bigint")return Et=Hl(""+Et,Mt.mode,Ft),Et.return=Mt,Et._debugOwner=Mt,Et._debugTask=Mt._debugTask,Et._debugInfo=Ns,Et;if(typeof Et=="object"&&Et!==null){switch(Et.$$typeof){case Cu:return Ft=P1(Et,Mt.mode,Ft),$d(Ft,Et),Ft.return=Mt,Mt=ps(Et._debugInfo),Ft._debugInfo=Ns,Ns=Mt,Ft;case Vf:return Et=v1(Et,Mt.mode,Ft),Et.return=Mt,Et._debugInfo=Ns,Et;case k_:var Rn=ps(Et._debugInfo);return Et=f7(Et),Mt=vn(Mt,Et,Ft),Ns=Rn,Mt}if(gi(Et)||M(Et))return Ft=dp(Et,Mt.mode,Ft,null),Ft.return=Mt,Ft._debugOwner=Mt,Ft._debugTask=Mt._debugTask,Mt=ps(Et._debugInfo),Ft._debugInfo=Ns,Ns=Mt,Ft;if(typeof Et.then=="function")return Rn=ps(Et._debugInfo),Mt=vn(Mt,L0(Et),Ft),Ns=Rn,Mt;if(Et.$$typeof===fs)return vn(Mt,C1(Mt,Et),Ft);jr(Mt,Et)}return typeof Et=="function"&&Vs(Mt,Et),typeof Et=="symbol"&&Yi(Mt,Et),null}function _n(Mt,Et,Ft,Rn){var Po=Et!==null?Et.key:null;if(typeof Ft=="string"&&Ft!==""||typeof Ft=="number"||typeof Ft=="bigint")return Po!==null?null:qe(Mt,Et,""+Ft,Rn);if(typeof Ft=="object"&&Ft!==null){switch(Ft.$$typeof){case Cu:return Ft.key===Po?(Po=ps(Ft._debugInfo),Mt=dt(Mt,Et,Ft,Rn),Ns=Po,Mt):null;case Vf:return Ft.key===Po?yt(Mt,Et,Ft,Rn):null;case k_:return Po=ps(Ft._debugInfo),Ft=f7(Ft),Mt=_n(Mt,Et,Ft,Rn),Ns=Po,Mt}if(gi(Ft)||M(Ft))return Po!==null?null:(Po=ps(Ft._debugInfo),Mt=mn(Mt,Et,Ft,Rn,null),Ns=Po,Mt);if(typeof Ft.then=="function")return Po=ps(Ft._debugInfo),Mt=_n(Mt,Et,L0(Ft),Rn),Ns=Po,Mt;if(Ft.$$typeof===fs)return _n(Mt,Et,C1(Mt,Ft),Rn);jr(Mt,Ft)}return typeof Ft=="function"&&Vs(Mt,Ft),typeof Ft=="symbol"&&Yi(Mt,Ft),null}function Dn(Mt,Et,Ft,Rn,Po){if(typeof Rn=="string"&&Rn!==""||typeof Rn=="number"||typeof Rn=="bigint")return Mt=Mt.get(Ft)||null,qe(Et,Mt,""+Rn,Po);if(typeof Rn=="object"&&Rn!==null){switch(Rn.$$typeof){case Cu:return Ft=Mt.get(Rn.key===null?Ft:Rn.key)||null,Mt=ps(Rn._debugInfo),Et=dt(Et,Ft,Rn,Po),Ns=Mt,Et;case Vf:return Mt=Mt.get(Rn.key===null?Ft:Rn.key)||null,yt(Et,Mt,Rn,Po);case k_:var ls=ps(Rn._debugInfo);return Rn=f7(Rn),Et=Dn(Mt,Et,Ft,Rn,Po),Ns=ls,Et}if(gi(Rn)||M(Rn))return Ft=Mt.get(Ft)||null,Mt=ps(Rn._debugInfo),Et=mn(Et,Ft,Rn,Po,null),Ns=Mt,Et;if(typeof Rn.then=="function")return ls=ps(Rn._debugInfo),Et=Dn(Mt,Et,Ft,L0(Rn),Po),Ns=ls,Et;if(Rn.$$typeof===fs)return Dn(Mt,Et,Ft,C1(Et,Rn),Po);jr(Et,Rn)}return typeof Rn=="function"&&Vs(Et,Rn),typeof Rn=="symbol"&&Yi(Et,Rn),null}function dr(Mt,Et,Ft,Rn){if(typeof Ft!="object"||Ft===null)return Rn;switch(Ft.$$typeof){case Cu:case Vf:c(Mt,Et,Ft);var Po=Ft.key;if(typeof Po!="string")break;if(Rn===null){Rn=new Set,Rn.add(Po);break}if(!Rn.has(Po)){Rn.add(Po);break}Zt(Et,function(){console.error("Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.",Po)});break;case k_:Ft=f7(Ft),dr(Mt,Et,Ft,Rn)}return Rn}function Ni(Mt,Et,Ft,Rn){for(var Po=null,ls=null,hr=null,us=Et,gs=Et=0,Y0=null;us!==null&&gs<Ft.length;gs++){us.index>gs?(Y0=us,us=null):Y0=us.sibling;var ih=_n(Mt,us,Ft[gs],Rn);if(ih===null){us===null&&(us=Y0);break}Po=dr(Mt,ih,Ft[gs],Po),P&&us&&ih.alternate===null&&C(Mt,us),Et=le(ih,Et,gs),hr===null?ls=ih:hr.sibling=ih,hr=ih,us=Y0}if(gs===Ft.length)return k(Mt,us),ha&&g_(Mt,gs),ls;if(us===null){for(;gs<Ft.length;gs++)us=vn(Mt,Ft[gs],Rn),us!==null&&(Po=dr(Mt,us,Ft[gs],Po),Et=le(us,Et,gs),hr===null?ls=us:hr.sibling=us,hr=us);return ha&&g_(Mt,gs),ls}for(us=W(us);gs<Ft.length;gs++)Y0=Dn(us,Mt,gs,Ft[gs],Rn),Y0!==null&&(Po=dr(Mt,Y0,Ft[gs],Po),P&&Y0.alternate!==null&&us.delete(Y0.key===null?gs:Y0.key),Et=le(Y0,Et,gs),hr===null?ls=Y0:hr.sibling=Y0,hr=Y0);return P&&us.forEach(function(Mb){return C(Mt,Mb)}),ha&&g_(Mt,gs),ls}function y0(Mt,Et,Ft,Rn){if(Ft==null)throw Error("An iterable object provided no iterator.");for(var Po=null,ls=null,hr=Et,us=Et=0,gs=null,Y0=null,ih=Ft.next();hr!==null&&!ih.done;us++,ih=Ft.next()){hr.index>us?(gs=hr,hr=null):gs=hr.sibling;var Mb=_n(Mt,hr,ih.value,Rn);if(Mb===null){hr===null&&(hr=gs);break}Y0=dr(Mt,Mb,ih.value,Y0),P&&hr&&Mb.alternate===null&&C(Mt,hr),Et=le(Mb,Et,us),ls===null?Po=Mb:ls.sibling=Mb,ls=Mb,hr=gs}if(ih.done)return k(Mt,hr),ha&&g_(Mt,us),Po;if(hr===null){for(;!ih.done;us++,ih=Ft.next())hr=vn(Mt,ih.value,Rn),hr!==null&&(Y0=dr(Mt,hr,ih.value,Y0),Et=le(hr,Et,us),ls===null?Po=hr:ls.sibling=hr,ls=hr);return ha&&g_(Mt,us),Po}for(hr=W(hr);!ih.done;us++,ih=Ft.next())gs=Dn(hr,Mt,us,ih.value,Rn),gs!==null&&(Y0=dr(Mt,gs,ih.value,Y0),P&&gs.alternate!==null&&hr.delete(gs.key===null?us:gs.key),Et=le(gs,Et,us),ls===null?Po=gs:ls.sibling=gs,ls=gs);return P&&hr.forEach(function(Lro){return C(Mt,Lro)}),ha&&g_(Mt,us),Po}function ma(Mt,Et,Ft,Rn){if(typeof Ft=="object"&&Ft!==null&&Ft.type===Di&&Ft.key===null&&(kc(Ft,null,Mt),Ft=Ft.props.children),typeof Ft=="object"&&Ft!==null){switch(Ft.$$typeof){case Cu:var Po=ps(Ft._debugInfo);e:{for(var ls=Ft.key;Et!==null;){if(Et.key===ls){if(ls=Ft.type,ls===Di){if(Et.tag===7){k(Mt,Et.sibling),Rn=Z(Et,Ft.props.children),Rn.return=Mt,Rn._debugOwner=Ft._owner,Rn._debugInfo=Ns,kc(Ft,Rn,Mt),Mt=Rn;break e}}else if(Et.elementType===ls||b1(Et,Ft)||typeof ls=="object"&&ls!==null&&ls.$$typeof===k_&&f7(ls)===Et.type){k(Mt,Et.sibling),Rn=Z(Et,Ft.props),$d(Rn,Ft),Rn.return=Mt,Rn._debugOwner=Ft._owner,Rn._debugInfo=Ns,Mt=Rn;break e}k(Mt,Et);break}else C(Mt,Et);Et=Et.sibling}Ft.type===Di?(Rn=dp(Ft.props.children,Mt.mode,Rn,Ft.key),Rn.return=Mt,Rn._debugOwner=Mt,Rn._debugTask=Mt._debugTask,Rn._debugInfo=Ns,kc(Ft,Rn,Mt),Mt=Rn):(Rn=P1(Ft,Mt.mode,Rn),$d(Rn,Ft),Rn.return=Mt,Rn._debugInfo=Ns,Mt=Rn)}return Mt=Le(Mt),Ns=Po,Mt;case Vf:e:{for(Po=Ft,Ft=Po.key;Et!==null;){if(Et.key===Ft)if(Et.tag===4&&Et.stateNode.containerInfo===Po.containerInfo&&Et.stateNode.implementation===Po.implementation){k(Mt,Et.sibling),Rn=Z(Et,Po.children||[]),Rn.return=Mt,Mt=Rn;break e}else{k(Mt,Et);break}else C(Mt,Et);Et=Et.sibling}Rn=v1(Po,Mt.mode,Rn),Rn.return=Mt,Mt=Rn}return Le(Mt);case k_:return Po=ps(Ft._debugInfo),Ft=f7(Ft),Mt=ma(Mt,Et,Ft,Rn),Ns=Po,Mt}if(gi(Ft))return Po=ps(Ft._debugInfo),Mt=Ni(Mt,Et,Ft,Rn),Ns=Po,Mt;if(M(Ft)){if(Po=ps(Ft._debugInfo),ls=M(Ft),typeof ls!="function")throw Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");var hr=ls.call(Ft);return hr===Ft?(Mt.tag!==0||Object.prototype.toString.call(Mt.type)!=="[object GeneratorFunction]"||Object.prototype.toString.call(hr)!=="[object Generator]")&&(Cft||console.error("Using Iterators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. You can also use an Iterable that can iterate multiple times over the same items."),Cft=!0):Ft.entries!==ls||t4e||(console.error("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),t4e=!0),Mt=y0(Mt,Et,hr,Rn),Ns=Po,Mt}if(typeof Ft.then=="function")return Po=ps(Ft._debugInfo),Mt=ma(Mt,Et,L0(Ft),Rn),Ns=Po,Mt;if(Ft.$$typeof===fs)return ma(Mt,Et,C1(Mt,Ft),Rn);jr(Mt,Ft)}return typeof Ft=="string"&&Ft!==""||typeof Ft=="number"||typeof Ft=="bigint"?(Po=""+Ft,Et!==null&&Et.tag===6?(k(Mt,Et.sibling),Rn=Z(Et,Po),Rn.return=Mt,Mt=Rn):(k(Mt,Et),Rn=Hl(Po,Mt.mode,Rn),Rn.return=Mt,Rn._debugOwner=Mt,Rn._debugTask=Mt._debugTask,Rn._debugInfo=Ns,Mt=Rn),Le(Mt)):(typeof Ft=="function"&&Vs(Mt,Ft),typeof Ft=="symbol"&&Yi(Mt,Ft),k(Mt,Et))}return function(Mt,Et,Ft,Rn){var Po=Ns;Ns=null;try{$I=0;var ls=ma(Mt,Et,Ft,Rn);return xD=null,ls}catch(Y0){if(Y0===ye||Y0===pt)throw Y0;var hr=m(29,Y0,null,Mt.mode);hr.lanes=Rn,hr.return=Mt;var us=hr._debugInfo=Ns;if(hr._debugOwner=Mt._debugOwner,hr._debugTask=Mt._debugTask,us!=null){for(var gs=us.length-1;0<=gs;gs--)if(typeof us[gs].stack=="string"){hr._debugOwner=us[gs],hr._debugTask=us[gs].debugTask;break}}return hr}finally{Ns=Po}}}function Ll(P){var C=P.alternate;O(Xm,Xm.current&yD,P),O(t4,P,P),B3===null&&(C===null||qr.current!==null||C.memoizedState!==null)&&(B3=P)}function O0(P){if(P.tag===22){if(O(Xm,Xm.current,P),O(t4,P,P),B3===null){var C=P.alternate;C!==null&&C.memoizedState!==null&&(B3=P)}}else Hh(P)}function Hh(P){O(Xm,Xm.current,P),O(t4,t4.current,P)}function s0(P){H(t4,P),B3===P&&(B3=null),H(Xm,P)}function $u(P){for(var C=P;C!==null;){if(C.tag===13){var k=C.memoizedState;if(k!==null&&(k=k.dehydrated,k===null||k.data===vb||cs(k)))return C}else if(C.tag===19&&C.memoizedProps.revealOrder!==void 0){if((C.flags&128)!==0)return C}else if(C.child!==null){C.child.return=C,C=C.child;continue}if(C===P)break;for(;C.sibling===null;){if(C.return===null||C.return===P)return null;C=C.return}C.sibling.return=C.return,C=C.sibling}return null}function yu(P){if(P!==null&&typeof P!="function"){var C=String(P);Bft.has(C)||(Bft.add(C),console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",P))}}function ii(P,C,k,W){var Z=P.memoizedState,le=k(W,Z);if(P.mode&o_){Ce(!0);try{le=k(W,Z)}finally{Ce(!1)}}le===void 0&&(C=w(C)||"Component",Ift.has(C)||(Ift.add(C),console.error("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",C))),Z=le==null?Z:Lr({},Z,le),P.memoizedState=Z,P.lanes===0&&(P.updateQueue.baseState=Z)}function Ih(P,C,k,W,Z,le,Le){var qe=P.stateNode;if(typeof qe.shouldComponentUpdate=="function"){if(k=qe.shouldComponentUpdate(W,le,Le),P.mode&o_){Ce(!0);try{k=qe.shouldComponentUpdate(W,le,Le)}finally{Ce(!1)}}return k===void 0&&console.error("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",w(C)||"Component"),k}return C.prototype&&C.prototype.isPureReactComponent?!Os(k,W)||!Os(Z,le):!0}function Wu(P,C,k,W){var Z=C.state;typeof C.componentWillReceiveProps=="function"&&C.componentWillReceiveProps(k,W),typeof C.UNSAFE_componentWillReceiveProps=="function"&&C.UNSAFE_componentWillReceiveProps(k,W),C.state!==Z&&(P=A(P)||"Component",Aft.has(P)||(Aft.add(P),console.error("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",P)),n4e.enqueueReplaceState(C,C.state,null))}function Lh(P,C){var k=C;if("ref"in C){k={};for(var W in C)W!=="ref"&&(k[W]=C[W])}if(P=P.defaultProps){k===C&&(k=Lr({},k));for(var Z in P)k[Z]===void 0&&(k[Z]=P[Z])}return k}function U5(P){o4e(P),console.warn(`%s
|
|
126
|
+
<%s>%s</%s>`,k,C,k))}function Tf(P){function C(Mt,Et){if(P){var Ft=Mt.deletions;Ft===null?(Mt.deletions=[Et],Mt.flags|=16):Ft.push(Et)}}function k(Mt,Et){if(!P)return null;for(;Et!==null;)C(Mt,Et),Et=Et.sibling;return null}function W(Mt){for(var Et=new Map;Mt!==null;)Mt.key!==null?Et.set(Mt.key,Mt):Et.set(Mt.index,Mt),Mt=Mt.sibling;return Et}function Z(Mt,Et){return Mt=Th(Mt,Et),Mt.index=0,Mt.sibling=null,Mt}function le(Mt,Et,Ft){return Mt.index=Ft,P?(Ft=Mt.alternate,Ft!==null?(Ft=Ft.index,Ft<Et?(Mt.flags|=67108866,Et):Ft):(Mt.flags|=67108866,Et)):(Mt.flags|=1048576,Et)}function Le(Mt){return P&&Mt.alternate===null&&(Mt.flags|=67108866),Mt}function qe(Mt,Et,Ft,Rn){return Et===null||Et.tag!==6?(Et=Hl(Ft,Mt.mode,Rn),Et.return=Mt,Et._debugOwner=Mt,Et._debugTask=Mt._debugTask,Et._debugInfo=Ns,Et):(Et=Z(Et,Ft),Et.return=Mt,Et._debugInfo=Ns,Et)}function dt(Mt,Et,Ft,Rn){var Po=Ft.type;return Po===Di?(Et=mn(Mt,Et,Ft.props.children,Rn,Ft.key),kc(Ft,Et,Mt),Et):Et!==null&&(Et.elementType===Po||b1(Et,Ft)||typeof Po=="object"&&Po!==null&&Po.$$typeof===k_&&f7(Po)===Et.type)?(Et=Z(Et,Ft.props),$d(Et,Ft),Et.return=Mt,Et._debugOwner=Ft._owner,Et._debugInfo=Ns,Et):(Et=P1(Ft,Mt.mode,Rn),$d(Et,Ft),Et.return=Mt,Et._debugInfo=Ns,Et)}function yt(Mt,Et,Ft,Rn){return Et===null||Et.tag!==4||Et.stateNode.containerInfo!==Ft.containerInfo||Et.stateNode.implementation!==Ft.implementation?(Et=v1(Ft,Mt.mode,Rn),Et.return=Mt,Et._debugInfo=Ns,Et):(Et=Z(Et,Ft.children||[]),Et.return=Mt,Et._debugInfo=Ns,Et)}function mn(Mt,Et,Ft,Rn,Po){return Et===null||Et.tag!==7?(Et=dp(Ft,Mt.mode,Rn,Po),Et.return=Mt,Et._debugOwner=Mt,Et._debugTask=Mt._debugTask,Et._debugInfo=Ns,Et):(Et=Z(Et,Ft),Et.return=Mt,Et._debugInfo=Ns,Et)}function vn(Mt,Et,Ft){if(typeof Et=="string"&&Et!==""||typeof Et=="number"||typeof Et=="bigint")return Et=Hl(""+Et,Mt.mode,Ft),Et.return=Mt,Et._debugOwner=Mt,Et._debugTask=Mt._debugTask,Et._debugInfo=Ns,Et;if(typeof Et=="object"&&Et!==null){switch(Et.$$typeof){case Cu:return Ft=P1(Et,Mt.mode,Ft),$d(Ft,Et),Ft.return=Mt,Mt=ps(Et._debugInfo),Ft._debugInfo=Ns,Ns=Mt,Ft;case Vf:return Et=v1(Et,Mt.mode,Ft),Et.return=Mt,Et._debugInfo=Ns,Et;case k_:var Rn=ps(Et._debugInfo);return Et=f7(Et),Mt=vn(Mt,Et,Ft),Ns=Rn,Mt}if(gi(Et)||M(Et))return Ft=dp(Et,Mt.mode,Ft,null),Ft.return=Mt,Ft._debugOwner=Mt,Ft._debugTask=Mt._debugTask,Mt=ps(Et._debugInfo),Ft._debugInfo=Ns,Ns=Mt,Ft;if(typeof Et.then=="function")return Rn=ps(Et._debugInfo),Mt=vn(Mt,L0(Et),Ft),Ns=Rn,Mt;if(Et.$$typeof===fs)return vn(Mt,C1(Mt,Et),Ft);jr(Mt,Et)}return typeof Et=="function"&&Vs(Mt,Et),typeof Et=="symbol"&&Yi(Mt,Et),null}function _n(Mt,Et,Ft,Rn){var Po=Et!==null?Et.key:null;if(typeof Ft=="string"&&Ft!==""||typeof Ft=="number"||typeof Ft=="bigint")return Po!==null?null:qe(Mt,Et,""+Ft,Rn);if(typeof Ft=="object"&&Ft!==null){switch(Ft.$$typeof){case Cu:return Ft.key===Po?(Po=ps(Ft._debugInfo),Mt=dt(Mt,Et,Ft,Rn),Ns=Po,Mt):null;case Vf:return Ft.key===Po?yt(Mt,Et,Ft,Rn):null;case k_:return Po=ps(Ft._debugInfo),Ft=f7(Ft),Mt=_n(Mt,Et,Ft,Rn),Ns=Po,Mt}if(gi(Ft)||M(Ft))return Po!==null?null:(Po=ps(Ft._debugInfo),Mt=mn(Mt,Et,Ft,Rn,null),Ns=Po,Mt);if(typeof Ft.then=="function")return Po=ps(Ft._debugInfo),Mt=_n(Mt,Et,L0(Ft),Rn),Ns=Po,Mt;if(Ft.$$typeof===fs)return _n(Mt,Et,C1(Mt,Ft),Rn);jr(Mt,Ft)}return typeof Ft=="function"&&Vs(Mt,Ft),typeof Ft=="symbol"&&Yi(Mt,Ft),null}function Dn(Mt,Et,Ft,Rn,Po){if(typeof Rn=="string"&&Rn!==""||typeof Rn=="number"||typeof Rn=="bigint")return Mt=Mt.get(Ft)||null,qe(Et,Mt,""+Rn,Po);if(typeof Rn=="object"&&Rn!==null){switch(Rn.$$typeof){case Cu:return Ft=Mt.get(Rn.key===null?Ft:Rn.key)||null,Mt=ps(Rn._debugInfo),Et=dt(Et,Ft,Rn,Po),Ns=Mt,Et;case Vf:return Mt=Mt.get(Rn.key===null?Ft:Rn.key)||null,yt(Et,Mt,Rn,Po);case k_:var ls=ps(Rn._debugInfo);return Rn=f7(Rn),Et=Dn(Mt,Et,Ft,Rn,Po),Ns=ls,Et}if(gi(Rn)||M(Rn))return Ft=Mt.get(Ft)||null,Mt=ps(Rn._debugInfo),Et=mn(Et,Ft,Rn,Po,null),Ns=Mt,Et;if(typeof Rn.then=="function")return ls=ps(Rn._debugInfo),Et=Dn(Mt,Et,Ft,L0(Rn),Po),Ns=ls,Et;if(Rn.$$typeof===fs)return Dn(Mt,Et,Ft,C1(Et,Rn),Po);jr(Et,Rn)}return typeof Rn=="function"&&Vs(Et,Rn),typeof Rn=="symbol"&&Yi(Et,Rn),null}function dr(Mt,Et,Ft,Rn){if(typeof Ft!="object"||Ft===null)return Rn;switch(Ft.$$typeof){case Cu:case Vf:c(Mt,Et,Ft);var Po=Ft.key;if(typeof Po!="string")break;if(Rn===null){Rn=new Set,Rn.add(Po);break}if(!Rn.has(Po)){Rn.add(Po);break}Zt(Et,function(){console.error("Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.",Po)});break;case k_:Ft=f7(Ft),dr(Mt,Et,Ft,Rn)}return Rn}function Ni(Mt,Et,Ft,Rn){for(var Po=null,ls=null,hr=null,us=Et,gs=Et=0,Y0=null;us!==null&&gs<Ft.length;gs++){us.index>gs?(Y0=us,us=null):Y0=us.sibling;var ih=_n(Mt,us,Ft[gs],Rn);if(ih===null){us===null&&(us=Y0);break}Po=dr(Mt,ih,Ft[gs],Po),P&&us&&ih.alternate===null&&C(Mt,us),Et=le(ih,Et,gs),hr===null?ls=ih:hr.sibling=ih,hr=ih,us=Y0}if(gs===Ft.length)return k(Mt,us),ha&&g_(Mt,gs),ls;if(us===null){for(;gs<Ft.length;gs++)us=vn(Mt,Ft[gs],Rn),us!==null&&(Po=dr(Mt,us,Ft[gs],Po),Et=le(us,Et,gs),hr===null?ls=us:hr.sibling=us,hr=us);return ha&&g_(Mt,gs),ls}for(us=W(us);gs<Ft.length;gs++)Y0=Dn(us,Mt,gs,Ft[gs],Rn),Y0!==null&&(Po=dr(Mt,Y0,Ft[gs],Po),P&&Y0.alternate!==null&&us.delete(Y0.key===null?gs:Y0.key),Et=le(Y0,Et,gs),hr===null?ls=Y0:hr.sibling=Y0,hr=Y0);return P&&us.forEach(function(Mb){return C(Mt,Mb)}),ha&&g_(Mt,gs),ls}function y0(Mt,Et,Ft,Rn){if(Ft==null)throw Error("An iterable object provided no iterator.");for(var Po=null,ls=null,hr=Et,us=Et=0,gs=null,Y0=null,ih=Ft.next();hr!==null&&!ih.done;us++,ih=Ft.next()){hr.index>us?(gs=hr,hr=null):gs=hr.sibling;var Mb=_n(Mt,hr,ih.value,Rn);if(Mb===null){hr===null&&(hr=gs);break}Y0=dr(Mt,Mb,ih.value,Y0),P&&hr&&Mb.alternate===null&&C(Mt,hr),Et=le(Mb,Et,us),ls===null?Po=Mb:ls.sibling=Mb,ls=Mb,hr=gs}if(ih.done)return k(Mt,hr),ha&&g_(Mt,us),Po;if(hr===null){for(;!ih.done;us++,ih=Ft.next())hr=vn(Mt,ih.value,Rn),hr!==null&&(Y0=dr(Mt,hr,ih.value,Y0),Et=le(hr,Et,us),ls===null?Po=hr:ls.sibling=hr,ls=hr);return ha&&g_(Mt,us),Po}for(hr=W(hr);!ih.done;us++,ih=Ft.next())gs=Dn(hr,Mt,us,ih.value,Rn),gs!==null&&(Y0=dr(Mt,gs,ih.value,Y0),P&&gs.alternate!==null&&hr.delete(gs.key===null?us:gs.key),Et=le(gs,Et,us),ls===null?Po=gs:ls.sibling=gs,ls=gs);return P&&hr.forEach(function(Oro){return C(Mt,Oro)}),ha&&g_(Mt,us),Po}function ma(Mt,Et,Ft,Rn){if(typeof Ft=="object"&&Ft!==null&&Ft.type===Di&&Ft.key===null&&(kc(Ft,null,Mt),Ft=Ft.props.children),typeof Ft=="object"&&Ft!==null){switch(Ft.$$typeof){case Cu:var Po=ps(Ft._debugInfo);e:{for(var ls=Ft.key;Et!==null;){if(Et.key===ls){if(ls=Ft.type,ls===Di){if(Et.tag===7){k(Mt,Et.sibling),Rn=Z(Et,Ft.props.children),Rn.return=Mt,Rn._debugOwner=Ft._owner,Rn._debugInfo=Ns,kc(Ft,Rn,Mt),Mt=Rn;break e}}else if(Et.elementType===ls||b1(Et,Ft)||typeof ls=="object"&&ls!==null&&ls.$$typeof===k_&&f7(ls)===Et.type){k(Mt,Et.sibling),Rn=Z(Et,Ft.props),$d(Rn,Ft),Rn.return=Mt,Rn._debugOwner=Ft._owner,Rn._debugInfo=Ns,Mt=Rn;break e}k(Mt,Et);break}else C(Mt,Et);Et=Et.sibling}Ft.type===Di?(Rn=dp(Ft.props.children,Mt.mode,Rn,Ft.key),Rn.return=Mt,Rn._debugOwner=Mt,Rn._debugTask=Mt._debugTask,Rn._debugInfo=Ns,kc(Ft,Rn,Mt),Mt=Rn):(Rn=P1(Ft,Mt.mode,Rn),$d(Rn,Ft),Rn.return=Mt,Rn._debugInfo=Ns,Mt=Rn)}return Mt=Le(Mt),Ns=Po,Mt;case Vf:e:{for(Po=Ft,Ft=Po.key;Et!==null;){if(Et.key===Ft)if(Et.tag===4&&Et.stateNode.containerInfo===Po.containerInfo&&Et.stateNode.implementation===Po.implementation){k(Mt,Et.sibling),Rn=Z(Et,Po.children||[]),Rn.return=Mt,Mt=Rn;break e}else{k(Mt,Et);break}else C(Mt,Et);Et=Et.sibling}Rn=v1(Po,Mt.mode,Rn),Rn.return=Mt,Mt=Rn}return Le(Mt);case k_:return Po=ps(Ft._debugInfo),Ft=f7(Ft),Mt=ma(Mt,Et,Ft,Rn),Ns=Po,Mt}if(gi(Ft))return Po=ps(Ft._debugInfo),Mt=Ni(Mt,Et,Ft,Rn),Ns=Po,Mt;if(M(Ft)){if(Po=ps(Ft._debugInfo),ls=M(Ft),typeof ls!="function")throw Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");var hr=ls.call(Ft);return hr===Ft?(Mt.tag!==0||Object.prototype.toString.call(Mt.type)!=="[object GeneratorFunction]"||Object.prototype.toString.call(hr)!=="[object Generator]")&&(Cft||console.error("Using Iterators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. You can also use an Iterable that can iterate multiple times over the same items."),Cft=!0):Ft.entries!==ls||t4e||(console.error("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),t4e=!0),Mt=y0(Mt,Et,hr,Rn),Ns=Po,Mt}if(typeof Ft.then=="function")return Po=ps(Ft._debugInfo),Mt=ma(Mt,Et,L0(Ft),Rn),Ns=Po,Mt;if(Ft.$$typeof===fs)return ma(Mt,Et,C1(Mt,Ft),Rn);jr(Mt,Ft)}return typeof Ft=="string"&&Ft!==""||typeof Ft=="number"||typeof Ft=="bigint"?(Po=""+Ft,Et!==null&&Et.tag===6?(k(Mt,Et.sibling),Rn=Z(Et,Po),Rn.return=Mt,Mt=Rn):(k(Mt,Et),Rn=Hl(Po,Mt.mode,Rn),Rn.return=Mt,Rn._debugOwner=Mt,Rn._debugTask=Mt._debugTask,Rn._debugInfo=Ns,Mt=Rn),Le(Mt)):(typeof Ft=="function"&&Vs(Mt,Ft),typeof Ft=="symbol"&&Yi(Mt,Ft),k(Mt,Et))}return function(Mt,Et,Ft,Rn){var Po=Ns;Ns=null;try{$I=0;var ls=ma(Mt,Et,Ft,Rn);return xD=null,ls}catch(Y0){if(Y0===ye||Y0===pt)throw Y0;var hr=m(29,Y0,null,Mt.mode);hr.lanes=Rn,hr.return=Mt;var us=hr._debugInfo=Ns;if(hr._debugOwner=Mt._debugOwner,hr._debugTask=Mt._debugTask,us!=null){for(var gs=us.length-1;0<=gs;gs--)if(typeof us[gs].stack=="string"){hr._debugOwner=us[gs],hr._debugTask=us[gs].debugTask;break}}return hr}finally{Ns=Po}}}function Ll(P){var C=P.alternate;O(Xm,Xm.current&yD,P),O(t4,P,P),B3===null&&(C===null||qr.current!==null||C.memoizedState!==null)&&(B3=P)}function O0(P){if(P.tag===22){if(O(Xm,Xm.current,P),O(t4,P,P),B3===null){var C=P.alternate;C!==null&&C.memoizedState!==null&&(B3=P)}}else Hh(P)}function Hh(P){O(Xm,Xm.current,P),O(t4,t4.current,P)}function s0(P){H(t4,P),B3===P&&(B3=null),H(Xm,P)}function $u(P){for(var C=P;C!==null;){if(C.tag===13){var k=C.memoizedState;if(k!==null&&(k=k.dehydrated,k===null||k.data===vb||cs(k)))return C}else if(C.tag===19&&C.memoizedProps.revealOrder!==void 0){if((C.flags&128)!==0)return C}else if(C.child!==null){C.child.return=C,C=C.child;continue}if(C===P)break;for(;C.sibling===null;){if(C.return===null||C.return===P)return null;C=C.return}C.sibling.return=C.return,C=C.sibling}return null}function yu(P){if(P!==null&&typeof P!="function"){var C=String(P);Bft.has(C)||(Bft.add(C),console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",P))}}function ii(P,C,k,W){var Z=P.memoizedState,le=k(W,Z);if(P.mode&o_){Ce(!0);try{le=k(W,Z)}finally{Ce(!1)}}le===void 0&&(C=w(C)||"Component",Ift.has(C)||(Ift.add(C),console.error("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",C))),Z=le==null?Z:Lr({},Z,le),P.memoizedState=Z,P.lanes===0&&(P.updateQueue.baseState=Z)}function Ih(P,C,k,W,Z,le,Le){var qe=P.stateNode;if(typeof qe.shouldComponentUpdate=="function"){if(k=qe.shouldComponentUpdate(W,le,Le),P.mode&o_){Ce(!0);try{k=qe.shouldComponentUpdate(W,le,Le)}finally{Ce(!1)}}return k===void 0&&console.error("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",w(C)||"Component"),k}return C.prototype&&C.prototype.isPureReactComponent?!Os(k,W)||!Os(Z,le):!0}function Wu(P,C,k,W){var Z=C.state;typeof C.componentWillReceiveProps=="function"&&C.componentWillReceiveProps(k,W),typeof C.UNSAFE_componentWillReceiveProps=="function"&&C.UNSAFE_componentWillReceiveProps(k,W),C.state!==Z&&(P=A(P)||"Component",Aft.has(P)||(Aft.add(P),console.error("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",P)),n4e.enqueueReplaceState(C,C.state,null))}function Lh(P,C){var k=C;if("ref"in C){k={};for(var W in C)W!=="ref"&&(k[W]=C[W])}if(P=P.defaultProps){k===C&&(k=Lr({},k));for(var Z in P)k[Z]===void 0&&(k[Z]=P[Z])}return k}function U5(P){o4e(P),console.warn(`%s
|
|
127
127
|
|
|
128
128
|
%s
|
|
129
129
|
`,bD?"An error occurred in the <"+bD+"> component.":"An error occurred in one of your React components.",`Consider adding an error boundary to your tree to customize error handling behavior.
|
|
@@ -132,12 +132,12 @@ Visit https://react.dev/link/error-boundaries to learn more about error boundari
|
|
|
132
132
|
%s
|
|
133
133
|
|
|
134
134
|
%s
|
|
135
|
-
`,P,C,k].slice(0),typeof P[0]=="string"?P.splice(0,1,x1t+P[0],g1t,Vq+W+Vq,y1t):P.splice(0,0,x1t,g1t,Vq+W+Vq,y1t),P.unshift(console),W=
|
|
135
|
+
`,P,C,k].slice(0),typeof P[0]=="string"?P.splice(0,1,x1t+P[0],g1t,Vq+W+Vq,y1t):P.splice(0,0,x1t,g1t,Vq+W+Vq,y1t),P.unshift(console),W=Iro.apply(console.error,P),W()}else console.error(`%o
|
|
136
136
|
|
|
137
137
|
%s
|
|
138
138
|
|
|
139
139
|
%s
|
|
140
|
-
`,P,C,k)}function Wd(P){o4e(P)}function z2(P,C){try{bD=C.source?A(C.source):null,r4e=null;var k=C.value;if(an.actQueue!==null)an.thrownErrors.push(k);else{var W=P.onUncaughtError;W(k,{componentStack:C.stack})}}catch(Z){setTimeout(function(){throw Z})}}function eg(P,C,k){try{bD=k.source?A(k.source):null,r4e=A(C);var W=P.onCaughtError;W(k.value,{componentStack:k.stack,errorBoundary:C.tag===1?C.stateNode:null})}catch(Z){setTimeout(function(){throw Z})}}function F0(P,C,k){return k=P_(k),k.tag=At,k.payload={element:null},k.callback=function(){Zt(C.source,z2,P,C)},k}function xc(P){return P=P_(P),P.tag=At,P}function V2(P,C,k,W){var Z=k.type.getDerivedStateFromError;if(typeof Z=="function"){var le=W.value;P.payload=function(){return Z(le)},P.callback=function(){gm(k),Zt(W.source,eg,C,k,W)}}var Le=k.stateNode;Le!==null&&typeof Le.componentDidCatch=="function"&&(P.callback=function(){gm(k),Zt(W.source,eg,C,k,W),typeof Z!="function"&&(b7===null?b7=new Set([this]):b7.add(this)),
|
|
140
|
+
`,P,C,k)}function Wd(P){o4e(P)}function z2(P,C){try{bD=C.source?A(C.source):null,r4e=null;var k=C.value;if(an.actQueue!==null)an.thrownErrors.push(k);else{var W=P.onUncaughtError;W(k,{componentStack:C.stack})}}catch(Z){setTimeout(function(){throw Z})}}function eg(P,C,k){try{bD=k.source?A(k.source):null,r4e=A(C);var W=P.onCaughtError;W(k.value,{componentStack:k.stack,errorBoundary:C.tag===1?C.stateNode:null})}catch(Z){setTimeout(function(){throw Z})}}function F0(P,C,k){return k=P_(k),k.tag=At,k.payload={element:null},k.callback=function(){Zt(C.source,z2,P,C)},k}function xc(P){return P=P_(P),P.tag=At,P}function V2(P,C,k,W){var Z=k.type.getDerivedStateFromError;if(typeof Z=="function"){var le=W.value;P.payload=function(){return Z(le)},P.callback=function(){gm(k),Zt(W.source,eg,C,k,W)}}var Le=k.stateNode;Le!==null&&typeof Le.componentDidCatch=="function"&&(P.callback=function(){gm(k),Zt(W.source,eg,C,k,W),typeof Z!="function"&&(b7===null?b7=new Set([this]):b7.add(this)),dro(this,W),typeof Z=="function"||(k.lanes&2)===0&&console.error("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",A(k)||"Unknown")})}function A1(P,C,k,W,Z){if(k.flags|=32768,qa&&Ic(P,Z),W!==null&&typeof W=="object"&&typeof W.then=="function"){if(C=k.alternate,C!==null&&Fs(C,k,Z,!0),ha&&(Q4=!0),k=t4.current,k!==null){switch(k.tag){case 13:return B3===null?sg():k.alternate===null&&Pd===Pb&&(Pd=c4e),k.flags&=-257,k.flags|=65536,k.lanes=Z,W===Qt?k.flags|=16384:(C=k.updateQueue,C===null?k.updateQueue=new Set([W]):C.add(W),D_(P,W,Z)),!1;case 22:return k.flags|=65536,W===Qt?k.flags|=16384:(C=k.updateQueue,C===null?(C={transitions:null,markerInstances:null,retryQueue:new Set([W])},k.updateQueue=C):(k=C.retryQueue,k===null?C.retryQueue=new Set([W]):k.add(W)),D_(P,W,Z)),!1}throw Error("Unexpected Suspense handler tag ("+k.tag+"). This is a bug in React.")}return D_(P,W,Z),sg(),!1}if(ha)return Q4=!0,C=t4.current,C!==null?((C.flags&65536)===0&&(C.flags|=256),C.flags|=65536,C.lanes=Z,W!==I3&&df(Lu(Error("There was an error while hydrating but React was able to recover by instead client rendering from the nearest Suspense boundary.",{cause:W}),k))):(W!==I3&&df(Lu(Error("There was an error while hydrating but React was able to recover by instead client rendering the entire root.",{cause:W}),k)),P=P.current.alternate,P.flags|=65536,Z&=-Z,P.lanes|=Z,W=Lu(W,k),Z=F0(P.stateNode,W,Z),Q_(P,Z),Pd!==vC&&(Pd=CD)),!1;var le=Lu(Error("There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.",{cause:W}),k);if(JI===null?JI=[le]:JI.push(le),Pd!==vC&&(Pd=CD),C===null)return!0;W=Lu(W,k),k=C;do{switch(k.tag){case 3:return k.flags|=65536,P=Z&-Z,k.lanes|=P,P=F0(k.stateNode,W,P),Q_(k,P),!1;case 1:if(C=k.type,le=k.stateNode,(k.flags&128)===0&&(typeof C.getDerivedStateFromError=="function"||le!==null&&typeof le.componentDidCatch=="function"&&(b7===null||!b7.has(le))))return k.flags|=65536,Z&=-Z,k.lanes|=Z,Z=xc(Z),V2(Z,P,k,W),Q_(k,Z),!1}k=k.return}while(k!==null);return!1}function Gc(P,C,k,W){C.child=P===null?Eft(C,null,k,W):gD(C,P.child,k,W)}function $2(P,C,k,W,Z){k=k.render;var le=C.ref;if("ref"in W){var Le={};for(var qe in W)qe!=="ref"&&(Le[qe]=W[qe])}else Le=W;return Bu(C),Me(C),W=Pm(P,C,k,Le,le,Z),qe=ed(),xe(),P!==null&&!Wp?(zs(P,C,Z),Tm(P,C,Z)):(ha&&qe&&C2(C),C.flags|=1,Gc(P,C,W,Z),C.child)}function wa(P,C,k,W,Z){if(P===null){var le=k.type;return typeof le=="function"&&!v2(le)&&le.defaultProps===void 0&&k.compare===null?(k=N0(le),C.tag=15,C.type=k,Ud(C,le),Oh(P,C,k,W,Z)):(P=S2(k.type,null,W,C,C.mode,Z),P.ref=C.ref,P.return=C,C.child=P)}if(le=P.child,!yy(P,Z)){var Le=le.memoizedProps;if(k=k.compare,k=k!==null?k:Os,k(Le,W)&&P.ref===C.ref)return Tm(P,C,Z)}return C.flags|=1,P=Th(le,W),P.ref=C.ref,P.return=C,C.child=P}function Oh(P,C,k,W,Z){if(P!==null){var le=P.memoizedProps;if(Os(le,W)&&P.ref===C.ref&&C.type===P.type)if(Wp=!1,C.pendingProps=W=le,yy(P,Z))(P.flags&131072)!==0&&(Wp=!0);else return C.lanes=P.lanes,Tm(P,C,Z)}return R1(P,C,k,W,Z)}function gc(P,C,k){var W=C.pendingProps,Z=W.children,le=P!==null?P.memoizedState:null;if(W.mode==="hidden"){if((C.flags&128)!==0){if(W=le!==null?le.baseLanes|k:k,P!==null){for(Z=C.child=P.child,le=0;Z!==null;)le=le|Z.lanes|Z.childLanes,Z=Z.sibling;C.childLanes=le&~W}else C.childLanes=0,C.child=null;return my(P,C,W,k)}if((k&536870912)!==0)C.memoizedState={baseLanes:0,cachePool:null},P!==null&&w2(C,le!==null?le.cachePool:null),le!==null?Uc(C,le):I0(C),O0(C);else return C.lanes=C.childLanes=536870912,my(P,C,le!==null?le.baseLanes|k:k,k)}else le!==null?(w2(C,le.cachePool),Uc(C,le),Hh(C),C.memoizedState=null):(P!==null&&w2(C,null),I0(C),Hh(C));return Gc(P,C,Z,k),C.child}function my(P,C,k,W){var Z=Jx();return Z=Z===null?null:{parent:r_._currentValue,pool:Z},C.memoizedState={baseLanes:k,cachePool:Z},P!==null&&w2(C,null),I0(C),O0(C),P!==null&&Fs(P,C,W,!0),null}function tg(P,C){var k=C.ref;if(k===null)P!==null&&P.ref!==null&&(C.flags|=4194816);else{if(typeof k!="function"&&typeof k!="object")throw Error("Expected ref to be a function, an object returned by React.createRef(), or undefined/null.");(P===null||P.ref!==k)&&(C.flags|=4194816)}}function R1(P,C,k,W,Z){if(k.prototype&&typeof k.prototype.render=="function"){var le=w(k)||"Unknown";Vft[le]||(console.error("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",le,le),Vft[le]=!0)}return C.mode&o_&&vg.recordLegacyContextWarning(C,null),P===null&&(Ud(C,C.type),k.contextTypes&&(le=w(k)||"Unknown",Wft[le]||(Wft[le]=!0,console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with React.useContext() instead. (https://react.dev/link/legacy-context)",le)))),Bu(C),Me(C),k=Pm(P,C,k,W,void 0,Z),W=ed(),xe(),P!==null&&!Wp?(zs(P,C,Z),Tm(P,C,Z)):(ha&&W&&C2(C),C.flags|=1,Gc(P,C,k,Z),C.child)}function Mm(P,C,k,W,Z,le){return Bu(C),Me(C),yb=-1,VI=P!==null&&P.type!==C.type,C.updateQueue=null,k=xf(C,W,k,Z),o0(P,C),W=ed(),xe(),P!==null&&!Wp?(zs(P,C,le),Tm(P,C,le)):(ha&&W&&C2(C),C.flags|=1,Gc(P,C,k,le),C.child)}function W2(P,C,k,W,Z){switch(a(C)){case!1:var le=C.stateNode,Le=new C.type(C.memoizedProps,le.context).state;le.updater.enqueueSetState(le,Le,null);break;case!0:C.flags|=128,C.flags|=65536,le=Error("Simulated error coming from DevTools");var qe=Z&-Z;if(C.lanes|=qe,Le=g0,Le===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");qe=xc(qe),V2(qe,Le,C,Lu(le,C)),Q_(C,qe)}if(Bu(C),C.stateNode===null){if(Le=Wm,le=k.contextType,"contextType"in k&&le!==null&&(le===void 0||le.$$typeof!==fs)&&!Fft.has(k)&&(Fft.add(k),qe=le===void 0?" However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.":typeof le!="object"?" However, it is set to a "+typeof le+".":le.$$typeof===Zu?" Did you accidentally pass the Context.Consumer instead?":" However, it is set to an object with keys {"+Object.keys(le).join(", ")+"}.",console.error("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",w(k)||"Component",qe)),typeof le=="object"&&le!==null&&(Le=Ps(le)),le=new k(W,Le),C.mode&o_){Ce(!0);try{le=new k(W,Le)}finally{Ce(!1)}}if(Le=C.memoizedState=le.state!==null&&le.state!==void 0?le.state:null,le.updater=n4e,C.stateNode=le,le._reactInternals=C,le._reactInternalInstance=Dft,typeof k.getDerivedStateFromProps=="function"&&Le===null&&(Le=w(k)||"Component",Rft.has(Le)||(Rft.add(Le),console.error("`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",Le,le.state===null?"null":"undefined",Le))),typeof k.getDerivedStateFromProps=="function"||typeof le.getSnapshotBeforeUpdate=="function"){var dt=qe=Le=null;if(typeof le.componentWillMount=="function"&&le.componentWillMount.__suppressDeprecationWarning!==!0?Le="componentWillMount":typeof le.UNSAFE_componentWillMount=="function"&&(Le="UNSAFE_componentWillMount"),typeof le.componentWillReceiveProps=="function"&&le.componentWillReceiveProps.__suppressDeprecationWarning!==!0?qe="componentWillReceiveProps":typeof le.UNSAFE_componentWillReceiveProps=="function"&&(qe="UNSAFE_componentWillReceiveProps"),typeof le.componentWillUpdate=="function"&&le.componentWillUpdate.__suppressDeprecationWarning!==!0?dt="componentWillUpdate":typeof le.UNSAFE_componentWillUpdate=="function"&&(dt="UNSAFE_componentWillUpdate"),Le!==null||qe!==null||dt!==null){le=w(k)||"Component";var yt=typeof k.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";Nft.has(le)||(Nft.add(le),console.error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
|
|
141
141
|
|
|
142
142
|
%s uses %s but also contains the following legacy lifecycles:%s%s%s
|
|
143
143
|
|
|
@@ -146,7 +146,7 @@ https://react.dev/link/unsafe-component-lifecycles`,le,yt,Le!==null?`
|
|
|
146
146
|
`+Le:"",qe!==null?`
|
|
147
147
|
`+qe:"",dt!==null?`
|
|
148
148
|
`+dt:""))}}le=C.stateNode,Le=w(k)||"Component",le.render||(k.prototype&&typeof k.prototype.render=="function"?console.error("No `render` method found on the %s instance: did you accidentally return an object from the constructor?",Le):console.error("No `render` method found on the %s instance: you may have forgotten to define `render`.",Le)),!le.getInitialState||le.getInitialState.isReactClassApproved||le.state||console.error("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",Le),le.getDefaultProps&&!le.getDefaultProps.isReactClassApproved&&console.error("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",Le),le.contextType&&console.error("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",Le),k.childContextTypes&&!Oft.has(k)&&(Oft.add(k),console.error("%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)",Le)),k.contextTypes&&!Lft.has(k)&&(Lft.add(k),console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)",Le)),typeof le.componentShouldUpdate=="function"&&console.error("%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",Le),k.prototype&&k.prototype.isPureReactComponent&&typeof le.shouldComponentUpdate<"u"&&console.error("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",w(k)||"A pure component"),typeof le.componentDidUnmount=="function"&&console.error("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",Le),typeof le.componentDidReceiveProps=="function"&&console.error("%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",Le),typeof le.componentWillRecieveProps=="function"&&console.error("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",Le),typeof le.UNSAFE_componentWillRecieveProps=="function"&&console.error("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",Le),qe=le.props!==W,le.props!==void 0&&qe&&console.error("When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",Le),le.defaultProps&&console.error("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",Le,Le),typeof le.getSnapshotBeforeUpdate!="function"||typeof le.componentDidUpdate=="function"||kft.has(k)||(kft.add(k),console.error("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",w(k))),typeof le.getDerivedStateFromProps=="function"&&console.error("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",Le),typeof le.getDerivedStateFromError=="function"&&console.error("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",Le),typeof k.getSnapshotBeforeUpdate=="function"&&console.error("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",Le),(qe=le.state)&&(typeof qe!="object"||gi(qe))&&console.error("%s.state: must be set to an object or null",Le),typeof le.getChildContext=="function"&&typeof k.childContextTypes!="object"&&console.error("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",Le),le=C.stateNode,le.props=W,le.state=C.memoizedState,le.refs={},Wc(C),Le=k.contextType,le.context=typeof Le=="object"&&Le!==null?Ps(Le):Wm,le.state===W&&(Le=w(k)||"Component",Hft.has(Le)||(Hft.add(Le),console.error("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",Le))),C.mode&o_&&vg.recordLegacyContextWarning(C,le),vg.recordUnsafeLifecycleWarnings(C,le),le.state=C.memoizedState,Le=k.getDerivedStateFromProps,typeof Le=="function"&&(ii(C,k,Le,W),le.state=C.memoizedState),typeof k.getDerivedStateFromProps=="function"||typeof le.getSnapshotBeforeUpdate=="function"||typeof le.UNSAFE_componentWillMount!="function"&&typeof le.componentWillMount!="function"||(Le=le.state,typeof le.componentWillMount=="function"&&le.componentWillMount(),typeof le.UNSAFE_componentWillMount=="function"&&le.UNSAFE_componentWillMount(),Le!==le.state&&(console.error("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",A(C)||"Component"),n4e.enqueueReplaceState(le,le.state,null)),mu(C,W,le,Z),H0(),le.state=C.memoizedState),typeof le.componentDidMount=="function"&&(C.flags|=4194308),(C.mode&Jf)!==Ba&&(C.flags|=134217728),le=!0}else if(P===null){le=C.stateNode;var mn=C.memoizedProps;qe=Lh(k,mn),le.props=qe;var vn=le.context;dt=k.contextType,Le=Wm,typeof dt=="object"&&dt!==null&&(Le=Ps(dt)),yt=k.getDerivedStateFromProps,dt=typeof yt=="function"||typeof le.getSnapshotBeforeUpdate=="function",mn=C.pendingProps!==mn,dt||typeof le.UNSAFE_componentWillReceiveProps!="function"&&typeof le.componentWillReceiveProps!="function"||(mn||vn!==Le)&&Wu(C,le,W,Le),Xt=!1;var _n=C.memoizedState;le.state=_n,mu(C,W,le,Z),H0(),vn=C.memoizedState,mn||_n!==vn||Xt?(typeof yt=="function"&&(ii(C,k,yt,W),vn=C.memoizedState),(qe=Xt||Ih(C,k,qe,W,_n,vn,Le))?(dt||typeof le.UNSAFE_componentWillMount!="function"&&typeof le.componentWillMount!="function"||(typeof le.componentWillMount=="function"&&le.componentWillMount(),typeof le.UNSAFE_componentWillMount=="function"&&le.UNSAFE_componentWillMount()),typeof le.componentDidMount=="function"&&(C.flags|=4194308),(C.mode&Jf)!==Ba&&(C.flags|=134217728)):(typeof le.componentDidMount=="function"&&(C.flags|=4194308),(C.mode&Jf)!==Ba&&(C.flags|=134217728),C.memoizedProps=W,C.memoizedState=vn),le.props=W,le.state=vn,le.context=Le,le=qe):(typeof le.componentDidMount=="function"&&(C.flags|=4194308),(C.mode&Jf)!==Ba&&(C.flags|=134217728),le=!1)}else{le=C.stateNode,ya(P,C),Le=C.memoizedProps,dt=Lh(k,Le),le.props=dt,yt=C.pendingProps,_n=le.context,vn=k.contextType,qe=Wm,typeof vn=="object"&&vn!==null&&(qe=Ps(vn)),mn=k.getDerivedStateFromProps,(vn=typeof mn=="function"||typeof le.getSnapshotBeforeUpdate=="function")||typeof le.UNSAFE_componentWillReceiveProps!="function"&&typeof le.componentWillReceiveProps!="function"||(Le!==yt||_n!==qe)&&Wu(C,le,W,qe),Xt=!1,_n=C.memoizedState,le.state=_n,mu(C,W,le,Z),H0();var Dn=C.memoizedState;Le!==yt||_n!==Dn||Xt||P!==null&&P.dependencies!==null&&Dh(P.dependencies)?(typeof mn=="function"&&(ii(C,k,mn,W),Dn=C.memoizedState),(dt=Xt||Ih(C,k,dt,W,_n,Dn,qe)||P!==null&&P.dependencies!==null&&Dh(P.dependencies))?(vn||typeof le.UNSAFE_componentWillUpdate!="function"&&typeof le.componentWillUpdate!="function"||(typeof le.componentWillUpdate=="function"&&le.componentWillUpdate(W,Dn,qe),typeof le.UNSAFE_componentWillUpdate=="function"&&le.UNSAFE_componentWillUpdate(W,Dn,qe)),typeof le.componentDidUpdate=="function"&&(C.flags|=4),typeof le.getSnapshotBeforeUpdate=="function"&&(C.flags|=1024)):(typeof le.componentDidUpdate!="function"||Le===P.memoizedProps&&_n===P.memoizedState||(C.flags|=4),typeof le.getSnapshotBeforeUpdate!="function"||Le===P.memoizedProps&&_n===P.memoizedState||(C.flags|=1024),C.memoizedProps=W,C.memoizedState=Dn),le.props=W,le.state=Dn,le.context=qe,le=dt):(typeof le.componentDidUpdate!="function"||Le===P.memoizedProps&&_n===P.memoizedState||(C.flags|=4),typeof le.getSnapshotBeforeUpdate!="function"||Le===P.memoizedProps&&_n===P.memoizedState||(C.flags|=1024),le=!1)}if(qe=le,tg(P,C),Le=(C.flags&128)!==0,qe||Le){if(qe=C.stateNode,Ir(C),Le&&typeof k.getDerivedStateFromError!="function")k=null,x0=-1;else{if(Me(C),k=mft(qe),C.mode&o_){Ce(!0);try{mft(qe)}finally{Ce(!1)}}xe()}C.flags|=1,P!==null&&Le?(C.child=gD(C,P.child,null,Z),C.child=gD(C,null,k,Z)):Gc(P,C,k,Z),C.memoizedState=qe.state,P=C.child}else P=Tm(P,C,Z);return Z=C.stateNode,le&&Z.props!==W&&(PD||console.error("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",A(C)||"a component"),PD=!0),P}function k1(P,C,k,W){return Hd(),C.flags|=256,Gc(P,C,k,W),C.child}function Ud(P,C){C&&C.childContextTypes&&console.error(`childContextTypes cannot be defined on a function component.
|
|
149
|
-
%s.childContextTypes = ...`,C.displayName||C.name||"Component"),typeof C.getDerivedStateFromProps=="function"&&(P=w(C)||"Unknown",Uft[P]||(console.error("%s: Function components do not support getDerivedStateFromProps.",P),Uft[P]=!0)),typeof C.contextType=="object"&&C.contextType!==null&&(C=w(C)||"Unknown",$ft[C]||(console.error("%s: Function components do not support contextType.",C),$ft[C]=!0))}function U2(P){return{baseLanes:P,cachePool:_y()}}function py(P,C,k){return P=P!==null?P.childLanes&~k:0,C&&(P|=Xy),P}function fy(P,C,k){var W,Z=C.pendingProps;s(C)&&(C.flags|=128);var le=!1,Le=(C.flags&128)!==0;if((W=Le)||(W=P!==null&&P.memoizedState===null?!1:(Xm.current&WI)!==0),W&&(le=!0,C.flags&=-129),W=(C.flags&32)!==0,C.flags&=-33,P===null){if(ha){if(le?Ll(C):Hh(C),ha){var qe=Tu,dt;if(!(dt=!qe)){e:{var yt=qe;for(dt=Um;yt.nodeType!==8;){if(!dt){dt=null;break e}if(yt=Cr(yt.nextSibling),yt===null){dt=null;break e}}dt=yt}dt!==null?(t0(),C.memoizedState={dehydrated:dt,treeContext:db!==null?{id:K4,overflow:Kf}:null,retryLane:536870912,hydrationErrors:null},yt=m(18,null,null,Ba),yt.stateNode=dt,yt.return=C,C.child=yt,$p=C,Tu=null,dt=!0):dt=!1,dt=!dt}dt&&(z5(C,qe),wh(C))}if(qe=C.memoizedState,qe!==null&&(qe=qe.dehydrated,qe!==null))return cs(qe)?C.lanes=32:C.lanes=536870912,null;s0(C)}return qe=Z.children,Z=Z.fallback,le?(Hh(C),le=C.mode,qe=X2({mode:"hidden",children:qe},le),Z=dp(Z,le,k,null),qe.return=C,Z.return=C,qe.sibling=Z,C.child=qe,le=C.child,le.memoizedState=U2(k),le.childLanes=py(P,W,k),C.memoizedState=s4e,Z):(Ll(C),xy(C,qe))}var mn=P.memoizedState;if(mn!==null&&(qe=mn.dehydrated,qe!==null)){if(Le)C.flags&256?(Ll(C),C.flags&=-257,C=ng(P,C,k)):C.memoizedState!==null?(Hh(C),C.child=P.child,C.flags|=128,C=null):(Hh(C),le=Z.fallback,qe=C.mode,Z=X2({mode:"visible",children:Z.children},qe),le=dp(le,qe,k,null),le.flags|=2,Z.return=C,le.return=C,Z.sibling=le,C.child=Z,gD(C,P.child,null,k),Z=C.child,Z.memoizedState=U2(k),Z.childLanes=py(P,W,k),C.memoizedState=s4e,C=le);else if(Ll(C),ha&&console.error("We should not be hydrating here. This is a bug in React. Please file a bug."),cs(qe)){if(W=qe.nextSibling&&qe.nextSibling.dataset,W){dt=W.dgst;var vn=W.msg;yt=W.stck;var _n=W.cstck}qe=vn,W=dt,Z=yt,dt=le=_n,le=Error(qe||"The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."),le.stack=Z||"",le.digest=W,W=dt===void 0?null:dt,Z={value:le,source:null,stack:W},typeof W=="string"&&J4.set(le,Z),df(Z),C=ng(P,C,k)}else if(Wp||Fs(P,C,k,!1),W=(k&P.childLanes)!==0,Wp||W){if(W=g0,W!==null&&(Z=k&-k,Z=(Z&42)!==0?1:at(Z),Z=(Z&(W.suspendedLanes|k))!==0?0:Z,Z!==0&&Z!==mn.retryLane))throw mn.retryLane=Z,k0(P,Z),Zs(W,P,Z),zft;qe.data===vb||sg(),C=ng(P,C,k)}else qe.data===vb?(C.flags|=192,C.child=P.child,C=null):(P=mn.treeContext,Tu=Cr(qe.nextSibling),$p=C,ha=!0,wu=null,Q4=!1,Z1=null,Um=!1,P!==null&&(t0(),oh[bg++]=K4,oh[bg++]=Kf,oh[bg++]=db,K4=P.id,Kf=P.overflow,db=C),C=xy(C,Z.children),C.flags|=4096);return C}return le?(Hh(C),le=Z.fallback,qe=C.mode,dt=P.child,yt=dt.sibling,Z=Th(dt,{mode:"hidden",children:Z.children}),Z.subtreeFlags=dt.subtreeFlags&65011712,yt!==null?le=Th(yt,le):(le=dp(le,qe,k,null),le.flags|=2),le.return=C,Z.return=C,Z.sibling=le,C.child=Z,Z=le,le=C.child,qe=P.child.memoizedState,qe===null?qe=U2(k):(dt=qe.cachePool,dt!==null?(yt=r_._currentValue,dt=dt.parent!==yt?{parent:yt,pool:yt}:dt):dt=_y(),qe={baseLanes:qe.baseLanes|k,cachePool:dt}),le.memoizedState=qe,le.childLanes=py(P,W,k),C.memoizedState=s4e,Z):(Ll(C),k=P.child,P=k.sibling,k=Th(k,{mode:"visible",children:Z.children}),k.return=C,k.sibling=null,P!==null&&(W=C.deletions,W===null?(C.deletions=[P],C.flags|=16):W.push(P)),C.child=k,C.memoizedState=null,k)}function xy(P,C){return C=X2({mode:"visible",children:C},P.mode),C.return=P,P.child=C}function X2(P,C){return P=m(22,P,null,C),P.lanes=0,P.stateNode={_visibility:Oa,_pendingMarkers:null,_retryCache:null,_transitions:null},P}function ng(P,C,k){return gD(C,P.child,null,k),P=xy(C,C.pendingProps.children),P.flags|=2,C.memoizedState=null,P}function og(P,C,k){P.lanes|=C;var W=P.alternate;W!==null&&(W.lanes|=C),Ks(P.return,C,k)}function z4(P,C){var k=gi(P);return P=!k&&typeof M(P)=="function",k||P?(k=k?"array":"iterable",console.error("A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>",k,C,k),!1):!0}function gy(P,C,k,W,Z){var le=P.memoizedState;le===null?P.memoizedState={isBackwards:C,rendering:null,renderingStartTime:0,last:W,tail:k,tailMode:Z}:(le.isBackwards=C,le.rendering=null,le.renderingStartTime=0,le.last=W,le.tail=k,le.tailMode=Z)}function X5(P,C,k){var W=C.pendingProps,Z=W.revealOrder,le=W.tail;if(W=W.children,Z!==void 0&&Z!=="forwards"&&Z!=="backwards"&&Z!=="together"&&!Xft[Z])if(Xft[Z]=!0,typeof Z=="string")switch(Z.toLowerCase()){case"together":case"forwards":case"backwards":console.error('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',Z,Z.toLowerCase());break;case"forward":case"backward":console.error('"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',Z,Z.toLowerCase());break;default:console.error('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',Z)}else console.error('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',Z);le===void 0||i4e[le]||(le!=="collapsed"&&le!=="hidden"?(i4e[le]=!0,console.error('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "collapsed" or "hidden"?',le)):Z!=="forwards"&&Z!=="backwards"&&(i4e[le]=!0,console.error('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',le)));e:if((Z==="forwards"||Z==="backwards")&&W!==void 0&&W!==null&&W!==!1)if(gi(W)){for(var Le=0;Le<W.length;Le++)if(!z4(W[Le],Le))break e}else if(Le=M(W),typeof Le=="function"){if(Le=Le.call(W))for(var qe=Le.next(),dt=0;!qe.done;qe=Le.next()){if(!z4(qe.value,dt))break e;dt++}}else console.error('A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',Z);if(Gc(P,C,W,k),W=Xm.current,(W&WI)!==0)W=W&yD|WI,C.flags|=128;else{if(P!==null&&(P.flags&128)!==0)e:for(P=C.child;P!==null;){if(P.tag===13)P.memoizedState!==null&&og(P,k,C);else if(P.tag===19)og(P,k,C);else if(P.child!==null){P.child.return=P,P=P.child;continue}if(P===C)break e;for(;P.sibling===null;){if(P.return===null||P.return===C)break e;P=P.return}P.sibling.return=P.return,P=P.sibling}W&=yD}switch(O(Xm,W,C),Z){case"forwards":for(k=C.child,Z=null;k!==null;)P=k.alternate,P!==null&&$u(P)===null&&(Z=k),k=k.sibling;k=Z,k===null?(Z=C.child,C.child=null):(Z=k.sibling,k.sibling=null),gy(C,!1,Z,k,le);break;case"backwards":for(k=null,Z=C.child,C.child=null;Z!==null;){if(P=Z.alternate,P!==null&&$u(P)===null){C.child=Z;break}P=Z.sibling,Z.sibling=k,k=Z,Z=P}gy(C,!0,k,null,le);break;case"together":gy(C,!1,null,null,void 0);break;default:C.memoizedState=null}return C.child}function Tm(P,C,k){if(P!==null&&(C.dependencies=P.dependencies),x0=-1,g7|=C.lanes,(k&C.childLanes)===0)if(P!==null){if(Fs(P,C,k,!1),(k&C.childLanes)===0)return null}else return null;if(P!==null&&C.child!==P.child)throw Error("Resuming work not yet implemented.");if(C.child!==null){for(P=C.child,k=Th(P,P.pendingProps),C.child=k,k.return=C;P.sibling!==null;)P=P.sibling,k=k.sibling=Th(P,P.pendingProps),k.return=C;k.sibling=null}return C.child}function yy(P,C){return(P.lanes&C)!==0?!0:(P=P.dependencies,!!(P!==null&&Dh(P)))}function j2(P,C,k){switch(C.tag){case 3:V(C,C.stateNode.containerInfo),Ou(C,r_,P.memoizedState.cache),Hd();break;case 27:case 5:K(C);break;case 4:V(C,C.stateNode.containerInfo);break;case 10:Ou(C,C.type,C.memoizedProps.value);break;case 12:(k&C.childLanes)!==0&&(C.flags|=4),C.flags|=2048;var W=C.stateNode;W.effectDuration=-0,W.passiveEffectDuration=-0;break;case 13:if(W=C.memoizedState,W!==null)return W.dehydrated!==null?(Ll(C),C.flags|=128,null):(k&C.child.childLanes)!==0?fy(P,C,k):(Ll(C),P=Tm(P,C,k),P!==null?P.sibling:null);Ll(C);break;case 19:var Z=(P.flags&128)!==0;if(W=(k&C.childLanes)!==0,W||(Fs(P,C,k,!1),W=(k&C.childLanes)!==0),Z){if(W)return X5(P,C,k);C.flags|=128}if(Z=C.memoizedState,Z!==null&&(Z.rendering=null,Z.tail=null,Z.lastEffect=null),O(Xm,Xm.current,C),W)break;return null;case 22:case 23:return C.lanes=0,gc(P,C,k);case 24:Ou(C,r_,P.memoizedState.cache)}return Tm(P,C,k)}function G2(P,C,k){if(C._debugNeedsRemount&&P!==null){k=S2(C.type,C.key,C.pendingProps,C._debugOwner||null,C.mode,C.lanes),k._debugStack=C._debugStack,k._debugTask=C._debugTask;var W=C.return;if(W===null)throw Error("Cannot swap the root fiber.");if(P.alternate=null,C.alternate=null,k.index=C.index,k.sibling=C.sibling,k.return=C.return,k.ref=C.ref,k._debugInfo=C._debugInfo,C===W.child)W.child=k;else{var Z=W.child;if(Z===null)throw Error("Expected parent to have a child.");for(;Z.sibling!==C;)if(Z=Z.sibling,Z===null)throw Error("Expected to find the previous sibling.");Z.sibling=k}return C=W.deletions,C===null?(W.deletions=[P],W.flags|=16):C.push(P),k.flags|=2,k}if(P!==null)if(P.memoizedProps!==C.pendingProps||C.type!==P.type)Wp=!0;else{if(!yy(P,k)&&(C.flags&128)===0)return Wp=!1,j2(P,C,k);Wp=(P.flags&131072)!==0}else Wp=!1,(W=ha)&&(t0(),W=(C.flags&1048576)!==0),W&&(W=C.index,t0(),B5(C,H3,W));switch(C.lanes=0,C.tag){case 16:e:if(W=C.pendingProps,P=f7(C.elementType),C.type=P,typeof P=="function")v2(P)?(W=Lh(P,W),C.tag=1,C.type=P=N0(P),C=W2(null,C,P,W,k)):(C.tag=0,Ud(C,P),C.type=P=N0(P),C=R1(null,C,P,W,k));else{if(P!=null){if(Z=P.$$typeof,Z===Bm){C.tag=11,C.type=P=qx(P),C=$2(null,C,P,W,k);break e}else if(Z===hg){C.tag=14,C=wa(null,C,P,W,k);break e}}throw C="",P!==null&&typeof P=="object"&&P.$$typeof===k_&&(C=" Did you wrap a component in React.lazy() more than once?"),P=w(P)||P,Error("Element type is invalid. Received a promise that resolves to: "+P+". Lazy element type must resolve to a class or function."+C)}return C;case 0:return R1(P,C,C.type,C.pendingProps,k);case 1:return W=C.type,Z=Lh(W,C.pendingProps),W2(P,C,W,Z,k);case 3:e:{if(V(C,C.stateNode.containerInfo),P===null)throw Error("Should have a current fiber. This is a bug in React.");W=C.pendingProps;var le=C.memoizedState;Z=le.element,ya(P,C),mu(C,W,null,k);var Le=C.memoizedState;if(W=Le.cache,Ou(C,r_,W),W!==le.cache&&Id(C,[r_],k,!0),H0(),W=Le.element,le.isDehydrated)if(le={element:W,isDehydrated:!1,cache:Le.cache},C.updateQueue.baseState=le,C.memoizedState=le,C.flags&256){C=k1(P,C,W,k);break e}else if(W!==Z){Z=Lu(Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),C),df(Z),C=k1(P,C,W,k);break e}else for(P=C.stateNode.containerInfo,P.nodeType===9?P=P.body:P=P.nodeName==="HTML"?P.ownerDocument.body:P,Tu=Cr(P.firstChild),$p=C,ha=!0,wu=null,Q4=!1,Z1=null,Um=!0,P=Eft(C,null,W,k),C.child=P;P;)P.flags=P.flags&-3|4096,P=P.sibling;else{if(Hd(),W===Z){C=Tm(P,C,k);break e}Gc(P,C,W,k)}C=C.child}return C;case 26:return tg(P,C),P===null?(P=hd(C.type,null,C.pendingProps,null))?C.memoizedState=P:ha||(P=C.type,k=C.pendingProps,W=z(fd.current),W=Ji(W).createElement(P),W[cc]=C,W[Ja]=k,Lc(W,P,k),tt(W),C.stateNode=W):C.memoizedState=hd(C.type,P.memoizedProps,C.pendingProps,P.memoizedState),null;case 27:return K(C),P===null&&ha&&(W=z(fd.current),Z=q(),W=C.stateNode=Ia(C.type,C.pendingProps,W,Z,!1),Q4||(Z=da(W,C.type,C.pendingProps,Z),Z!==null&&(Y_(C,0).serverProps=Z)),$p=C,Um=!0,Z=Tu,ea(C.type)?(D4e=Z,Tu=Cr(W.firstChild)):Tu=Z),Gc(P,C,C.pendingProps.children,k),tg(P,C),P===null&&(C.flags|=4194304),C.child;case 5:return P===null&&ha&&(le=q(),W=lf(C.type,le.ancestorInfo),Z=Tu,(Le=!Z)||(Le=Bf(Z,C.type,C.pendingProps,Um),Le!==null?(C.stateNode=Le,Q4||(le=da(Le,C.type,C.pendingProps,le),le!==null&&(Y_(C,0).serverProps=le)),$p=C,Tu=Cr(Le.firstChild),Um=!1,le=!0):le=!1,Le=!le),Le&&(W&&z5(C,Z),wh(C))),K(C),Z=C.type,le=C.pendingProps,Le=P!==null?P.memoizedProps:null,W=le.children,V0(Z,le)?W=null:Le!==null&&V0(Z,Le)&&(C.flags|=32),C.memoizedState!==null&&(Z=Pm(P,C,C_,null,null,k),rL._currentValue=Z),tg(P,C),Gc(P,C,W,k),C.child;case 6:return P===null&&ha&&(P=C.pendingProps,k=q(),W=k.ancestorInfo.current,P=W!=null?mm(P,W.tag,k.ancestorInfo.implicitRootScope):!0,k=Tu,(W=!k)||(W=Rr(k,C.pendingProps,Um),W!==null?(C.stateNode=W,$p=C,Tu=null,W=!0):W=!1,W=!W),W&&(P&&z5(C,k),wh(C))),null;case 13:return fy(P,C,k);case 4:return V(C,C.stateNode.containerInfo),W=C.pendingProps,P===null?C.child=gD(C,null,W,k):Gc(P,C,W,k),C.child;case 11:return $2(P,C,C.type,C.pendingProps,k);case 7:return Gc(P,C,C.pendingProps,k),C.child;case 8:return Gc(P,C,C.pendingProps.children,k),C.child;case 12:return C.flags|=4,C.flags|=2048,W=C.stateNode,W.effectDuration=-0,W.passiveEffectDuration=-0,Gc(P,C,C.pendingProps.children,k),C.child;case 10:return W=C.type,Z=C.pendingProps,le=Z.value,"value"in Z||jft||(jft=!0,console.error("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?")),Ou(C,W,le),Gc(P,C,Z.children,k),C.child;case 9:return Z=C.type._context,W=C.pendingProps.children,typeof W!="function"&&console.error("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."),Bu(C),Z=Ps(Z),Me(C),W=Z5e(W,Z,void 0),xe(),C.flags|=1,Gc(P,C,W,k),C.child;case 14:return wa(P,C,C.type,C.pendingProps,k);case 15:return Oh(P,C,C.type,C.pendingProps,k);case 19:return X5(P,C,k);case 31:return W=C.pendingProps,k=C.mode,W={mode:W.mode,children:W.children},P===null?(P=X2(W,k),P.ref=C.ref,C.child=P,P.return=C,C=P):(P=Th(P.child,W),P.ref=C.ref,C.child=P,P.return=C,C=P),C;case 22:return gc(P,C,k);case 24:return Bu(C),W=Ps(r_),P===null?(Z=Jx(),Z===null&&(Z=g0,le=hl(),Z.pooledCache=le,n0(le),le!==null&&(Z.pooledCacheLanes|=k),Z=le),C.memoizedState={parent:W,cache:Z},Wc(C),Ou(C,r_,Z)):((P.lanes&k)!==0&&(ya(P,C),mu(C,null,null,k),H0()),Z=P.memoizedState,le=C.memoizedState,Z.parent!==W?(Z={parent:W,cache:W},C.memoizedState=Z,C.lanes===0&&(C.memoizedState=C.updateQueue.baseState=Z),Ou(C,r_,W)):(W=le.cache,Ou(C,r_,W),W!==Z.cache&&Id(C,[r_],k,!0))),Gc(P,C,C.pendingProps.children,k),C.child;case 29:throw C.pendingProps}throw Error("Unknown unit of work tag ("+C.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function w_(P){P.flags|=4}function Y2(P,C){if(C.type!=="stylesheet"||(C.state.loading&n4)!==RC)P.flags&=-16777217;else if(P.flags|=16777216,!A_(C)){if(C=t4.current,C!==null&&((oa&4194048)===oa?B3!==null:(oa&62914560)!==oa&&(oa&536870912)===0||C!==B3))throw Pn=Qt,Ke;P.flags|=8192}}function rg(P,C){C!==null&&(P.flags|=4),P.flags&16384&&(C=P.tag!==22?Ee():536870912,P.lanes|=C,MC|=C)}function wf(P,C){if(!ha)switch(P.tailMode){case"hidden":C=P.tail;for(var k=null;C!==null;)C.alternate!==null&&(k=C),C=C.sibling;k===null?P.tail=null:k.sibling=null;break;case"collapsed":k=P.tail;for(var W=null;k!==null;)k.alternate!==null&&(W=k),k=k.sibling;W===null?C||P.tail===null?P.tail=null:P.tail.sibling=null:W.sibling=null}}function ua(P){var C=P.alternate!==null&&P.alternate.child===P.child,k=0,W=0;if(C)if((P.mode&Oc)!==Ba){for(var Z=P.selfBaseDuration,le=P.child;le!==null;)k|=le.lanes|le.childLanes,W|=le.subtreeFlags&65011712,W|=le.flags&65011712,Z+=le.treeBaseDuration,le=le.sibling;P.treeBaseDuration=Z}else for(Z=P.child;Z!==null;)k|=Z.lanes|Z.childLanes,W|=Z.subtreeFlags&65011712,W|=Z.flags&65011712,Z.return=P,Z=Z.sibling;else if((P.mode&Oc)!==Ba){Z=P.actualDuration,le=P.selfBaseDuration;for(var Le=P.child;Le!==null;)k|=Le.lanes|Le.childLanes,W|=Le.subtreeFlags,W|=Le.flags,Z+=Le.actualDuration,le+=Le.treeBaseDuration,Le=Le.sibling;P.actualDuration=Z,P.treeBaseDuration=le}else for(Z=P.child;Z!==null;)k|=Z.lanes|Z.childLanes,W|=Z.subtreeFlags,W|=Z.flags,Z.return=P,Z=Z.sibling;return P.subtreeFlags|=W,P.childLanes=k,C}function Fh(P,C,k){var W=C.pendingProps;switch(_f(C),C.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ua(C),null;case 1:return ua(C),null;case 3:return k=C.stateNode,W=null,P!==null&&(W=P.memoizedState.cache),C.memoizedState.cache!==W&&(C.flags|=2048),Fu(r_,C),j(C),k.pendingContext&&(k.context=k.pendingContext,k.pendingContext=null),(P===null||P.child===null)&&(Eh(C)?(uy(),w_(C)):P===null||P.memoizedState.isDehydrated&&(C.flags&256)===0||(C.flags|=1024,M2())),ua(C),null;case 26:return k=C.memoizedState,P===null?(w_(C),k!==null?(ua(C),Y2(C,k)):(ua(C),C.flags&=-16777217)):k?k!==P.memoizedState?(w_(C),ua(C),Y2(C,k)):(ua(C),C.flags&=-16777217):(P.memoizedProps!==W&&w_(C),ua(C),C.flags&=-16777217),null;case 27:ne(C),k=z(fd.current);var Z=C.type;if(P!==null&&C.stateNode!=null)P.memoizedProps!==W&&w_(C);else{if(!W){if(C.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return ua(C),null}P=q(),Eh(C)?ic(C):(P=Ia(Z,W,k,P,!0),C.stateNode=P,w_(C))}return ua(C),null;case 5:if(ne(C),k=C.type,P!==null&&C.stateNode!=null)P.memoizedProps!==W&&w_(C);else{if(!W){if(C.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return ua(C),null}if(Z=q(),Eh(C))ic(C);else{switch(P=z(fd.current),lf(k,Z.ancestorInfo),Z=Z.context,P=Ji(P),Z){case AD:P=P.createElementNS(Gh,k);break;case Fq:P=P.createElementNS(xd,k);break;default:switch(k){case"svg":P=P.createElementNS(Gh,k);break;case"math":P=P.createElementNS(xd,k);break;case"script":P=P.createElement("div"),P.innerHTML="<script><\/script>",P=P.removeChild(P.firstChild);break;case"select":P=typeof W.is=="string"?P.createElement("select",{is:W.is}):P.createElement("select"),W.multiple?P.multiple=!0:W.size&&(P.size=W.size);break;default:P=typeof W.is=="string"?P.createElement(k,{is:W.is}):P.createElement(k),k.indexOf("-")===-1&&(k!==k.toLowerCase()&&console.error("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",k),Object.prototype.toString.call(P)!=="[object HTMLUnknownElement]"||Ip.call(_1t,k)||(_1t[k]=!0,console.error("The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",k)))}}P[cc]=C,P[Ja]=W;e:for(Z=C.child;Z!==null;){if(Z.tag===5||Z.tag===6)P.appendChild(Z.stateNode);else if(Z.tag!==4&&Z.tag!==27&&Z.child!==null){Z.child.return=Z,Z=Z.child;continue}if(Z===C)break e;for(;Z.sibling===null;){if(Z.return===null||Z.return===C)break e;Z=Z.return}Z.sibling.return=Z.return,Z=Z.sibling}C.stateNode=P;e:switch(Lc(P,k,W),k){case"button":case"input":case"select":case"textarea":P=!!W.autoFocus;break e;case"img":P=!0;break e;default:P=!1}P&&w_(C)}}return ua(C),C.flags&=-16777217,null;case 6:if(P&&C.stateNode!=null)P.memoizedProps!==W&&w_(C);else{if(typeof W!="string"&&C.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");if(P=z(fd.current),k=q(),Eh(C)){P=C.stateNode,k=C.memoizedProps,Z=!Q4,W=null;var le=$p;if(le!==null)switch(le.tag){case 3:Z&&(Z=vc(P,k,W),Z!==null&&(Y_(C,0).serverProps=Z));break;case 27:case 5:W=le.memoizedProps,Z&&(Z=vc(P,k,W),Z!==null&&(Y_(C,0).serverProps=Z))}P[cc]=C,P=!!(P.nodeValue===k||W!==null&&W.suppressHydrationWarning===!0||wp(P.nodeValue,k)),P||wh(C)}else Z=k.ancestorInfo.current,Z!=null&&mm(W,Z.tag,k.ancestorInfo.implicitRootScope),P=Ji(P).createTextNode(W),P[cc]=C,C.stateNode=P}return ua(C),null;case 13:if(W=C.memoizedState,P===null||P.memoizedState!==null&&P.memoizedState.dehydrated!==null){if(Z=Eh(C),W!==null&&W.dehydrated!==null){if(P===null){if(!Z)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(Z=C.memoizedState,Z=Z!==null?Z.dehydrated:null,!Z)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");Z[cc]=C,ua(C),(C.mode&Oc)!==Ba&&W!==null&&(Z=C.child,Z!==null&&(C.treeBaseDuration-=Z.treeBaseDuration))}else uy(),Hd(),(C.flags&128)===0&&(C.memoizedState=null),C.flags|=4,ua(C),(C.mode&Oc)!==Ba&&W!==null&&(Z=C.child,Z!==null&&(C.treeBaseDuration-=Z.treeBaseDuration));Z=!1}else Z=M2(),P!==null&&P.memoizedState!==null&&(P.memoizedState.hydrationErrors=Z),Z=!0;if(!Z)return C.flags&256?(s0(C),C):(s0(C),null)}return s0(C),(C.flags&128)!==0?(C.lanes=k,(C.mode&Oc)!==Ba&&$c(C),C):(k=W!==null,P=P!==null&&P.memoizedState!==null,k&&(W=C.child,Z=null,W.alternate!==null&&W.alternate.memoizedState!==null&&W.alternate.memoizedState.cachePool!==null&&(Z=W.alternate.memoizedState.cachePool.pool),le=null,W.memoizedState!==null&&W.memoizedState.cachePool!==null&&(le=W.memoizedState.cachePool.pool),le!==Z&&(W.flags|=2048)),k!==P&&k&&(C.child.flags|=8192),rg(C,C.updateQueue),ua(C),(C.mode&Oc)!==Ba&&k&&(P=C.child,P!==null&&(C.treeBaseDuration-=P.treeBaseDuration)),null);case 4:return j(C),P===null&&Ry(C.stateNode.containerInfo),ua(C),null;case 10:return Fu(C.type,C),ua(C),null;case 19:if(H(Xm,C),Z=C.memoizedState,Z===null)return ua(C),null;if(W=(C.flags&128)!==0,le=Z.rendering,le===null)if(W)wf(Z,!1);else{if(Pd!==Pb||P!==null&&(P.flags&128)!==0)for(P=C.child;P!==null;){if(le=$u(P),le!==null){for(C.flags|=128,wf(Z,!1),P=le.updateQueue,C.updateQueue=P,rg(C,P),C.subtreeFlags=0,P=k,k=C.child;k!==null;)cy(k,P),k=k.sibling;return O(Xm,Xm.current&yD|WI,C),C.child}P=P.sibling}Z.tail!==null&&Uh()>Tq&&(C.flags|=128,W=!0,wf(Z,!1),C.lanes=4194304)}else{if(!W)if(P=$u(le),P!==null){if(C.flags|=128,W=!0,P=P.updateQueue,C.updateQueue=P,rg(C,P),wf(Z,!0),Z.tail===null&&Z.tailMode==="hidden"&&!le.alternate&&!ha)return ua(C),null}else 2*Uh()-Z.renderingStartTime>Tq&&k!==536870912&&(C.flags|=128,W=!0,wf(Z,!1),C.lanes=4194304);Z.isBackwards?(le.sibling=C.child,C.child=le):(P=Z.last,P!==null?P.sibling=le:C.child=le,Z.last=le)}return Z.tail!==null?(P=Z.tail,Z.rendering=P,Z.tail=P.sibling,Z.renderingStartTime=Uh(),P.sibling=null,k=Xm.current,k=W?k&yD|WI:k&yD,O(Xm,k,C),P):(ua(C),null);case 22:case 23:return s0(C),v_(C),W=C.memoizedState!==null,P!==null?P.memoizedState!==null!==W&&(C.flags|=8192):W&&(C.flags|=8192),W?(k&536870912)!==0&&(C.flags&128)===0&&(ua(C),C.subtreeFlags&6&&(C.flags|=8192)):ua(C),k=C.updateQueue,k!==null&&rg(C,k.retryQueue),k=null,P!==null&&P.memoizedState!==null&&P.memoizedState.cachePool!==null&&(k=P.memoizedState.cachePool.pool),W=null,C.memoizedState!==null&&C.memoizedState.cachePool!==null&&(W=C.memoizedState.cachePool.pool),W!==k&&(C.flags|=2048),P!==null&&H(O3,C),null;case 24:return k=null,P!==null&&(k=P.memoizedState.cache),C.memoizedState.cache!==k&&(C.flags|=2048),Fu(r_,C),ua(C),null;case 25:return null;case 30:return null}throw Error("Unknown unit of work tag ("+C.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function j5(P,C){switch(_f(C),C.tag){case 1:return P=C.flags,P&65536?(C.flags=P&-65537|128,(C.mode&Oc)!==Ba&&$c(C),C):null;case 3:return Fu(r_,C),j(C),P=C.flags,(P&65536)!==0&&(P&128)===0?(C.flags=P&-65537|128,C):null;case 26:case 27:case 5:return ne(C),null;case 13:if(s0(C),P=C.memoizedState,P!==null&&P.dehydrated!==null){if(C.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");Hd()}return P=C.flags,P&65536?(C.flags=P&-65537|128,(C.mode&Oc)!==Ba&&$c(C),C):null;case 19:return H(Xm,C),null;case 4:return j(C),null;case 10:return Fu(C.type,C),null;case 22:case 23:return s0(C),v_(C),P!==null&&H(O3,C),P=C.flags,P&65536?(C.flags=P&-65537|128,(C.mode&Oc)!==Ba&&$c(C),C):null;case 24:return Fu(r_,C),null;case 25:return null;default:return null}}function N1(P,C){switch(_f(C),C.tag){case 3:Fu(r_,C),j(C);break;case 26:case 27:case 5:ne(C);break;case 4:j(C);break;case 13:s0(C);break;case 19:H(Xm,C);break;case 10:Fu(C.type,C);break;case 22:case 23:s0(C),v_(C),P!==null&&H(O3,C);break;case 24:Fu(r_,C)}}function Xd(P){return(P.mode&Oc)!==Ba}function by(P,C){Xd(P)?(Ah(),wm(C,P),K_()):wm(C,P)}function vs(P,C,k){Xd(P)?(Ah(),Ef(k,P,C),K_()):Ef(k,P,C)}function wm(P,C){try{var k=C.updateQueue,W=k!==null?k.lastEffect:null;if(W!==null){var Z=W.next;k=Z;do{if((k.tag&P)===P&&((P&G0)!==to?po!==null&&typeof po.markComponentPassiveEffectMountStarted=="function"&&po.markComponentPassiveEffectMountStarted(C):(P&Ri)!==to&&po!==null&&typeof po.markComponentLayoutEffectMountStarted=="function"&&po.markComponentLayoutEffectMountStarted(C),W=void 0,(P&li)!==to&&(ED=!0),W=Zt(C,dro,k),(P&li)!==to&&(ED=!1),(P&G0)!==to?po!==null&&typeof po.markComponentPassiveEffectMountStopped=="function"&&po.markComponentPassiveEffectMountStopped():(P&Ri)!==to&&po!==null&&typeof po.markComponentLayoutEffectMountStopped=="function"&&po.markComponentLayoutEffectMountStopped(),W!==void 0&&typeof W!="function")){var le=void 0;le=(k.tag&Ri)!==0?"useLayoutEffect":(k.tag&li)!==0?"useInsertionEffect":"useEffect";var Le=void 0;Le=W===null?" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof W.then=="function"?`
|
|
149
|
+
%s.childContextTypes = ...`,C.displayName||C.name||"Component"),typeof C.getDerivedStateFromProps=="function"&&(P=w(C)||"Unknown",Uft[P]||(console.error("%s: Function components do not support getDerivedStateFromProps.",P),Uft[P]=!0)),typeof C.contextType=="object"&&C.contextType!==null&&(C=w(C)||"Unknown",$ft[C]||(console.error("%s: Function components do not support contextType.",C),$ft[C]=!0))}function U2(P){return{baseLanes:P,cachePool:_y()}}function py(P,C,k){return P=P!==null?P.childLanes&~k:0,C&&(P|=Xy),P}function fy(P,C,k){var W,Z=C.pendingProps;s(C)&&(C.flags|=128);var le=!1,Le=(C.flags&128)!==0;if((W=Le)||(W=P!==null&&P.memoizedState===null?!1:(Xm.current&WI)!==0),W&&(le=!0,C.flags&=-129),W=(C.flags&32)!==0,C.flags&=-33,P===null){if(ha){if(le?Ll(C):Hh(C),ha){var qe=Tu,dt;if(!(dt=!qe)){e:{var yt=qe;for(dt=Um;yt.nodeType!==8;){if(!dt){dt=null;break e}if(yt=Cr(yt.nextSibling),yt===null){dt=null;break e}}dt=yt}dt!==null?(t0(),C.memoizedState={dehydrated:dt,treeContext:db!==null?{id:K4,overflow:Kf}:null,retryLane:536870912,hydrationErrors:null},yt=m(18,null,null,Ba),yt.stateNode=dt,yt.return=C,C.child=yt,$p=C,Tu=null,dt=!0):dt=!1,dt=!dt}dt&&(z5(C,qe),wh(C))}if(qe=C.memoizedState,qe!==null&&(qe=qe.dehydrated,qe!==null))return cs(qe)?C.lanes=32:C.lanes=536870912,null;s0(C)}return qe=Z.children,Z=Z.fallback,le?(Hh(C),le=C.mode,qe=X2({mode:"hidden",children:qe},le),Z=dp(Z,le,k,null),qe.return=C,Z.return=C,qe.sibling=Z,C.child=qe,le=C.child,le.memoizedState=U2(k),le.childLanes=py(P,W,k),C.memoizedState=s4e,Z):(Ll(C),xy(C,qe))}var mn=P.memoizedState;if(mn!==null&&(qe=mn.dehydrated,qe!==null)){if(Le)C.flags&256?(Ll(C),C.flags&=-257,C=ng(P,C,k)):C.memoizedState!==null?(Hh(C),C.child=P.child,C.flags|=128,C=null):(Hh(C),le=Z.fallback,qe=C.mode,Z=X2({mode:"visible",children:Z.children},qe),le=dp(le,qe,k,null),le.flags|=2,Z.return=C,le.return=C,Z.sibling=le,C.child=Z,gD(C,P.child,null,k),Z=C.child,Z.memoizedState=U2(k),Z.childLanes=py(P,W,k),C.memoizedState=s4e,C=le);else if(Ll(C),ha&&console.error("We should not be hydrating here. This is a bug in React. Please file a bug."),cs(qe)){if(W=qe.nextSibling&&qe.nextSibling.dataset,W){dt=W.dgst;var vn=W.msg;yt=W.stck;var _n=W.cstck}qe=vn,W=dt,Z=yt,dt=le=_n,le=Error(qe||"The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."),le.stack=Z||"",le.digest=W,W=dt===void 0?null:dt,Z={value:le,source:null,stack:W},typeof W=="string"&&J4.set(le,Z),df(Z),C=ng(P,C,k)}else if(Wp||Fs(P,C,k,!1),W=(k&P.childLanes)!==0,Wp||W){if(W=g0,W!==null&&(Z=k&-k,Z=(Z&42)!==0?1:at(Z),Z=(Z&(W.suspendedLanes|k))!==0?0:Z,Z!==0&&Z!==mn.retryLane))throw mn.retryLane=Z,k0(P,Z),Zs(W,P,Z),zft;qe.data===vb||sg(),C=ng(P,C,k)}else qe.data===vb?(C.flags|=192,C.child=P.child,C=null):(P=mn.treeContext,Tu=Cr(qe.nextSibling),$p=C,ha=!0,wu=null,Q4=!1,Z1=null,Um=!1,P!==null&&(t0(),oh[bg++]=K4,oh[bg++]=Kf,oh[bg++]=db,K4=P.id,Kf=P.overflow,db=C),C=xy(C,Z.children),C.flags|=4096);return C}return le?(Hh(C),le=Z.fallback,qe=C.mode,dt=P.child,yt=dt.sibling,Z=Th(dt,{mode:"hidden",children:Z.children}),Z.subtreeFlags=dt.subtreeFlags&65011712,yt!==null?le=Th(yt,le):(le=dp(le,qe,k,null),le.flags|=2),le.return=C,Z.return=C,Z.sibling=le,C.child=Z,Z=le,le=C.child,qe=P.child.memoizedState,qe===null?qe=U2(k):(dt=qe.cachePool,dt!==null?(yt=r_._currentValue,dt=dt.parent!==yt?{parent:yt,pool:yt}:dt):dt=_y(),qe={baseLanes:qe.baseLanes|k,cachePool:dt}),le.memoizedState=qe,le.childLanes=py(P,W,k),C.memoizedState=s4e,Z):(Ll(C),k=P.child,P=k.sibling,k=Th(k,{mode:"visible",children:Z.children}),k.return=C,k.sibling=null,P!==null&&(W=C.deletions,W===null?(C.deletions=[P],C.flags|=16):W.push(P)),C.child=k,C.memoizedState=null,k)}function xy(P,C){return C=X2({mode:"visible",children:C},P.mode),C.return=P,P.child=C}function X2(P,C){return P=m(22,P,null,C),P.lanes=0,P.stateNode={_visibility:Oa,_pendingMarkers:null,_retryCache:null,_transitions:null},P}function ng(P,C,k){return gD(C,P.child,null,k),P=xy(C,C.pendingProps.children),P.flags|=2,C.memoizedState=null,P}function og(P,C,k){P.lanes|=C;var W=P.alternate;W!==null&&(W.lanes|=C),Ks(P.return,C,k)}function z4(P,C){var k=gi(P);return P=!k&&typeof M(P)=="function",k||P?(k=k?"array":"iterable",console.error("A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>",k,C,k),!1):!0}function gy(P,C,k,W,Z){var le=P.memoizedState;le===null?P.memoizedState={isBackwards:C,rendering:null,renderingStartTime:0,last:W,tail:k,tailMode:Z}:(le.isBackwards=C,le.rendering=null,le.renderingStartTime=0,le.last=W,le.tail=k,le.tailMode=Z)}function X5(P,C,k){var W=C.pendingProps,Z=W.revealOrder,le=W.tail;if(W=W.children,Z!==void 0&&Z!=="forwards"&&Z!=="backwards"&&Z!=="together"&&!Xft[Z])if(Xft[Z]=!0,typeof Z=="string")switch(Z.toLowerCase()){case"together":case"forwards":case"backwards":console.error('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',Z,Z.toLowerCase());break;case"forward":case"backward":console.error('"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',Z,Z.toLowerCase());break;default:console.error('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',Z)}else console.error('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',Z);le===void 0||i4e[le]||(le!=="collapsed"&&le!=="hidden"?(i4e[le]=!0,console.error('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "collapsed" or "hidden"?',le)):Z!=="forwards"&&Z!=="backwards"&&(i4e[le]=!0,console.error('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',le)));e:if((Z==="forwards"||Z==="backwards")&&W!==void 0&&W!==null&&W!==!1)if(gi(W)){for(var Le=0;Le<W.length;Le++)if(!z4(W[Le],Le))break e}else if(Le=M(W),typeof Le=="function"){if(Le=Le.call(W))for(var qe=Le.next(),dt=0;!qe.done;qe=Le.next()){if(!z4(qe.value,dt))break e;dt++}}else console.error('A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',Z);if(Gc(P,C,W,k),W=Xm.current,(W&WI)!==0)W=W&yD|WI,C.flags|=128;else{if(P!==null&&(P.flags&128)!==0)e:for(P=C.child;P!==null;){if(P.tag===13)P.memoizedState!==null&&og(P,k,C);else if(P.tag===19)og(P,k,C);else if(P.child!==null){P.child.return=P,P=P.child;continue}if(P===C)break e;for(;P.sibling===null;){if(P.return===null||P.return===C)break e;P=P.return}P.sibling.return=P.return,P=P.sibling}W&=yD}switch(O(Xm,W,C),Z){case"forwards":for(k=C.child,Z=null;k!==null;)P=k.alternate,P!==null&&$u(P)===null&&(Z=k),k=k.sibling;k=Z,k===null?(Z=C.child,C.child=null):(Z=k.sibling,k.sibling=null),gy(C,!1,Z,k,le);break;case"backwards":for(k=null,Z=C.child,C.child=null;Z!==null;){if(P=Z.alternate,P!==null&&$u(P)===null){C.child=Z;break}P=Z.sibling,Z.sibling=k,k=Z,Z=P}gy(C,!0,k,null,le);break;case"together":gy(C,!1,null,null,void 0);break;default:C.memoizedState=null}return C.child}function Tm(P,C,k){if(P!==null&&(C.dependencies=P.dependencies),x0=-1,g7|=C.lanes,(k&C.childLanes)===0)if(P!==null){if(Fs(P,C,k,!1),(k&C.childLanes)===0)return null}else return null;if(P!==null&&C.child!==P.child)throw Error("Resuming work not yet implemented.");if(C.child!==null){for(P=C.child,k=Th(P,P.pendingProps),C.child=k,k.return=C;P.sibling!==null;)P=P.sibling,k=k.sibling=Th(P,P.pendingProps),k.return=C;k.sibling=null}return C.child}function yy(P,C){return(P.lanes&C)!==0?!0:(P=P.dependencies,!!(P!==null&&Dh(P)))}function j2(P,C,k){switch(C.tag){case 3:V(C,C.stateNode.containerInfo),Ou(C,r_,P.memoizedState.cache),Hd();break;case 27:case 5:K(C);break;case 4:V(C,C.stateNode.containerInfo);break;case 10:Ou(C,C.type,C.memoizedProps.value);break;case 12:(k&C.childLanes)!==0&&(C.flags|=4),C.flags|=2048;var W=C.stateNode;W.effectDuration=-0,W.passiveEffectDuration=-0;break;case 13:if(W=C.memoizedState,W!==null)return W.dehydrated!==null?(Ll(C),C.flags|=128,null):(k&C.child.childLanes)!==0?fy(P,C,k):(Ll(C),P=Tm(P,C,k),P!==null?P.sibling:null);Ll(C);break;case 19:var Z=(P.flags&128)!==0;if(W=(k&C.childLanes)!==0,W||(Fs(P,C,k,!1),W=(k&C.childLanes)!==0),Z){if(W)return X5(P,C,k);C.flags|=128}if(Z=C.memoizedState,Z!==null&&(Z.rendering=null,Z.tail=null,Z.lastEffect=null),O(Xm,Xm.current,C),W)break;return null;case 22:case 23:return C.lanes=0,gc(P,C,k);case 24:Ou(C,r_,P.memoizedState.cache)}return Tm(P,C,k)}function G2(P,C,k){if(C._debugNeedsRemount&&P!==null){k=S2(C.type,C.key,C.pendingProps,C._debugOwner||null,C.mode,C.lanes),k._debugStack=C._debugStack,k._debugTask=C._debugTask;var W=C.return;if(W===null)throw Error("Cannot swap the root fiber.");if(P.alternate=null,C.alternate=null,k.index=C.index,k.sibling=C.sibling,k.return=C.return,k.ref=C.ref,k._debugInfo=C._debugInfo,C===W.child)W.child=k;else{var Z=W.child;if(Z===null)throw Error("Expected parent to have a child.");for(;Z.sibling!==C;)if(Z=Z.sibling,Z===null)throw Error("Expected to find the previous sibling.");Z.sibling=k}return C=W.deletions,C===null?(W.deletions=[P],W.flags|=16):C.push(P),k.flags|=2,k}if(P!==null)if(P.memoizedProps!==C.pendingProps||C.type!==P.type)Wp=!0;else{if(!yy(P,k)&&(C.flags&128)===0)return Wp=!1,j2(P,C,k);Wp=(P.flags&131072)!==0}else Wp=!1,(W=ha)&&(t0(),W=(C.flags&1048576)!==0),W&&(W=C.index,t0(),B5(C,H3,W));switch(C.lanes=0,C.tag){case 16:e:if(W=C.pendingProps,P=f7(C.elementType),C.type=P,typeof P=="function")v2(P)?(W=Lh(P,W),C.tag=1,C.type=P=N0(P),C=W2(null,C,P,W,k)):(C.tag=0,Ud(C,P),C.type=P=N0(P),C=R1(null,C,P,W,k));else{if(P!=null){if(Z=P.$$typeof,Z===Bm){C.tag=11,C.type=P=qx(P),C=$2(null,C,P,W,k);break e}else if(Z===hg){C.tag=14,C=wa(null,C,P,W,k);break e}}throw C="",P!==null&&typeof P=="object"&&P.$$typeof===k_&&(C=" Did you wrap a component in React.lazy() more than once?"),P=w(P)||P,Error("Element type is invalid. Received a promise that resolves to: "+P+". Lazy element type must resolve to a class or function."+C)}return C;case 0:return R1(P,C,C.type,C.pendingProps,k);case 1:return W=C.type,Z=Lh(W,C.pendingProps),W2(P,C,W,Z,k);case 3:e:{if(V(C,C.stateNode.containerInfo),P===null)throw Error("Should have a current fiber. This is a bug in React.");W=C.pendingProps;var le=C.memoizedState;Z=le.element,ya(P,C),mu(C,W,null,k);var Le=C.memoizedState;if(W=Le.cache,Ou(C,r_,W),W!==le.cache&&Id(C,[r_],k,!0),H0(),W=Le.element,le.isDehydrated)if(le={element:W,isDehydrated:!1,cache:Le.cache},C.updateQueue.baseState=le,C.memoizedState=le,C.flags&256){C=k1(P,C,W,k);break e}else if(W!==Z){Z=Lu(Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),C),df(Z),C=k1(P,C,W,k);break e}else for(P=C.stateNode.containerInfo,P.nodeType===9?P=P.body:P=P.nodeName==="HTML"?P.ownerDocument.body:P,Tu=Cr(P.firstChild),$p=C,ha=!0,wu=null,Q4=!1,Z1=null,Um=!0,P=Eft(C,null,W,k),C.child=P;P;)P.flags=P.flags&-3|4096,P=P.sibling;else{if(Hd(),W===Z){C=Tm(P,C,k);break e}Gc(P,C,W,k)}C=C.child}return C;case 26:return tg(P,C),P===null?(P=hd(C.type,null,C.pendingProps,null))?C.memoizedState=P:ha||(P=C.type,k=C.pendingProps,W=z(fd.current),W=Ji(W).createElement(P),W[cc]=C,W[Ja]=k,Lc(W,P,k),tt(W),C.stateNode=W):C.memoizedState=hd(C.type,P.memoizedProps,C.pendingProps,P.memoizedState),null;case 27:return K(C),P===null&&ha&&(W=z(fd.current),Z=q(),W=C.stateNode=Ia(C.type,C.pendingProps,W,Z,!1),Q4||(Z=da(W,C.type,C.pendingProps,Z),Z!==null&&(Y_(C,0).serverProps=Z)),$p=C,Um=!0,Z=Tu,ea(C.type)?(D4e=Z,Tu=Cr(W.firstChild)):Tu=Z),Gc(P,C,C.pendingProps.children,k),tg(P,C),P===null&&(C.flags|=4194304),C.child;case 5:return P===null&&ha&&(le=q(),W=lf(C.type,le.ancestorInfo),Z=Tu,(Le=!Z)||(Le=Bf(Z,C.type,C.pendingProps,Um),Le!==null?(C.stateNode=Le,Q4||(le=da(Le,C.type,C.pendingProps,le),le!==null&&(Y_(C,0).serverProps=le)),$p=C,Tu=Cr(Le.firstChild),Um=!1,le=!0):le=!1,Le=!le),Le&&(W&&z5(C,Z),wh(C))),K(C),Z=C.type,le=C.pendingProps,Le=P!==null?P.memoizedProps:null,W=le.children,V0(Z,le)?W=null:Le!==null&&V0(Z,Le)&&(C.flags|=32),C.memoizedState!==null&&(Z=Pm(P,C,C_,null,null,k),rL._currentValue=Z),tg(P,C),Gc(P,C,W,k),C.child;case 6:return P===null&&ha&&(P=C.pendingProps,k=q(),W=k.ancestorInfo.current,P=W!=null?mm(P,W.tag,k.ancestorInfo.implicitRootScope):!0,k=Tu,(W=!k)||(W=Rr(k,C.pendingProps,Um),W!==null?(C.stateNode=W,$p=C,Tu=null,W=!0):W=!1,W=!W),W&&(P&&z5(C,k),wh(C))),null;case 13:return fy(P,C,k);case 4:return V(C,C.stateNode.containerInfo),W=C.pendingProps,P===null?C.child=gD(C,null,W,k):Gc(P,C,W,k),C.child;case 11:return $2(P,C,C.type,C.pendingProps,k);case 7:return Gc(P,C,C.pendingProps,k),C.child;case 8:return Gc(P,C,C.pendingProps.children,k),C.child;case 12:return C.flags|=4,C.flags|=2048,W=C.stateNode,W.effectDuration=-0,W.passiveEffectDuration=-0,Gc(P,C,C.pendingProps.children,k),C.child;case 10:return W=C.type,Z=C.pendingProps,le=Z.value,"value"in Z||jft||(jft=!0,console.error("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?")),Ou(C,W,le),Gc(P,C,Z.children,k),C.child;case 9:return Z=C.type._context,W=C.pendingProps.children,typeof W!="function"&&console.error("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."),Bu(C),Z=Ps(Z),Me(C),W=Z5e(W,Z,void 0),xe(),C.flags|=1,Gc(P,C,W,k),C.child;case 14:return wa(P,C,C.type,C.pendingProps,k);case 15:return Oh(P,C,C.type,C.pendingProps,k);case 19:return X5(P,C,k);case 31:return W=C.pendingProps,k=C.mode,W={mode:W.mode,children:W.children},P===null?(P=X2(W,k),P.ref=C.ref,C.child=P,P.return=C,C=P):(P=Th(P.child,W),P.ref=C.ref,C.child=P,P.return=C,C=P),C;case 22:return gc(P,C,k);case 24:return Bu(C),W=Ps(r_),P===null?(Z=Jx(),Z===null&&(Z=g0,le=hl(),Z.pooledCache=le,n0(le),le!==null&&(Z.pooledCacheLanes|=k),Z=le),C.memoizedState={parent:W,cache:Z},Wc(C),Ou(C,r_,Z)):((P.lanes&k)!==0&&(ya(P,C),mu(C,null,null,k),H0()),Z=P.memoizedState,le=C.memoizedState,Z.parent!==W?(Z={parent:W,cache:W},C.memoizedState=Z,C.lanes===0&&(C.memoizedState=C.updateQueue.baseState=Z),Ou(C,r_,W)):(W=le.cache,Ou(C,r_,W),W!==Z.cache&&Id(C,[r_],k,!0))),Gc(P,C,C.pendingProps.children,k),C.child;case 29:throw C.pendingProps}throw Error("Unknown unit of work tag ("+C.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function w_(P){P.flags|=4}function Y2(P,C){if(C.type!=="stylesheet"||(C.state.loading&n4)!==RC)P.flags&=-16777217;else if(P.flags|=16777216,!A_(C)){if(C=t4.current,C!==null&&((oa&4194048)===oa?B3!==null:(oa&62914560)!==oa&&(oa&536870912)===0||C!==B3))throw Pn=Qt,Ke;P.flags|=8192}}function rg(P,C){C!==null&&(P.flags|=4),P.flags&16384&&(C=P.tag!==22?Ee():536870912,P.lanes|=C,MC|=C)}function wf(P,C){if(!ha)switch(P.tailMode){case"hidden":C=P.tail;for(var k=null;C!==null;)C.alternate!==null&&(k=C),C=C.sibling;k===null?P.tail=null:k.sibling=null;break;case"collapsed":k=P.tail;for(var W=null;k!==null;)k.alternate!==null&&(W=k),k=k.sibling;W===null?C||P.tail===null?P.tail=null:P.tail.sibling=null:W.sibling=null}}function ua(P){var C=P.alternate!==null&&P.alternate.child===P.child,k=0,W=0;if(C)if((P.mode&Oc)!==Ba){for(var Z=P.selfBaseDuration,le=P.child;le!==null;)k|=le.lanes|le.childLanes,W|=le.subtreeFlags&65011712,W|=le.flags&65011712,Z+=le.treeBaseDuration,le=le.sibling;P.treeBaseDuration=Z}else for(Z=P.child;Z!==null;)k|=Z.lanes|Z.childLanes,W|=Z.subtreeFlags&65011712,W|=Z.flags&65011712,Z.return=P,Z=Z.sibling;else if((P.mode&Oc)!==Ba){Z=P.actualDuration,le=P.selfBaseDuration;for(var Le=P.child;Le!==null;)k|=Le.lanes|Le.childLanes,W|=Le.subtreeFlags,W|=Le.flags,Z+=Le.actualDuration,le+=Le.treeBaseDuration,Le=Le.sibling;P.actualDuration=Z,P.treeBaseDuration=le}else for(Z=P.child;Z!==null;)k|=Z.lanes|Z.childLanes,W|=Z.subtreeFlags,W|=Z.flags,Z.return=P,Z=Z.sibling;return P.subtreeFlags|=W,P.childLanes=k,C}function Fh(P,C,k){var W=C.pendingProps;switch(_f(C),C.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ua(C),null;case 1:return ua(C),null;case 3:return k=C.stateNode,W=null,P!==null&&(W=P.memoizedState.cache),C.memoizedState.cache!==W&&(C.flags|=2048),Fu(r_,C),j(C),k.pendingContext&&(k.context=k.pendingContext,k.pendingContext=null),(P===null||P.child===null)&&(Eh(C)?(uy(),w_(C)):P===null||P.memoizedState.isDehydrated&&(C.flags&256)===0||(C.flags|=1024,M2())),ua(C),null;case 26:return k=C.memoizedState,P===null?(w_(C),k!==null?(ua(C),Y2(C,k)):(ua(C),C.flags&=-16777217)):k?k!==P.memoizedState?(w_(C),ua(C),Y2(C,k)):(ua(C),C.flags&=-16777217):(P.memoizedProps!==W&&w_(C),ua(C),C.flags&=-16777217),null;case 27:ne(C),k=z(fd.current);var Z=C.type;if(P!==null&&C.stateNode!=null)P.memoizedProps!==W&&w_(C);else{if(!W){if(C.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return ua(C),null}P=q(),Eh(C)?ic(C):(P=Ia(Z,W,k,P,!0),C.stateNode=P,w_(C))}return ua(C),null;case 5:if(ne(C),k=C.type,P!==null&&C.stateNode!=null)P.memoizedProps!==W&&w_(C);else{if(!W){if(C.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return ua(C),null}if(Z=q(),Eh(C))ic(C);else{switch(P=z(fd.current),lf(k,Z.ancestorInfo),Z=Z.context,P=Ji(P),Z){case AD:P=P.createElementNS(Gh,k);break;case Fq:P=P.createElementNS(xd,k);break;default:switch(k){case"svg":P=P.createElementNS(Gh,k);break;case"math":P=P.createElementNS(xd,k);break;case"script":P=P.createElement("div"),P.innerHTML="<script><\/script>",P=P.removeChild(P.firstChild);break;case"select":P=typeof W.is=="string"?P.createElement("select",{is:W.is}):P.createElement("select"),W.multiple?P.multiple=!0:W.size&&(P.size=W.size);break;default:P=typeof W.is=="string"?P.createElement(k,{is:W.is}):P.createElement(k),k.indexOf("-")===-1&&(k!==k.toLowerCase()&&console.error("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",k),Object.prototype.toString.call(P)!=="[object HTMLUnknownElement]"||Ip.call(_1t,k)||(_1t[k]=!0,console.error("The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",k)))}}P[cc]=C,P[Ja]=W;e:for(Z=C.child;Z!==null;){if(Z.tag===5||Z.tag===6)P.appendChild(Z.stateNode);else if(Z.tag!==4&&Z.tag!==27&&Z.child!==null){Z.child.return=Z,Z=Z.child;continue}if(Z===C)break e;for(;Z.sibling===null;){if(Z.return===null||Z.return===C)break e;Z=Z.return}Z.sibling.return=Z.return,Z=Z.sibling}C.stateNode=P;e:switch(Lc(P,k,W),k){case"button":case"input":case"select":case"textarea":P=!!W.autoFocus;break e;case"img":P=!0;break e;default:P=!1}P&&w_(C)}}return ua(C),C.flags&=-16777217,null;case 6:if(P&&C.stateNode!=null)P.memoizedProps!==W&&w_(C);else{if(typeof W!="string"&&C.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");if(P=z(fd.current),k=q(),Eh(C)){P=C.stateNode,k=C.memoizedProps,Z=!Q4,W=null;var le=$p;if(le!==null)switch(le.tag){case 3:Z&&(Z=vc(P,k,W),Z!==null&&(Y_(C,0).serverProps=Z));break;case 27:case 5:W=le.memoizedProps,Z&&(Z=vc(P,k,W),Z!==null&&(Y_(C,0).serverProps=Z))}P[cc]=C,P=!!(P.nodeValue===k||W!==null&&W.suppressHydrationWarning===!0||wp(P.nodeValue,k)),P||wh(C)}else Z=k.ancestorInfo.current,Z!=null&&mm(W,Z.tag,k.ancestorInfo.implicitRootScope),P=Ji(P).createTextNode(W),P[cc]=C,C.stateNode=P}return ua(C),null;case 13:if(W=C.memoizedState,P===null||P.memoizedState!==null&&P.memoizedState.dehydrated!==null){if(Z=Eh(C),W!==null&&W.dehydrated!==null){if(P===null){if(!Z)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(Z=C.memoizedState,Z=Z!==null?Z.dehydrated:null,!Z)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");Z[cc]=C,ua(C),(C.mode&Oc)!==Ba&&W!==null&&(Z=C.child,Z!==null&&(C.treeBaseDuration-=Z.treeBaseDuration))}else uy(),Hd(),(C.flags&128)===0&&(C.memoizedState=null),C.flags|=4,ua(C),(C.mode&Oc)!==Ba&&W!==null&&(Z=C.child,Z!==null&&(C.treeBaseDuration-=Z.treeBaseDuration));Z=!1}else Z=M2(),P!==null&&P.memoizedState!==null&&(P.memoizedState.hydrationErrors=Z),Z=!0;if(!Z)return C.flags&256?(s0(C),C):(s0(C),null)}return s0(C),(C.flags&128)!==0?(C.lanes=k,(C.mode&Oc)!==Ba&&$c(C),C):(k=W!==null,P=P!==null&&P.memoizedState!==null,k&&(W=C.child,Z=null,W.alternate!==null&&W.alternate.memoizedState!==null&&W.alternate.memoizedState.cachePool!==null&&(Z=W.alternate.memoizedState.cachePool.pool),le=null,W.memoizedState!==null&&W.memoizedState.cachePool!==null&&(le=W.memoizedState.cachePool.pool),le!==Z&&(W.flags|=2048)),k!==P&&k&&(C.child.flags|=8192),rg(C,C.updateQueue),ua(C),(C.mode&Oc)!==Ba&&k&&(P=C.child,P!==null&&(C.treeBaseDuration-=P.treeBaseDuration)),null);case 4:return j(C),P===null&&Ry(C.stateNode.containerInfo),ua(C),null;case 10:return Fu(C.type,C),ua(C),null;case 19:if(H(Xm,C),Z=C.memoizedState,Z===null)return ua(C),null;if(W=(C.flags&128)!==0,le=Z.rendering,le===null)if(W)wf(Z,!1);else{if(Pd!==Pb||P!==null&&(P.flags&128)!==0)for(P=C.child;P!==null;){if(le=$u(P),le!==null){for(C.flags|=128,wf(Z,!1),P=le.updateQueue,C.updateQueue=P,rg(C,P),C.subtreeFlags=0,P=k,k=C.child;k!==null;)cy(k,P),k=k.sibling;return O(Xm,Xm.current&yD|WI,C),C.child}P=P.sibling}Z.tail!==null&&Uh()>Tq&&(C.flags|=128,W=!0,wf(Z,!1),C.lanes=4194304)}else{if(!W)if(P=$u(le),P!==null){if(C.flags|=128,W=!0,P=P.updateQueue,C.updateQueue=P,rg(C,P),wf(Z,!0),Z.tail===null&&Z.tailMode==="hidden"&&!le.alternate&&!ha)return ua(C),null}else 2*Uh()-Z.renderingStartTime>Tq&&k!==536870912&&(C.flags|=128,W=!0,wf(Z,!1),C.lanes=4194304);Z.isBackwards?(le.sibling=C.child,C.child=le):(P=Z.last,P!==null?P.sibling=le:C.child=le,Z.last=le)}return Z.tail!==null?(P=Z.tail,Z.rendering=P,Z.tail=P.sibling,Z.renderingStartTime=Uh(),P.sibling=null,k=Xm.current,k=W?k&yD|WI:k&yD,O(Xm,k,C),P):(ua(C),null);case 22:case 23:return s0(C),v_(C),W=C.memoizedState!==null,P!==null?P.memoizedState!==null!==W&&(C.flags|=8192):W&&(C.flags|=8192),W?(k&536870912)!==0&&(C.flags&128)===0&&(ua(C),C.subtreeFlags&6&&(C.flags|=8192)):ua(C),k=C.updateQueue,k!==null&&rg(C,k.retryQueue),k=null,P!==null&&P.memoizedState!==null&&P.memoizedState.cachePool!==null&&(k=P.memoizedState.cachePool.pool),W=null,C.memoizedState!==null&&C.memoizedState.cachePool!==null&&(W=C.memoizedState.cachePool.pool),W!==k&&(C.flags|=2048),P!==null&&H(O3,C),null;case 24:return k=null,P!==null&&(k=P.memoizedState.cache),C.memoizedState.cache!==k&&(C.flags|=2048),Fu(r_,C),ua(C),null;case 25:return null;case 30:return null}throw Error("Unknown unit of work tag ("+C.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function j5(P,C){switch(_f(C),C.tag){case 1:return P=C.flags,P&65536?(C.flags=P&-65537|128,(C.mode&Oc)!==Ba&&$c(C),C):null;case 3:return Fu(r_,C),j(C),P=C.flags,(P&65536)!==0&&(P&128)===0?(C.flags=P&-65537|128,C):null;case 26:case 27:case 5:return ne(C),null;case 13:if(s0(C),P=C.memoizedState,P!==null&&P.dehydrated!==null){if(C.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");Hd()}return P=C.flags,P&65536?(C.flags=P&-65537|128,(C.mode&Oc)!==Ba&&$c(C),C):null;case 19:return H(Xm,C),null;case 4:return j(C),null;case 10:return Fu(C.type,C),null;case 22:case 23:return s0(C),v_(C),P!==null&&H(O3,C),P=C.flags,P&65536?(C.flags=P&-65537|128,(C.mode&Oc)!==Ba&&$c(C),C):null;case 24:return Fu(r_,C),null;case 25:return null;default:return null}}function N1(P,C){switch(_f(C),C.tag){case 3:Fu(r_,C),j(C);break;case 26:case 27:case 5:ne(C);break;case 4:j(C);break;case 13:s0(C);break;case 19:H(Xm,C);break;case 10:Fu(C.type,C);break;case 22:case 23:s0(C),v_(C),P!==null&&H(O3,C);break;case 24:Fu(r_,C)}}function Xd(P){return(P.mode&Oc)!==Ba}function by(P,C){Xd(P)?(Ah(),wm(C,P),K_()):wm(C,P)}function vs(P,C,k){Xd(P)?(Ah(),Ef(k,P,C),K_()):Ef(k,P,C)}function wm(P,C){try{var k=C.updateQueue,W=k!==null?k.lastEffect:null;if(W!==null){var Z=W.next;k=Z;do{if((k.tag&P)===P&&((P&G0)!==to?po!==null&&typeof po.markComponentPassiveEffectMountStarted=="function"&&po.markComponentPassiveEffectMountStarted(C):(P&Ri)!==to&&po!==null&&typeof po.markComponentLayoutEffectMountStarted=="function"&&po.markComponentLayoutEffectMountStarted(C),W=void 0,(P&li)!==to&&(ED=!0),W=Zt(C,hro,k),(P&li)!==to&&(ED=!1),(P&G0)!==to?po!==null&&typeof po.markComponentPassiveEffectMountStopped=="function"&&po.markComponentPassiveEffectMountStopped():(P&Ri)!==to&&po!==null&&typeof po.markComponentLayoutEffectMountStopped=="function"&&po.markComponentLayoutEffectMountStopped(),W!==void 0&&typeof W!="function")){var le=void 0;le=(k.tag&Ri)!==0?"useLayoutEffect":(k.tag&li)!==0?"useInsertionEffect":"useEffect";var Le=void 0;Le=W===null?" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof W.then=="function"?`
|
|
150
150
|
|
|
151
151
|
It looks like you wrote `+le+`(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:
|
|
152
152
|
|
|
@@ -159,11 +159,11 @@ It looks like you wrote `+le+`(async () => ...) or returned a Promise. Instead,
|
|
|
159
159
|
fetchData();
|
|
160
160
|
}, [someId]); // Or [] if effect doesn't need props or state
|
|
161
161
|
|
|
162
|
-
Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching`:" You returned: "+W,Zt(C,function(qe,dt){console.error("%s must not return anything besides a function, which is used for clean-up.%s",qe,dt)},le,Le)}k=k.next}while(k!==Z)}}catch(qe){_o(C,C.return,qe)}}function Ef(P,C,k){try{var W=C.updateQueue,Z=W!==null?W.lastEffect:null;if(Z!==null){var le=Z.next;W=le;do{if((W.tag&P)===P){var Le=W.inst,qe=Le.destroy;qe!==void 0&&(Le.destroy=void 0,(P&G0)!==to?po!==null&&typeof po.markComponentPassiveEffectUnmountStarted=="function"&&po.markComponentPassiveEffectUnmountStarted(C):(P&Ri)!==to&&po!==null&&typeof po.markComponentLayoutEffectUnmountStarted=="function"&&po.markComponentLayoutEffectUnmountStarted(C),(P&li)!==to&&(ED=!0),Z=C,Zt(Z,hro,Z,k,qe),(P&li)!==to&&(ED=!1),(P&G0)!==to?po!==null&&typeof po.markComponentPassiveEffectUnmountStopped=="function"&&po.markComponentPassiveEffectUnmountStopped():(P&Ri)!==to&&po!==null&&typeof po.markComponentLayoutEffectUnmountStopped=="function"&&po.markComponentLayoutEffectUnmountStopped())}W=W.next}while(W!==le)}}catch(dt){_o(C,C.return,dt)}}function Pp(P,C){Xd(P)?(Ah(),wm(C,P),K_()):wm(C,P)}function Py(P,C,k){Xd(P)?(Ah(),Ef(k,P,C),K_()):Ef(k,P,C)}function V4(P){var C=P.updateQueue;if(C!==null){var k=P.stateNode;P.type.defaultProps||"ref"in P.memoizedProps||PD||(k.props!==P.memoizedProps&&console.error("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",A(P)||"instance"),k.state!==P.memoizedState&&console.error("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",A(P)||"instance"));try{Zt(P,pf,C,k)}catch(W){_o(P,P.return,W)}}}function vy(P,C,k){return P.getSnapshotBeforeUpdate(C,k)}function $4(P,C){var k=C.memoizedProps,W=C.memoizedState;C=P.stateNode,P.type.defaultProps||"ref"in P.memoizedProps||PD||(C.props!==P.memoizedProps&&console.error("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",A(P)||"instance"),C.state!==P.memoizedState&&console.error("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",A(P)||"instance"));try{var Z=Lh(P.type,k,P.elementType===P.type),le=Zt(P,vy,C,Z,W);k=Gft,le!==void 0||k.has(P.type)||(k.add(P.type),Zt(P,function(){console.error("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",A(P))})),C.__reactInternalSnapshotBeforeUpdate=le}catch(Le){_o(P,P.return,Le)}}function Sy(P,C,k){k.props=Lh(P.type,P.memoizedProps),k.state=P.memoizedState,Xd(P)?(Ah(),Zt(P,bft,P,C,k),K_()):Zt(P,bft,P,C,k)}function Cy(P){var C=P.ref;if(C!==null){switch(P.tag){case 26:case 27:case 5:var k=P.stateNode;break;case 30:k=P.stateNode;break;default:k=P.stateNode}if(typeof C=="function")if(Xd(P))try{Ah(),P.refCleanup=C(k)}finally{K_()}else P.refCleanup=C(k);else typeof C=="string"?console.error("String refs are no longer supported."):C.hasOwnProperty("current")||console.error("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",A(P)),C.current=k}}function Em(P,C){try{Zt(P,Cy,P)}catch(k){_o(P,C,k)}}function Bh(P,C){var k=P.ref,W=P.refCleanup;if(k!==null)if(typeof W=="function")try{if(Xd(P))try{Ah(),Zt(P,W)}finally{K_(P)}else Zt(P,W)}catch(Z){_o(P,C,Z)}finally{P.refCleanup=null,P=P.alternate,P!=null&&(P.refCleanup=null)}else if(typeof k=="function")try{if(Xd(P))try{Ah(),Zt(P,k,null)}finally{K_(P)}else Zt(P,k,null)}catch(Z){_o(P,C,Z)}else k.current=null}function W4(P,C,k,W){var Z=P.memoizedProps,le=Z.id,Le=Z.onCommit;Z=Z.onRender,C=C===null?"mount":"update",yC&&(C="nested-update"),typeof Z=="function"&&Z(le,C,P.actualDuration,P.treeBaseDuration,P.actualStartTime,k),typeof Le=="function"&&Le(P.memoizedProps.id,C,W,k)}function H1(P,C,k,W){var Z=P.memoizedProps;P=Z.id,Z=Z.onPostCommit,C=C===null?"mount":"update",yC&&(C="nested-update"),typeof Z=="function"&&Z(P,C,W,k)}function q2(P){var C=P.type,k=P.memoizedProps,W=P.stateNode;try{Zt(P,Lm,W,C,k,P)}catch(Z){_o(P,P.return,Z)}}function Df(P,C,k){try{Zt(P,Bi,P.stateNode,P.type,k,C,P)}catch(W){_o(P,P.return,W)}}function Ol(P){return P.tag===5||P.tag===3||P.tag===26||P.tag===27&&ea(P.type)||P.tag===4}function jd(P){e:for(;;){for(;P.sibling===null;){if(P.return===null||Ol(P.return))return null;P=P.return}for(P.sibling.return=P.return,P=P.sibling;P.tag!==5&&P.tag!==6&&P.tag!==18;){if(P.tag===27&&ea(P.type)||P.flags&2||P.child===null||P.tag===4)continue e;P.child.return=P,P=P.child}if(!(P.flags&2))return P.stateNode}}function My(P,C,k){var W=P.tag;if(W===5||W===6)P=P.stateNode,C?(k.nodeType===9?k.body:k.nodeName==="HTML"?k.ownerDocument.body:k).insertBefore(P,C):(C=k.nodeType===9?k.body:k.nodeName==="HTML"?k.ownerDocument.body:k,C.appendChild(P),k=k._reactRootContainer,k!=null||C.onclick!==null||(C.onclick=ld));else if(W!==4&&(W===27&&ea(P.type)&&(k=P.stateNode,C=null),P=P.child,P!==null))for(My(P,C,k),P=P.sibling;P!==null;)My(P,C,k),P=P.sibling}function xr(P,C,k){var W=P.tag;if(W===5||W===6)P=P.stateNode,C?k.insertBefore(P,C):k.appendChild(P);else if(W!==4&&(W===27&&ea(P.type)&&(k=P.stateNode),P=P.child,P!==null))for(xr(P,C,k),P=P.sibling;P!==null;)xr(P,C,k),P=P.sibling}function vp(P){for(var C,k=P.return;k!==null;){if(Ol(k)){C=k;break}k=k.return}if(C==null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");switch(C.tag){case 27:C=C.stateNode,k=jd(P),xr(P,k,C);break;case 5:k=C.stateNode,C.flags&32&&(Ca(k),C.flags&=-33),C=jd(P),xr(P,C,k);break;case 3:case 4:C=C.stateNode.containerInfo,k=jd(P),My(P,k,C);break;default:throw Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}function G5(P){var C=P.stateNode,k=P.memoizedProps;try{Zt(P,Ya,P.type,k,C,P)}catch(W){_o(P,P.return,W)}}function Uu(P,C){if(P=P.containerInfo,T4e=$q,P=b2(P),Gx(P)){if("selectionStart"in P)var k={start:P.selectionStart,end:P.selectionEnd};else e:{k=(k=P.ownerDocument)&&k.defaultView||window;var W=k.getSelection&&k.getSelection();if(W&&W.rangeCount!==0){k=W.anchorNode;var Z=W.anchorOffset,le=W.focusNode;W=W.focusOffset;try{k.nodeType,le.nodeType}catch{k=null;break e}var Le=0,qe=-1,dt=-1,yt=0,mn=0,vn=P,_n=null;t:for(;;){for(var Dn;vn!==k||Z!==0&&vn.nodeType!==3||(qe=Le+Z),vn!==le||W!==0&&vn.nodeType!==3||(dt=Le+W),vn.nodeType===3&&(Le+=vn.nodeValue.length),(Dn=vn.firstChild)!==null;)_n=vn,vn=Dn;for(;;){if(vn===P)break t;if(_n===k&&++yt===Z&&(qe=Le),_n===le&&++mn===W&&(dt=Le),(Dn=vn.nextSibling)!==null)break;vn=_n,_n=vn.parentNode}vn=Dn}k=qe===-1||dt===-1?null:{start:qe,end:dt}}else k=null}k=k||{start:0,end:0}}else k=null;for(w4e={focusedElem:P,selectionRange:k},$q=!1,Up=C;Up!==null;)if(C=Up,P=C.child,(C.subtreeFlags&1024)!==0&&P!==null)P.return=C,Up=P;else for(;Up!==null;){switch(P=C=Up,k=P.alternate,Z=P.flags,P.tag){case 0:break;case 11:case 15:break;case 1:(Z&1024)!==0&&k!==null&&$4(P,k);break;case 3:if((Z&1024)!==0){if(P=P.stateNode.containerInfo,k=P.nodeType,k===9)Om(P);else if(k===1)switch(P.nodeName){case"HEAD":case"HTML":case"BODY":Om(P);break;default:P.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((Z&1024)!==0)throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}if(P=C.sibling,P!==null){P.return=C.return,Up=P;break}Up=C.return}}function J2(P,C,k){var W=k.flags;switch(k.tag){case 0:case 11:case 15:Gd(P,k),W&4&&by(k,Ri|mo);break;case 1:if(Gd(P,k),W&4)if(P=k.stateNode,C===null)k.type.defaultProps||"ref"in k.memoizedProps||PD||(P.props!==k.memoizedProps&&console.error("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",A(k)||"instance"),P.state!==k.memoizedState&&console.error("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",A(k)||"instance")),Xd(k)?(Ah(),Zt(k,e4e,k,P),K_()):Zt(k,e4e,k,P);else{var Z=Lh(k.type,C.memoizedProps);C=C.memoizedState,k.type.defaultProps||"ref"in k.memoizedProps||PD||(P.props!==k.memoizedProps&&console.error("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",A(k)||"instance"),P.state!==k.memoizedState&&console.error("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",A(k)||"instance")),Xd(k)?(Ah(),Zt(k,xft,k,P,Z,C,P.__reactInternalSnapshotBeforeUpdate),K_()):Zt(k,xft,k,P,Z,C,P.__reactInternalSnapshotBeforeUpdate)}W&64&&V4(k),W&512&&Em(k,k.return);break;case 3:if(C=du(),Gd(P,k),W&64&&(W=k.updateQueue,W!==null)){if(Z=null,k.child!==null)switch(k.child.tag){case 27:case 5:Z=k.child.stateNode;break;case 1:Z=k.child.stateNode}try{Zt(k,pf,W,Z)}catch(Le){_o(k,k.return,Le)}}P.effectDuration+=ym(C);break;case 27:C===null&&W&4&&G5(k);case 26:case 5:Gd(P,k),C===null&&W&4&&q2(k),W&512&&Em(k,k.return);break;case 12:if(W&4){W=du(),Gd(P,k),P=k.stateNode,P.effectDuration+=hp(W);try{Zt(k,W4,k,C,mD,P.effectDuration)}catch(Le){_o(k,k.return,Le)}}else Gd(P,k);break;case 13:Gd(P,k),W&4&&Xu(P,k),W&64&&(P=k.memoizedState,P!==null&&(P=P.dehydrated,P!==null&&(k=Gu.bind(null,k),oi(P,k))));break;case 22:if(W=k.memoizedState!==null||bb,!W){C=C!==null&&C.memoizedState!==null||rh,Z=bb;var le=rh;bb=W,(rh=C)&&!le?Sp(P,k,(k.subtreeFlags&8772)!==0):Gd(P,k),bb=Z,rh=le}break;case 30:break;default:Gd(P,k)}}function pl(P){var C=P.alternate;C!==null&&(P.alternate=null,pl(C)),P.child=null,P.deletions=null,P.sibling=null,P.tag===5&&(C=P.stateNode,C!==null&&Ot(C)),P.stateNode=null,P._debugOwner=null,P.return=null,P.dependencies=null,P.memoizedProps=null,P.memoizedState=null,P.pendingProps=null,P.stateNode=null,P.updateQueue=null}function Dm(P,C,k){for(k=k.child;k!==null;)Af(P,C,k),k=k.sibling}function Af(P,C,k){if(Wl&&typeof Wl.onCommitFiberUnmount=="function")try{Wl.onCommitFiberUnmount(Mu,k)}catch(le){W0||(W0=!0,console.error("React instrumentation encountered an error: %s",le))}switch(k.tag){case 26:rh||Bh(k,C),Dm(P,C,k),k.memoizedState?k.memoizedState.count--:k.stateNode&&(k=k.stateNode,k.parentNode.removeChild(k));break;case 27:rh||Bh(k,C);var W=Jh,Z=Cg;ea(k.type)&&(Jh=k.stateNode,Cg=!1),Dm(P,C,k),Zt(k,Vl,k.stateNode),Jh=W,Cg=Z;break;case 5:rh||Bh(k,C);case 6:if(W=Jh,Z=Cg,Jh=null,Dm(P,C,k),Jh=W,Cg=Z,Jh!==null)if(Cg)try{Zt(k,Ff,Jh,k.stateNode)}catch(le){_o(k,C,le)}else try{Zt(k,m0,Jh,k.stateNode)}catch(le){_o(k,C,le)}break;case 18:Jh!==null&&(Cg?(P=Jh,Dp(P.nodeType===9?P.body:P.nodeName==="HTML"?P.ownerDocument.body:P,k.stateNode),_g(P)):Dp(Jh,k.stateNode));break;case 4:W=Jh,Z=Cg,Jh=k.stateNode.containerInfo,Cg=!0,Dm(P,C,k),Jh=W,Cg=Z;break;case 0:case 11:case 14:case 15:rh||Ef(li,k,C),rh||vs(k,C,Ri),Dm(P,C,k);break;case 1:rh||(Bh(k,C),W=k.stateNode,typeof W.componentWillUnmount=="function"&&Sy(k,C,W)),Dm(P,C,k);break;case 21:Dm(P,C,k);break;case 22:rh=(W=rh)||k.memoizedState!==null,Dm(P,C,k),rh=W;break;default:Dm(P,C,k)}}function Xu(P,C){if(C.memoizedState===null&&(P=C.alternate,P!==null&&(P=P.memoizedState,P!==null&&(P=P.dehydrated,P!==null))))try{Zt(C,Ha,P)}catch(k){_o(C,C.return,k)}}function ig(P){switch(P.tag){case 13:case 19:var C=P.stateNode;return C===null&&(C=P.stateNode=new Yft),C;case 22:return P=P.stateNode,C=P._retryCache,C===null&&(C=P._retryCache=new Yft),C;default:throw Error("Unexpected Suspense handler tag ("+P.tag+"). This is a bug in React.")}}function E_(P,C){var k=ig(P);C.forEach(function(W){var Z=sc.bind(null,P,W);if(!k.has(W)){if(k.add(W),qa)if(vD!==null&&SD!==null)Ic(SD,vD);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");W.then(Z,Z)}})}function ba(P,C){var k=C.deletions;if(k!==null)for(var W=0;W<k.length;W++){var Z=P,le=C,Le=k[W],qe=le;e:for(;qe!==null;){switch(qe.tag){case 27:if(ea(qe.type)){Jh=qe.stateNode,Cg=!1;break e}break;case 5:Jh=qe.stateNode,Cg=!1;break e;case 3:case 4:Jh=qe.stateNode.containerInfo,Cg=!0;break e}qe=qe.return}if(Jh===null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");Af(Z,le,Le),Jh=null,Cg=!1,Z=Le,le=Z.alternate,le!==null&&(le.return=null),Z.return=null}if(C.subtreeFlags&13878)for(C=C.child;C!==null;)Ty(C,P),C=C.sibling}function Ty(P,C){var k=P.alternate,W=P.flags;switch(P.tag){case 0:case 11:case 14:case 15:ba(C,P),Co(P),W&4&&(Ef(li|mo,P,P.return),wm(li|mo,P),vs(P,P.return,Ri|mo));break;case 1:ba(C,P),Co(P),W&512&&(rh||k===null||Bh(k,k.return)),W&64&&bb&&(P=P.updateQueue,P!==null&&(W=P.callbacks,W!==null&&(k=P.shared.hiddenCallbacks,P.shared.hiddenCallbacks=k===null?W:k.concat(W))));break;case 26:var Z=n6;if(ba(C,P),Co(P),W&512&&(rh||k===null||Bh(k,k.return)),W&4)if(C=k!==null?k.memoizedState:null,W=P.memoizedState,k===null)if(W===null)if(P.stateNode===null){e:{W=P.type,k=P.memoizedProps,C=Z.ownerDocument||Z;t:switch(W){case"title":Z=C.getElementsByTagName("title")[0],(!Z||Z[sx]||Z[cc]||Z.namespaceURI===Gh||Z.hasAttribute("itemprop"))&&(Z=C.createElement(W),C.head.insertBefore(Z,C.querySelector("head > title"))),Lc(Z,W,k),Z[cc]=P,tt(Z),W=Z;break e;case"link":var le=nx("link","href",C).get(W+(k.href||""));if(le){for(var Le=0;Le<le.length;Le++)if(Z=le[Le],Z.getAttribute("href")===(k.href==null||k.href===""?null:k.href)&&Z.getAttribute("rel")===(k.rel==null?null:k.rel)&&Z.getAttribute("title")===(k.title==null?null:k.title)&&Z.getAttribute("crossorigin")===(k.crossOrigin==null?null:k.crossOrigin)){le.splice(Le,1);break t}}Z=C.createElement(W),Lc(Z,W,k),C.head.appendChild(Z);break;case"meta":if(le=nx("meta","content",C).get(W+(k.content||""))){for(Le=0;Le<le.length;Le++)if(Z=le[Le],ie(k.content,"content"),Z.getAttribute("content")===(k.content==null?null:""+k.content)&&Z.getAttribute("name")===(k.name==null?null:k.name)&&Z.getAttribute("property")===(k.property==null?null:k.property)&&Z.getAttribute("http-equiv")===(k.httpEquiv==null?null:k.httpEquiv)&&Z.getAttribute("charset")===(k.charSet==null?null:k.charSet)){le.splice(Le,1);break t}}Z=C.createElement(W),Lc(Z,W,k),C.head.appendChild(Z);break;default:throw Error('getNodesForType encountered a type it did not expect: "'+W+'". This is a bug in React.')}Z[cc]=P,tt(Z),W=Z}P.stateNode=W}else Ny(Z,P.type,P.stateNode);else P.stateNode=kr(Z,W,P.memoizedProps);else C!==W?(C===null?k.stateNode!==null&&(k=k.stateNode,k.parentNode.removeChild(k)):C.count--,W===null?Ny(Z,P.type,P.stateNode):kr(Z,W,P.memoizedProps)):W===null&&P.stateNode!==null&&Df(P,P.memoizedProps,k.memoizedProps);break;case 27:ba(C,P),Co(P),W&512&&(rh||k===null||Bh(k,k.return)),k!==null&&W&4&&Df(P,P.memoizedProps,k.memoizedProps);break;case 5:if(ba(C,P),Co(P),W&512&&(rh||k===null||Bh(k,k.return)),P.flags&32){C=P.stateNode;try{Zt(P,Ca,C)}catch(mn){_o(P,P.return,mn)}}W&4&&P.stateNode!=null&&(C=P.memoizedProps,Df(P,C,k!==null?k.memoizedProps:C)),W&1024&&(a4e=!0,P.type!=="form"&&console.error("Unexpected host component type. Expected a form. This is a bug in React."));break;case 6:if(ba(C,P),Co(P),W&4){if(P.stateNode===null)throw Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");W=P.memoizedProps,k=k!==null?k.memoizedProps:W,C=P.stateNode;try{Zt(P,zl,C,k,W)}catch(mn){_o(P,P.return,mn)}}break;case 3:if(Z=du(),Bq=null,le=n6,n6=dd(C.containerInfo),ba(C,P),n6=le,Co(P),W&4&&k!==null&&k.memoizedState.isDehydrated)try{Zt(P,zf,C.containerInfo)}catch(mn){_o(P,P.return,mn)}a4e&&(a4e=!1,a0(P)),C.effectDuration+=ym(Z);break;case 4:W=n6,n6=dd(P.stateNode.containerInfo),ba(C,P),Co(P),n6=W;break;case 12:W=du(),ba(C,P),Co(P),P.stateNode.effectDuration+=hp(W);break;case 13:ba(C,P),Co(P),P.child.flags&8192&&P.memoizedState!==null!=(k!==null&&k.memoizedState!==null)&&(h4e=Uh()),W&4&&(W=P.updateQueue,W!==null&&(P.updateQueue=null,E_(P,W)));break;case 22:Z=P.memoizedState!==null;var qe=k!==null&&k.memoizedState!==null,dt=bb,yt=rh;if(bb=dt||Z,rh=yt||qe,ba(C,P),rh=yt,bb=dt,Co(P),W&8192)e:for(C=P.stateNode,C._visibility=Z?C._visibility&~Oa:C._visibility|Oa,Z&&(k===null||qe||bb||rh||ju(P)),k=null,C=P;;){if(C.tag===5||C.tag===26){if(k===null){qe=k=C;try{le=qe.stateNode,Z?Zt(qe,$0,le):Zt(qe,tx,qe.stateNode,qe.memoizedProps)}catch(mn){_o(qe,qe.return,mn)}}}else if(C.tag===6){if(k===null){qe=C;try{Le=qe.stateNode,Z?Zt(qe,ex,Le):Zt(qe,B1,Le,qe.memoizedProps)}catch(mn){_o(qe,qe.return,mn)}}}else if((C.tag!==22&&C.tag!==23||C.memoizedState===null||C===P)&&C.child!==null){C.child.return=C,C=C.child;continue}if(C===P)break e;for(;C.sibling===null;){if(C.return===null||C.return===P)break e;k===C&&(k=null),C=C.return}k===C&&(k=null),C.sibling.return=C.return,C=C.sibling}W&4&&(W=P.updateQueue,W!==null&&(k=W.retryQueue,k!==null&&(W.retryQueue=null,E_(P,k))));break;case 19:ba(C,P),Co(P),W&4&&(W=P.updateQueue,W!==null&&(P.updateQueue=null,E_(P,W)));break;case 30:break;case 21:break;default:ba(C,P),Co(P)}}function Co(P){var C=P.flags;if(C&2){try{Zt(P,vp,P)}catch(k){_o(P,P.return,k)}P.flags&=-3}C&4096&&(P.flags&=-4097)}function a0(P){if(P.subtreeFlags&1024)for(P=P.child;P!==null;){var C=P;a0(C),C.tag===5&&C.flags&1024&&C.stateNode.reset(),P=P.sibling}}function Gd(P,C){if(C.subtreeFlags&8772)for(C=C.child;C!==null;)J2(P,C.alternate,C),C=C.sibling}function sd(P){switch(P.tag){case 0:case 11:case 14:case 15:vs(P,P.return,Ri),ju(P);break;case 1:Bh(P,P.return);var C=P.stateNode;typeof C.componentWillUnmount=="function"&&Sy(P,P.return,C),ju(P);break;case 27:Zt(P,Vl,P.stateNode);case 26:case 5:Bh(P,P.return),ju(P);break;case 22:P.memoizedState===null&&ju(P);break;case 30:ju(P);break;default:ju(P)}}function ju(P){for(P=P.child;P!==null;)sd(P),P=P.sibling}function ni(P,C,k,W){var Z=k.flags;switch(k.tag){case 0:case 11:case 15:Sp(P,k,W),by(k,Ri);break;case 1:if(Sp(P,k,W),C=k.stateNode,typeof C.componentDidMount=="function"&&Zt(k,e4e,k,C),C=k.updateQueue,C!==null){P=k.stateNode;try{Zt(k,Z_,C,P)}catch(le){_o(k,k.return,le)}}W&&Z&64&&V4(k),Em(k,k.return);break;case 27:G5(k);case 26:case 5:Sp(P,k,W),W&&C===null&&Z&4&&q2(k),Em(k,k.return);break;case 12:if(W&&Z&4){Z=du(),Sp(P,k,W),W=k.stateNode,W.effectDuration+=hp(Z);try{Zt(k,W4,k,C,mD,W.effectDuration)}catch(le){_o(k,k.return,le)}}else Sp(P,k,W);break;case 13:Sp(P,k,W),W&&Z&4&&Xu(P,k);break;case 22:k.memoizedState===null&&Sp(P,k,W),Em(k,k.return);break;case 30:break;default:Sp(P,k,W)}}function Sp(P,C,k){for(k=k&&(C.subtreeFlags&8772)!==0,C=C.child;C!==null;)ni(P,C.alternate,C,k),C=C.sibling}function yc(P,C){var k=null;P!==null&&P.memoizedState!==null&&P.memoizedState.cachePool!==null&&(k=P.memoizedState.cachePool.pool),P=null,C.memoizedState!==null&&C.memoizedState.cachePool!==null&&(P=C.memoizedState.cachePool.pool),P!==k&&(P!=null&&n0(P),k!=null&&q_(k))}function Ea(P,C){P=null,C.alternate!==null&&(P=C.alternate.memoizedState.cache),C=C.memoizedState.cache,C!==P&&(n0(C),P!=null&&q_(P))}function Kn(P,C,k,W){if(C.subtreeFlags&10256)for(C=C.child;C!==null;)zh(P,C,k,W),C=C.sibling}function zh(P,C,k,W){var Z=C.flags;switch(C.tag){case 0:case 11:case 15:Kn(P,C,k,W),Z&2048&&Pp(C,G0|mo);break;case 1:Kn(P,C,k,W);break;case 3:var le=du();Kn(P,C,k,W),Z&2048&&(k=null,C.alternate!==null&&(k=C.alternate.memoizedState.cache),C=C.memoizedState.cache,C!==k&&(n0(C),k!=null&&q_(k))),P.passiveEffectDuration+=ym(le);break;case 12:if(Z&2048){Z=du(),Kn(P,C,k,W),P=C.stateNode,P.passiveEffectDuration+=hp(Z);try{Zt(C,H1,C,C.alternate,mD,P.passiveEffectDuration)}catch(qe){_o(C,C.return,qe)}}else Kn(P,C,k,W);break;case 13:Kn(P,C,k,W);break;case 23:break;case 22:le=C.stateNode;var Le=C.alternate;C.memoizedState!==null?le._visibility&L_?Kn(P,C,k,W):Pa(P,C):le._visibility&L_?Kn(P,C,k,W):(le._visibility|=L_,Da(P,C,k,W,(C.subtreeFlags&10256)!==0)),Z&2048&&yc(Le,C);break;case 24:Kn(P,C,k,W),Z&2048&&Ea(C.alternate,C);break;default:Kn(P,C,k,W)}}function Da(P,C,k,W,Z){for(Z=Z&&(C.subtreeFlags&10256)!==0,C=C.child;C!==null;)Cp(P,C,k,W,Z),C=C.sibling}function Cp(P,C,k,W,Z){var le=C.flags;switch(C.tag){case 0:case 11:case 15:Da(P,C,k,W,Z),Pp(C,G0);break;case 23:break;case 22:var Le=C.stateNode;C.memoizedState!==null?Le._visibility&L_?Da(P,C,k,W,Z):Pa(P,C):(Le._visibility|=L_,Da(P,C,k,W,Z)),Z&&le&2048&&yc(C.alternate,C);break;case 24:Da(P,C,k,W,Z),Z&&le&2048&&Ea(C.alternate,C);break;default:Da(P,C,k,W,Z)}}function Pa(P,C){if(C.subtreeFlags&10256)for(C=C.child;C!==null;){var k=P,W=C,Z=W.flags;switch(W.tag){case 22:Pa(k,W),Z&2048&&yc(W.alternate,W);break;case 24:Pa(k,W),Z&2048&&Ea(W.alternate,W);break;default:Pa(k,W)}C=C.sibling}}function ad(P){if(P.subtreeFlags&UI)for(P=P.child;P!==null;)bc(P),P=P.sibling}function bc(P){switch(P.tag){case 26:ad(P),P.flags&UI&&P.memoizedState!==null&&L(n6,P.memoizedState,P.memoizedProps);break;case 5:ad(P);break;case 3:case 4:var C=n6;n6=dd(P.stateNode.containerInfo),ad(P),n6=C;break;case 22:P.memoizedState===null&&(C=P.alternate,C!==null&&C.memoizedState!==null?(C=UI,UI=16777216,ad(P),UI=C):ad(P));break;default:ad(P)}}function Yd(P){var C=P.alternate;if(C!==null&&(P=C.child,P!==null)){C.child=null;do C=P.sibling,P.sibling=null,P=C;while(P!==null)}}function c0(P){var C=P.deletions;if((P.flags&16)!==0){if(C!==null)for(var k=0;k<C.length;k++){var W=C[k];Up=W,Ss(W,P)}Yd(P)}if(P.subtreeFlags&10256)for(P=P.child;P!==null;)l0(P),P=P.sibling}function l0(P){switch(P.tag){case 0:case 11:case 15:c0(P),P.flags&2048&&Py(P,P.return,G0|mo);break;case 3:var C=du();c0(P),P.stateNode.passiveEffectDuration+=ym(C);break;case 12:C=du(),c0(P),P.stateNode.passiveEffectDuration+=hp(C);break;case 22:C=P.stateNode,P.memoizedState!==null&&C._visibility&L_&&(P.return===null||P.return.tag!==13)?(C._visibility&=~L_,K2(P)):c0(P);break;default:c0(P)}}function K2(P){var C=P.deletions;if((P.flags&16)!==0){if(C!==null)for(var k=0;k<C.length;k++){var W=C[k];Up=W,Ss(W,P)}Yd(P)}for(P=P.child;P!==null;)Q2(P),P=P.sibling}function Q2(P){switch(P.tag){case 0:case 11:case 15:Py(P,P.return,G0),K2(P);break;case 22:var C=P.stateNode;C._visibility&L_&&(C._visibility&=~L_,K2(P));break;default:K2(P)}}function Ss(P,C){for(;Up!==null;){var k=Up,W=k;switch(W.tag){case 0:case 11:case 15:Py(W,C,G0);break;case 23:case 22:W.memoizedState!==null&&W.memoizedState.cachePool!==null&&(W=W.memoizedState.cachePool.pool,W!=null&&n0(W));break;case 24:q_(W.memoizedState.cache)}if(W=k.child,W!==null)W.return=k,Up=W;else e:for(k=P;Up!==null;){W=Up;var Z=W.sibling,le=W.return;if(pl(W),W===k){Up=null;break e}if(Z!==null){Z.return=le,Up=Z;break e}Up=le}}}function B0(){pro.forEach(function(P){return P()})}function I1(){var P=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;return P||an.actQueue===null||console.error("The current testing environment is not configured to support act(...)"),P}function bu(P){if((Fc&px)!==Wy&&oa!==0)return oa&-oa;var C=an.T;return C!==null?(C._updatedFibers||(C._updatedFibers=new Set),C._updatedFibers.add(P),P=L3,P!==0?P:Ay()):Lt()}function U4(){Xy===0&&(Xy=(oa&536870912)===0||ha?Pe():536870912);var P=t4.current;return P!==null&&(P.flags|=32),Xy}function Zs(P,C,k){if(ED&&console.error("useInsertionEffect must not schedule updates."),g4e&&(wq=!0),(P===g0&&(Qc===SC||Qc===CC)||P.cancelPendingCommit!==null)&&(Z2(P,0),Am(P,oa,Xy,!1)),ze(P,k),(Fc&px)!==0&&P===g0){if(j0)switch(C.tag){case 0:case 11:case 15:P=Ys&&A(Ys)||"Unknown",r1t.has(P)||(r1t.add(P),C=A(C)||"Unknown",console.error("Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://react.dev/link/setstate-in-render",C,P,P));break;case 1:o1t||(console.error("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),o1t=!0)}}else qa&<(P,C,k),Ey(C),P===g0&&((Fc&px)===Wy&&(y7|=k),Pd===vC&&Am(P,oa,Xy,!1)),d0(P)}function Ar(P,C,k){if((Fc&(px|o6))!==Wy)throw Error("Should not already be working.");var W=!k&&(C&124)===0&&(C&P.expiredLanes)===0||Ve(P,C),Z=W?Rm(P,C):O1(P,C,!0),le=W;do{if(Z===Pb){TD&&!W&&Am(P,C,0,!1);break}else{if(k=P.current.alternate,le&&!w3(k)){Z=O1(P,C,!1),le=!1;continue}if(Z===CD){if(le=C,P.errorRecoveryDisabledLanes&le)var Le=0;else Le=P.pendingLanes&-536870913,Le=Le!==0?Le:Le&536870912?536870912:0;if(Le!==0){C=Le;e:{Z=P;var qe=Le;Le=JI;var dt=Z.current.memoizedState.isDehydrated;if(dt&&(Z2(Z,qe).flags|=256),qe=O1(Z,qe,!1),qe!==CD){if(_4e&&!dt){Z.errorRecoveryDisabledLanes|=le,y7|=le,Z=vC;break e}Z=fx,fx=Le,Z!==null&&(fx===null?fx=Z:fx.push.apply(fx,Z))}Z=qe}if(le=!1,Z!==CD)continue}}if(Z===jI){Z2(P,0),Am(P,C,0,!0);break}e:{switch(W=P,Z){case Pb:case jI:throw Error("Root did not complete. This is a bug in React.");case vC:if((C&4194048)!==C)break;case Cq:Am(W,C,Xy,!x7);break e;case CD:fx=null;break;case c4e:case qft:break;default:throw Error("Unknown root exit status.")}if(an.actQueue!==null)Hc(W,k,C,fx,KI,Mq,Xy,y7,MC);else{if((C&62914560)===C&&(le=h4e+Kft-Uh(),10<le)){if(Am(W,C,Xy,!x7),Ne(W,0,!0)!==0)break e;W.timeoutHandle=d1t(sn.bind(null,W,k,fx,KI,Mq,C,Xy,y7,MC,x7,Z,yro,FI,0),le);break e}sn(W,k,fx,KI,Mq,C,Xy,y7,MC,x7,Z,xro,FI,0)}}}break}while(!0);d0(P)}function sn(P,C,k,W,Z,le,Le,qe,dt,yt,mn,vn,_n,Dn){if(P.timeoutHandle=AC,vn=C.subtreeFlags,(vn&8192||(vn&16785408)===16785408)&&(oL={stylesheets:null,count:0,unsuspend:$l},bc(C),vn=B(),vn!==null)){P.cancelPendingCommit=vn(Hc.bind(null,P,C,le,k,W,Z,Le,qe,dt,mn,gro,_n,Dn)),Am(P,le,Le,!yt);return}Hc(P,C,le,k,W,Z,Le,qe,dt)}function w3(P){for(var C=P;;){var k=C.tag;if((k===0||k===11||k===15)&&C.flags&16384&&(k=C.updateQueue,k!==null&&(k=k.stores,k!==null)))for(var W=0;W<k.length;W++){var Z=k[W],le=Z.getSnapshot;Z=Z.value;try{if(!bd(le(),Z))return!1}catch{return!1}}if(k=C.child,C.subtreeFlags&16384&&k!==null)k.return=C,C=k;else{if(C===P)break;for(;C.sibling===null;){if(C.return===null||C.return===P)return!0;C=C.return}C.sibling.return=C.return,C=C.sibling}}return!0}function Am(P,C,k,W){C&=~d4e,C&=~y7,P.suspendedLanes|=C,P.pingedLanes&=~C,W&&(P.warmLanes|=C),W=P.expirationTimes;for(var Z=C;0<Z;){var le=31-Jc(Z),Le=1<<le;W[le]=-1,Z&=~Le}k!==0&&et(P,k,C)}function L1(){return(Fc&(px|o6))===Wy?(qd(0),!1):!0}function u0(){if(Ys!==null){if(Qc===Mg)var P=Ys.return;else P=Ys,S1(),r0(P),xD=null,$I=0,P=Ys;for(;P!==null;)N1(P.alternate,P),P=P.return;Ys=null}}function Z2(P,C){var k=P.timeoutHandle;k!==AC&&(P.timeoutHandle=AC,kro(k)),k=P.cancelPendingCommit,k!==null&&(P.cancelPendingCommit=null,k()),u0(),g0=P,Ys=k=Th(P.current,null),oa=C,Qc=Mg,Uy=null,x7=!1,TD=Ve(P,C),_4e=!1,Pd=Pb,MC=Xy=d4e=y7=g7=0,fx=JI=null,Mq=!1,(C&8)!==0&&(C|=C&32);var W=P.entangledLanes;if(W!==0)for(P=P.entanglements,W&=C;0<W;){var Z=31-Jc(W),le=1<<Z;C|=P[Z],W&=~le}return z3=C,Nl(),C=dD(),1e3<C-Z4&&(an.recentlyCreatedOwnerStacks=0,Z4=C),vg.discardPendingWarnings(),k}function fl(P,C){Zi=null,an.H=vq,an.getCurrentStack=null,j0=!1,t_=null,C===ye||C===pt?(C=Ld(),Qc=YI):C===Ke?(C=Ld(),Qc=Jft):Qc=C===zft?u4e:C!==null&&typeof C=="object"&&typeof C.then=="function"?MD:GI,Uy=C;var k=Ys;if(k===null)Pd=jI,z2(P,Lu(C,P.current));else switch(k.mode&Oc&&J_(k),xe(),Qc){case GI:po!==null&&typeof po.markComponentErrored=="function"&&po.markComponentErrored(k,C,oa);break;case SC:case CC:case YI:case MD:case qI:po!==null&&typeof po.markComponentSuspended=="function"&&po.markComponentSuspended(k,C,oa)}}function _0(){var P=an.H;return an.H=vq,P===null?vq:P}function wy(){var P=an.A;return an.A=mro,P}function sg(){Pd=vC,x7||(oa&4194048)!==oa&&t4.current!==null||(TD=!0),(g7&134217727)===0&&(y7&134217727)===0||g0===null||Am(g0,oa,Xy,!1)}function O1(P,C,k){var W=Fc;Fc|=px;var Z=_0(),le=wy();if(g0!==P||oa!==C){if(qa){var Le=P.memoizedUpdaters;0<Le.size&&(Ic(P,oa),Le.clear()),xt(P,C)}KI=null,Z2(P,C)}We(C),C=!1,Le=Pd;e:do try{if(Qc!==Mg&&Ys!==null){var qe=Ys,dt=Uy;switch(Qc){case u4e:u0(),Le=Cq;break e;case YI:case SC:case CC:case MD:t4.current===null&&(C=!0);var yt=Qc;if(Qc=Mg,Uy=null,va(P,qe,dt,yt),k&&TD){Le=Pb;break e}break;default:yt=Qc,Qc=Mg,Uy=null,va(P,qe,dt,yt)}}ag(),Le=Pd;break}catch(mn){fl(P,mn)}while(!0);return C&&P.shellSuspendCounter++,S1(),Fc=W,an.H=Z,an.A=le,Xe(),Ys===null&&(g0=null,oa=0,Nl()),Le}function ag(){for(;Ys!==null;)cg(Ys)}function Rm(P,C){var k=Fc;Fc|=px;var W=_0(),Z=wy();if(g0!==P||oa!==C){if(qa){var le=P.memoizedUpdaters;0<le.size&&(Ic(P,oa),le.clear()),xt(P,C)}KI=null,Tq=Uh()+Qft,Z2(P,C)}else TD=Ve(P,C);We(C);e:do try{if(Qc!==Mg&&Ys!==null)t:switch(C=Ys,le=Uy,Qc){case GI:Qc=Mg,Uy=null,va(P,C,le,GI);break;case SC:case CC:if(E2(le)){Qc=Mg,Uy=null,kf(C);break}C=function(){Qc!==SC&&Qc!==CC||g0!==P||(Qc=qI),d0(P)},le.then(C,C);break e;case YI:Qc=qI;break e;case Jft:Qc=l4e;break e;case qI:E2(le)?(Qc=Mg,Uy=null,kf(C)):(Qc=Mg,Uy=null,va(P,C,le,qI));break;case l4e:var Le=null;switch(Ys.tag){case 26:Le=Ys.memoizedState;case 5:case 27:var qe=Ys;if(!Le||A_(Le)){Qc=Mg,Uy=null;var dt=qe.sibling;if(dt!==null)Ys=dt;else{var yt=qe.return;yt!==null?(Ys=yt,Aa(yt)):Ys=null}break t}break;default:console.error("Unexpected type of fiber triggered a suspensey commit. This is a bug in React.")}Qc=Mg,Uy=null,va(P,C,le,l4e);break;case MD:Qc=Mg,Uy=null,va(P,C,le,MD);break;case u4e:u0(),Pd=Cq;break e;default:throw Error("Unexpected SuspendedReason. This is a bug in React.")}an.actQueue!==null?ag():Rf();break}catch(mn){fl(P,mn)}while(!0);return S1(),an.H=W,an.A=Z,Fc=k,Ys!==null?(po!==null&&typeof po.markRenderYielded=="function"&&po.markRenderYielded(),Pb):(Xe(),g0=null,oa=0,Nl(),Pd)}function Rf(){for(;Ys!==null&&!U1();)cg(Ys)}function cg(P){var C=P.alternate;(P.mode&Oc)!==Ba?(T2(P),C=Zt(P,G2,C,P,z3),J_(P)):C=Zt(P,G2,C,P,z3),P.memoizedProps=P.pendingProps,C===null?Aa(P):Ys=C}function kf(P){var C=Zt(P,Nc,P);P.memoizedProps=P.pendingProps,C===null?Aa(P):Ys=C}function Nc(P){var C=P.alternate,k=(P.mode&Oc)!==Ba;switch(k&&T2(P),P.tag){case 15:case 0:C=Mm(C,P,P.pendingProps,P.type,void 0,oa);break;case 11:C=Mm(C,P,P.pendingProps,P.type.render,P.ref,oa);break;case 5:r0(P);default:N1(C,P),P=Ys=cy(P,z3),C=G2(C,P,z3)}return k&&J_(P),C}function va(P,C,k,W){S1(),r0(C),xD=null,$I=0;var Z=C.return;try{if(A1(P,Z,C,k,oa)){Pd=jI,z2(P,Lu(k,P.current)),Ys=null;return}}catch(le){if(Z!==null)throw Ys=Z,le;Pd=jI,z2(P,Lu(k,P.current)),Ys=null;return}C.flags&32768?(ha||W===GI?P=!0:TD||(oa&536870912)!==0?P=!1:(x7=P=!0,(W===SC||W===CC||W===YI||W===MD)&&(W=t4.current,W!==null&&W.tag===13&&(W.flags|=16384))),Fl(C,P)):Aa(C)}function Aa(P){var C=P;do{if((C.flags&32768)!==0){Fl(C,x7);return}var k=C.alternate;if(P=C.return,T2(C),k=Zt(C,Fh,k,C,z3),(C.mode&Oc)!==Ba&&mf(C),k!==null){Ys=k;return}if(C=C.sibling,C!==null){Ys=C;return}Ys=C=P}while(C!==null);Pd===Pb&&(Pd=qft)}function Fl(P,C){do{var k=j5(P.alternate,P);if(k!==null){k.flags&=32767,Ys=k;return}if((P.mode&Oc)!==Ba){mf(P),k=P.actualDuration;for(var W=P.child;W!==null;)k+=W.actualDuration,W=W.sibling;P.actualDuration=k}if(k=P.return,k!==null&&(k.flags|=32768,k.subtreeFlags=0,k.deletions=null),!C&&(P=P.sibling,P!==null)){Ys=P;return}Ys=P=k}while(P!==null);Pd=Cq,Ys=null}function Hc(P,C,k,W,Z,le,Le,qe,dt){P.cancelPendingCommit=null;do os();while(Qf!==TC);if(vg.flushLegacyContextWarning(),vg.flushPendingUnsafeLifecycleWarnings(),(Fc&(px|o6))!==Wy)throw Error("Should not already be working.");if(po!==null&&typeof po.markCommitStarted=="function"&&po.markCommitStarted(k),C===null)pe();else{if(k===0&&console.error("finishedLanes should not be empty during a commit. This is a bug in React."),C===P.current)throw Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");if(le=C.lanes|C.childLanes,le|=fC,Ue(P,k,le,Le,qe,dt),P===g0&&(Ys=g0=null,oa=0),wD=C,P7=P,v7=k,p4e=le,f4e=Z,n1t=W,(C.subtreeFlags&10256)!==0||(C.flags&10256)!==0?(P.callbackNode=null,P.callbackPriority=0,km(pg,function(){return si(),null})):(P.callbackNode=null,P.callbackPriority=0),mD=pb(),W=(C.flags&13878)!==0,(C.subtreeFlags&13878)!==0||W){W=an.T,an.T=null,Z=Or.p,Or.p=U0,Le=Fc,Fc|=o6;try{Uu(P,C,k)}finally{Fc=Le,Or.p=Z,an.T=W}}Qf=Zft,Ga(),Pu(),qi()}}function Ga(){if(Qf===Zft){Qf=TC;var P=P7,C=wD,k=v7,W=(C.flags&13878)!==0;if((C.subtreeFlags&13878)!==0||W){W=an.T,an.T=null;var Z=Or.p;Or.p=U0;var le=Fc;Fc|=o6;try{vD=k,SD=P,Ty(C,P),SD=vD=null,k=w4e;var Le=b2(P.containerInfo),qe=k.focusedElem,dt=k.selectionRange;if(Le!==qe&&qe&&qe.ownerDocument&&Nd(qe.ownerDocument.documentElement,qe)){if(dt!==null&&Gx(qe)){var yt=dt.start,mn=dt.end;if(mn===void 0&&(mn=yt),"selectionStart"in qe)qe.selectionStart=yt,qe.selectionEnd=Math.min(mn,qe.value.length);else{var vn=qe.ownerDocument||document,_n=vn&&vn.defaultView||window;if(_n.getSelection){var Dn=_n.getSelection(),dr=qe.textContent.length,Ni=Math.min(dt.start,dr),y0=dt.end===void 0?Ni:Math.min(dt.end,dr);!Dn.extend&&Ni>y0&&(Le=y0,y0=Ni,Ni=Le);var ma=Ds(qe,Ni),Mt=Ds(qe,y0);if(ma&&Mt&&(Dn.rangeCount!==1||Dn.anchorNode!==ma.node||Dn.anchorOffset!==ma.offset||Dn.focusNode!==Mt.node||Dn.focusOffset!==Mt.offset)){var Et=vn.createRange();Et.setStart(ma.node,ma.offset),Dn.removeAllRanges(),Ni>y0?(Dn.addRange(Et),Dn.extend(Mt.node,Mt.offset)):(Et.setEnd(Mt.node,Mt.offset),Dn.addRange(Et))}}}}for(vn=[],Dn=qe;Dn=Dn.parentNode;)Dn.nodeType===1&&vn.push({element:Dn,left:Dn.scrollLeft,top:Dn.scrollTop});for(typeof qe.focus=="function"&&qe.focus(),qe=0;qe<vn.length;qe++){var Ft=vn[qe];Ft.element.scrollLeft=Ft.left,Ft.element.scrollTop=Ft.top}}$q=!!T4e,w4e=T4e=null}finally{Fc=le,Or.p=Z,an.T=W}}P.current=C,Qf=e1t}}function Pu(){if(Qf===e1t){Qf=TC;var P=P7,C=wD,k=v7,W=(C.flags&8772)!==0;if((C.subtreeFlags&8772)!==0||W){W=an.T,an.T=null;var Z=Or.p;Or.p=U0;var le=Fc;Fc|=o6;try{po!==null&&typeof po.markLayoutEffectsStarted=="function"&&po.markLayoutEffectsStarted(k),vD=k,SD=P,J2(P,C.alternate,C),SD=vD=null,po!==null&&typeof po.markLayoutEffectsStopped=="function"&&po.markLayoutEffectsStopped()}finally{Fc=le,Or.p=Z,an.T=W}}Qf=t1t}}function qi(){if(Qf===bro||Qf===t1t){Qf=TC,A3();var P=P7,C=wD,k=v7,W=n1t,Z=(C.subtreeFlags&10256)!==0||(C.flags&10256)!==0;Z?Qf=m4e:(Qf=TC,wD=P7=null,ns(P,P.pendingLanes),wC=0,ZI=null);var le=P.pendingLanes;if(le===0&&(b7=null),Z||Hf(P),Z=Ct(k),C=C.stateNode,Wl&&typeof Wl.onCommitFiberRoot=="function")try{var Le=(C.current.flags&128)===128;switch(Z){case U0:var qe=j1;break;case N_:qe=Lp;break;case Xh:qe=pg;break;case xg:qe=j4;break;default:qe=pg}Wl.onCommitFiberRoot(Mu,C,qe,Le)}catch(vn){W0||(W0=!0,console.error("React instrumentation encountered an error: %s",vn))}if(qa&&P.memoizedUpdaters.clear(),B0(),W!==null){Le=an.T,qe=Or.p,Or.p=U0,an.T=null;try{var dt=P.onRecoverableError;for(C=0;C<W.length;C++){var yt=W[C],mn=z0(yt.stack);Zt(yt.source,dt,yt.value,mn)}}finally{an.T=Le,Or.p=qe}}(v7&3)!==0&&os(),d0(P),le=P.pendingLanes,(k&4194090)!==0&&(le&42)!==0?(bC=!0,P===x4e?QI++:(QI=0,x4e=P)):QI=0,qd(0),pe()}}function z0(P){return P={componentStack:P},Object.defineProperty(P,"digest",{get:function(){console.error('You are accessing "digest" from the errorInfo object passed to onRecoverableError. This property is no longer provided as part of errorInfo but can be accessed as a property of the Error instance itself.')}}),P}function ns(P,C){(P.pooledCacheLanes&=C)===0&&(C=P.pooledCache,C!=null&&(P.pooledCache=null,q_(C)))}function os(P){return Ga(),Pu(),qi(),si()}function si(){if(Qf!==m4e)return!1;var P=P7,C=p4e;p4e=0;var k=Ct(v7),W=Xh>k?Xh:k;k=an.T;var Z=Or.p;try{Or.p=W,an.T=null,W=f4e,f4e=null;var le=P7,Le=v7;if(Qf=TC,wD=P7=null,v7=0,(Fc&(px|o6))!==Wy)throw Error("Cannot flush passive effects while already rendering.");g4e=!0,wq=!1,po!==null&&typeof po.markPassiveEffectsStarted=="function"&&po.markPassiveEffectsStarted(Le);var qe=Fc;if(Fc|=o6,l0(le.current),zh(le,le.current,Le,W),po!==null&&typeof po.markPassiveEffectsStopped=="function"&&po.markPassiveEffectsStopped(),Hf(le),Fc=qe,qd(0,!1),wq?le===ZI?wC++:(wC=0,ZI=le):wC=0,wq=g4e=!1,Wl&&typeof Wl.onPostCommitFiberRoot=="function")try{Wl.onPostCommitFiberRoot(Mu,le)}catch(yt){W0||(W0=!0,console.error("React instrumentation encountered an error: %s",yt))}var dt=le.current.stateNode;return dt.effectDuration=0,dt.passiveEffectDuration=0,!0}finally{Or.p=Z,an.T=k,ns(P,C)}}function xl(P,C,k){C=Lu(k,C),C=F0(P.stateNode,C,2),P=Rc(P,C,2),P!==null&&(ze(P,2),d0(P))}function _o(P,C,k){if(ED=!1,P.tag===3)xl(P,P,k);else{for(;C!==null;){if(C.tag===3){xl(C,P,k);return}if(C.tag===1){var W=C.stateNode;if(typeof C.type.getDerivedStateFromError=="function"||typeof W.componentDidCatch=="function"&&(b7===null||!b7.has(W))){P=Lu(k,P),k=xc(2),W=Rc(C,k,2),W!==null&&(V2(k,W,C,P),ze(W,2),d0(W));return}}C=C.return}console.error(`Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Potential causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.
|
|
162
|
+
Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching`:" You returned: "+W,Zt(C,function(qe,dt){console.error("%s must not return anything besides a function, which is used for clean-up.%s",qe,dt)},le,Le)}k=k.next}while(k!==Z)}}catch(qe){_o(C,C.return,qe)}}function Ef(P,C,k){try{var W=C.updateQueue,Z=W!==null?W.lastEffect:null;if(Z!==null){var le=Z.next;W=le;do{if((W.tag&P)===P){var Le=W.inst,qe=Le.destroy;qe!==void 0&&(Le.destroy=void 0,(P&G0)!==to?po!==null&&typeof po.markComponentPassiveEffectUnmountStarted=="function"&&po.markComponentPassiveEffectUnmountStarted(C):(P&Ri)!==to&&po!==null&&typeof po.markComponentLayoutEffectUnmountStarted=="function"&&po.markComponentLayoutEffectUnmountStarted(C),(P&li)!==to&&(ED=!0),Z=C,Zt(Z,mro,Z,k,qe),(P&li)!==to&&(ED=!1),(P&G0)!==to?po!==null&&typeof po.markComponentPassiveEffectUnmountStopped=="function"&&po.markComponentPassiveEffectUnmountStopped():(P&Ri)!==to&&po!==null&&typeof po.markComponentLayoutEffectUnmountStopped=="function"&&po.markComponentLayoutEffectUnmountStopped())}W=W.next}while(W!==le)}}catch(dt){_o(C,C.return,dt)}}function Pp(P,C){Xd(P)?(Ah(),wm(C,P),K_()):wm(C,P)}function Py(P,C,k){Xd(P)?(Ah(),Ef(k,P,C),K_()):Ef(k,P,C)}function V4(P){var C=P.updateQueue;if(C!==null){var k=P.stateNode;P.type.defaultProps||"ref"in P.memoizedProps||PD||(k.props!==P.memoizedProps&&console.error("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",A(P)||"instance"),k.state!==P.memoizedState&&console.error("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",A(P)||"instance"));try{Zt(P,pf,C,k)}catch(W){_o(P,P.return,W)}}}function vy(P,C,k){return P.getSnapshotBeforeUpdate(C,k)}function $4(P,C){var k=C.memoizedProps,W=C.memoizedState;C=P.stateNode,P.type.defaultProps||"ref"in P.memoizedProps||PD||(C.props!==P.memoizedProps&&console.error("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",A(P)||"instance"),C.state!==P.memoizedState&&console.error("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",A(P)||"instance"));try{var Z=Lh(P.type,k,P.elementType===P.type),le=Zt(P,vy,C,Z,W);k=Gft,le!==void 0||k.has(P.type)||(k.add(P.type),Zt(P,function(){console.error("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",A(P))})),C.__reactInternalSnapshotBeforeUpdate=le}catch(Le){_o(P,P.return,Le)}}function Sy(P,C,k){k.props=Lh(P.type,P.memoizedProps),k.state=P.memoizedState,Xd(P)?(Ah(),Zt(P,bft,P,C,k),K_()):Zt(P,bft,P,C,k)}function Cy(P){var C=P.ref;if(C!==null){switch(P.tag){case 26:case 27:case 5:var k=P.stateNode;break;case 30:k=P.stateNode;break;default:k=P.stateNode}if(typeof C=="function")if(Xd(P))try{Ah(),P.refCleanup=C(k)}finally{K_()}else P.refCleanup=C(k);else typeof C=="string"?console.error("String refs are no longer supported."):C.hasOwnProperty("current")||console.error("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",A(P)),C.current=k}}function Em(P,C){try{Zt(P,Cy,P)}catch(k){_o(P,C,k)}}function Bh(P,C){var k=P.ref,W=P.refCleanup;if(k!==null)if(typeof W=="function")try{if(Xd(P))try{Ah(),Zt(P,W)}finally{K_(P)}else Zt(P,W)}catch(Z){_o(P,C,Z)}finally{P.refCleanup=null,P=P.alternate,P!=null&&(P.refCleanup=null)}else if(typeof k=="function")try{if(Xd(P))try{Ah(),Zt(P,k,null)}finally{K_(P)}else Zt(P,k,null)}catch(Z){_o(P,C,Z)}else k.current=null}function W4(P,C,k,W){var Z=P.memoizedProps,le=Z.id,Le=Z.onCommit;Z=Z.onRender,C=C===null?"mount":"update",yC&&(C="nested-update"),typeof Z=="function"&&Z(le,C,P.actualDuration,P.treeBaseDuration,P.actualStartTime,k),typeof Le=="function"&&Le(P.memoizedProps.id,C,W,k)}function H1(P,C,k,W){var Z=P.memoizedProps;P=Z.id,Z=Z.onPostCommit,C=C===null?"mount":"update",yC&&(C="nested-update"),typeof Z=="function"&&Z(P,C,W,k)}function q2(P){var C=P.type,k=P.memoizedProps,W=P.stateNode;try{Zt(P,Lm,W,C,k,P)}catch(Z){_o(P,P.return,Z)}}function Df(P,C,k){try{Zt(P,Bi,P.stateNode,P.type,k,C,P)}catch(W){_o(P,P.return,W)}}function Ol(P){return P.tag===5||P.tag===3||P.tag===26||P.tag===27&&ea(P.type)||P.tag===4}function jd(P){e:for(;;){for(;P.sibling===null;){if(P.return===null||Ol(P.return))return null;P=P.return}for(P.sibling.return=P.return,P=P.sibling;P.tag!==5&&P.tag!==6&&P.tag!==18;){if(P.tag===27&&ea(P.type)||P.flags&2||P.child===null||P.tag===4)continue e;P.child.return=P,P=P.child}if(!(P.flags&2))return P.stateNode}}function My(P,C,k){var W=P.tag;if(W===5||W===6)P=P.stateNode,C?(k.nodeType===9?k.body:k.nodeName==="HTML"?k.ownerDocument.body:k).insertBefore(P,C):(C=k.nodeType===9?k.body:k.nodeName==="HTML"?k.ownerDocument.body:k,C.appendChild(P),k=k._reactRootContainer,k!=null||C.onclick!==null||(C.onclick=ld));else if(W!==4&&(W===27&&ea(P.type)&&(k=P.stateNode,C=null),P=P.child,P!==null))for(My(P,C,k),P=P.sibling;P!==null;)My(P,C,k),P=P.sibling}function xr(P,C,k){var W=P.tag;if(W===5||W===6)P=P.stateNode,C?k.insertBefore(P,C):k.appendChild(P);else if(W!==4&&(W===27&&ea(P.type)&&(k=P.stateNode),P=P.child,P!==null))for(xr(P,C,k),P=P.sibling;P!==null;)xr(P,C,k),P=P.sibling}function vp(P){for(var C,k=P.return;k!==null;){if(Ol(k)){C=k;break}k=k.return}if(C==null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");switch(C.tag){case 27:C=C.stateNode,k=jd(P),xr(P,k,C);break;case 5:k=C.stateNode,C.flags&32&&(Ca(k),C.flags&=-33),C=jd(P),xr(P,C,k);break;case 3:case 4:C=C.stateNode.containerInfo,k=jd(P),My(P,k,C);break;default:throw Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}function G5(P){var C=P.stateNode,k=P.memoizedProps;try{Zt(P,Ya,P.type,k,C,P)}catch(W){_o(P,P.return,W)}}function Uu(P,C){if(P=P.containerInfo,T4e=$q,P=b2(P),Gx(P)){if("selectionStart"in P)var k={start:P.selectionStart,end:P.selectionEnd};else e:{k=(k=P.ownerDocument)&&k.defaultView||window;var W=k.getSelection&&k.getSelection();if(W&&W.rangeCount!==0){k=W.anchorNode;var Z=W.anchorOffset,le=W.focusNode;W=W.focusOffset;try{k.nodeType,le.nodeType}catch{k=null;break e}var Le=0,qe=-1,dt=-1,yt=0,mn=0,vn=P,_n=null;t:for(;;){for(var Dn;vn!==k||Z!==0&&vn.nodeType!==3||(qe=Le+Z),vn!==le||W!==0&&vn.nodeType!==3||(dt=Le+W),vn.nodeType===3&&(Le+=vn.nodeValue.length),(Dn=vn.firstChild)!==null;)_n=vn,vn=Dn;for(;;){if(vn===P)break t;if(_n===k&&++yt===Z&&(qe=Le),_n===le&&++mn===W&&(dt=Le),(Dn=vn.nextSibling)!==null)break;vn=_n,_n=vn.parentNode}vn=Dn}k=qe===-1||dt===-1?null:{start:qe,end:dt}}else k=null}k=k||{start:0,end:0}}else k=null;for(w4e={focusedElem:P,selectionRange:k},$q=!1,Up=C;Up!==null;)if(C=Up,P=C.child,(C.subtreeFlags&1024)!==0&&P!==null)P.return=C,Up=P;else for(;Up!==null;){switch(P=C=Up,k=P.alternate,Z=P.flags,P.tag){case 0:break;case 11:case 15:break;case 1:(Z&1024)!==0&&k!==null&&$4(P,k);break;case 3:if((Z&1024)!==0){if(P=P.stateNode.containerInfo,k=P.nodeType,k===9)Om(P);else if(k===1)switch(P.nodeName){case"HEAD":case"HTML":case"BODY":Om(P);break;default:P.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((Z&1024)!==0)throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}if(P=C.sibling,P!==null){P.return=C.return,Up=P;break}Up=C.return}}function J2(P,C,k){var W=k.flags;switch(k.tag){case 0:case 11:case 15:Gd(P,k),W&4&&by(k,Ri|mo);break;case 1:if(Gd(P,k),W&4)if(P=k.stateNode,C===null)k.type.defaultProps||"ref"in k.memoizedProps||PD||(P.props!==k.memoizedProps&&console.error("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",A(k)||"instance"),P.state!==k.memoizedState&&console.error("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",A(k)||"instance")),Xd(k)?(Ah(),Zt(k,e4e,k,P),K_()):Zt(k,e4e,k,P);else{var Z=Lh(k.type,C.memoizedProps);C=C.memoizedState,k.type.defaultProps||"ref"in k.memoizedProps||PD||(P.props!==k.memoizedProps&&console.error("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",A(k)||"instance"),P.state!==k.memoizedState&&console.error("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",A(k)||"instance")),Xd(k)?(Ah(),Zt(k,xft,k,P,Z,C,P.__reactInternalSnapshotBeforeUpdate),K_()):Zt(k,xft,k,P,Z,C,P.__reactInternalSnapshotBeforeUpdate)}W&64&&V4(k),W&512&&Em(k,k.return);break;case 3:if(C=du(),Gd(P,k),W&64&&(W=k.updateQueue,W!==null)){if(Z=null,k.child!==null)switch(k.child.tag){case 27:case 5:Z=k.child.stateNode;break;case 1:Z=k.child.stateNode}try{Zt(k,pf,W,Z)}catch(Le){_o(k,k.return,Le)}}P.effectDuration+=ym(C);break;case 27:C===null&&W&4&&G5(k);case 26:case 5:Gd(P,k),C===null&&W&4&&q2(k),W&512&&Em(k,k.return);break;case 12:if(W&4){W=du(),Gd(P,k),P=k.stateNode,P.effectDuration+=hp(W);try{Zt(k,W4,k,C,mD,P.effectDuration)}catch(Le){_o(k,k.return,Le)}}else Gd(P,k);break;case 13:Gd(P,k),W&4&&Xu(P,k),W&64&&(P=k.memoizedState,P!==null&&(P=P.dehydrated,P!==null&&(k=Gu.bind(null,k),oi(P,k))));break;case 22:if(W=k.memoizedState!==null||bb,!W){C=C!==null&&C.memoizedState!==null||rh,Z=bb;var le=rh;bb=W,(rh=C)&&!le?Sp(P,k,(k.subtreeFlags&8772)!==0):Gd(P,k),bb=Z,rh=le}break;case 30:break;default:Gd(P,k)}}function pl(P){var C=P.alternate;C!==null&&(P.alternate=null,pl(C)),P.child=null,P.deletions=null,P.sibling=null,P.tag===5&&(C=P.stateNode,C!==null&&Ot(C)),P.stateNode=null,P._debugOwner=null,P.return=null,P.dependencies=null,P.memoizedProps=null,P.memoizedState=null,P.pendingProps=null,P.stateNode=null,P.updateQueue=null}function Dm(P,C,k){for(k=k.child;k!==null;)Af(P,C,k),k=k.sibling}function Af(P,C,k){if(Wl&&typeof Wl.onCommitFiberUnmount=="function")try{Wl.onCommitFiberUnmount(Mu,k)}catch(le){W0||(W0=!0,console.error("React instrumentation encountered an error: %s",le))}switch(k.tag){case 26:rh||Bh(k,C),Dm(P,C,k),k.memoizedState?k.memoizedState.count--:k.stateNode&&(k=k.stateNode,k.parentNode.removeChild(k));break;case 27:rh||Bh(k,C);var W=Jh,Z=Cg;ea(k.type)&&(Jh=k.stateNode,Cg=!1),Dm(P,C,k),Zt(k,Vl,k.stateNode),Jh=W,Cg=Z;break;case 5:rh||Bh(k,C);case 6:if(W=Jh,Z=Cg,Jh=null,Dm(P,C,k),Jh=W,Cg=Z,Jh!==null)if(Cg)try{Zt(k,Ff,Jh,k.stateNode)}catch(le){_o(k,C,le)}else try{Zt(k,m0,Jh,k.stateNode)}catch(le){_o(k,C,le)}break;case 18:Jh!==null&&(Cg?(P=Jh,Dp(P.nodeType===9?P.body:P.nodeName==="HTML"?P.ownerDocument.body:P,k.stateNode),_g(P)):Dp(Jh,k.stateNode));break;case 4:W=Jh,Z=Cg,Jh=k.stateNode.containerInfo,Cg=!0,Dm(P,C,k),Jh=W,Cg=Z;break;case 0:case 11:case 14:case 15:rh||Ef(li,k,C),rh||vs(k,C,Ri),Dm(P,C,k);break;case 1:rh||(Bh(k,C),W=k.stateNode,typeof W.componentWillUnmount=="function"&&Sy(k,C,W)),Dm(P,C,k);break;case 21:Dm(P,C,k);break;case 22:rh=(W=rh)||k.memoizedState!==null,Dm(P,C,k),rh=W;break;default:Dm(P,C,k)}}function Xu(P,C){if(C.memoizedState===null&&(P=C.alternate,P!==null&&(P=P.memoizedState,P!==null&&(P=P.dehydrated,P!==null))))try{Zt(C,Ha,P)}catch(k){_o(C,C.return,k)}}function ig(P){switch(P.tag){case 13:case 19:var C=P.stateNode;return C===null&&(C=P.stateNode=new Yft),C;case 22:return P=P.stateNode,C=P._retryCache,C===null&&(C=P._retryCache=new Yft),C;default:throw Error("Unexpected Suspense handler tag ("+P.tag+"). This is a bug in React.")}}function E_(P,C){var k=ig(P);C.forEach(function(W){var Z=sc.bind(null,P,W);if(!k.has(W)){if(k.add(W),qa)if(vD!==null&&SD!==null)Ic(SD,vD);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");W.then(Z,Z)}})}function ba(P,C){var k=C.deletions;if(k!==null)for(var W=0;W<k.length;W++){var Z=P,le=C,Le=k[W],qe=le;e:for(;qe!==null;){switch(qe.tag){case 27:if(ea(qe.type)){Jh=qe.stateNode,Cg=!1;break e}break;case 5:Jh=qe.stateNode,Cg=!1;break e;case 3:case 4:Jh=qe.stateNode.containerInfo,Cg=!0;break e}qe=qe.return}if(Jh===null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");Af(Z,le,Le),Jh=null,Cg=!1,Z=Le,le=Z.alternate,le!==null&&(le.return=null),Z.return=null}if(C.subtreeFlags&13878)for(C=C.child;C!==null;)Ty(C,P),C=C.sibling}function Ty(P,C){var k=P.alternate,W=P.flags;switch(P.tag){case 0:case 11:case 14:case 15:ba(C,P),Co(P),W&4&&(Ef(li|mo,P,P.return),wm(li|mo,P),vs(P,P.return,Ri|mo));break;case 1:ba(C,P),Co(P),W&512&&(rh||k===null||Bh(k,k.return)),W&64&&bb&&(P=P.updateQueue,P!==null&&(W=P.callbacks,W!==null&&(k=P.shared.hiddenCallbacks,P.shared.hiddenCallbacks=k===null?W:k.concat(W))));break;case 26:var Z=n6;if(ba(C,P),Co(P),W&512&&(rh||k===null||Bh(k,k.return)),W&4)if(C=k!==null?k.memoizedState:null,W=P.memoizedState,k===null)if(W===null)if(P.stateNode===null){e:{W=P.type,k=P.memoizedProps,C=Z.ownerDocument||Z;t:switch(W){case"title":Z=C.getElementsByTagName("title")[0],(!Z||Z[sx]||Z[cc]||Z.namespaceURI===Gh||Z.hasAttribute("itemprop"))&&(Z=C.createElement(W),C.head.insertBefore(Z,C.querySelector("head > title"))),Lc(Z,W,k),Z[cc]=P,tt(Z),W=Z;break e;case"link":var le=nx("link","href",C).get(W+(k.href||""));if(le){for(var Le=0;Le<le.length;Le++)if(Z=le[Le],Z.getAttribute("href")===(k.href==null||k.href===""?null:k.href)&&Z.getAttribute("rel")===(k.rel==null?null:k.rel)&&Z.getAttribute("title")===(k.title==null?null:k.title)&&Z.getAttribute("crossorigin")===(k.crossOrigin==null?null:k.crossOrigin)){le.splice(Le,1);break t}}Z=C.createElement(W),Lc(Z,W,k),C.head.appendChild(Z);break;case"meta":if(le=nx("meta","content",C).get(W+(k.content||""))){for(Le=0;Le<le.length;Le++)if(Z=le[Le],ie(k.content,"content"),Z.getAttribute("content")===(k.content==null?null:""+k.content)&&Z.getAttribute("name")===(k.name==null?null:k.name)&&Z.getAttribute("property")===(k.property==null?null:k.property)&&Z.getAttribute("http-equiv")===(k.httpEquiv==null?null:k.httpEquiv)&&Z.getAttribute("charset")===(k.charSet==null?null:k.charSet)){le.splice(Le,1);break t}}Z=C.createElement(W),Lc(Z,W,k),C.head.appendChild(Z);break;default:throw Error('getNodesForType encountered a type it did not expect: "'+W+'". This is a bug in React.')}Z[cc]=P,tt(Z),W=Z}P.stateNode=W}else Ny(Z,P.type,P.stateNode);else P.stateNode=kr(Z,W,P.memoizedProps);else C!==W?(C===null?k.stateNode!==null&&(k=k.stateNode,k.parentNode.removeChild(k)):C.count--,W===null?Ny(Z,P.type,P.stateNode):kr(Z,W,P.memoizedProps)):W===null&&P.stateNode!==null&&Df(P,P.memoizedProps,k.memoizedProps);break;case 27:ba(C,P),Co(P),W&512&&(rh||k===null||Bh(k,k.return)),k!==null&&W&4&&Df(P,P.memoizedProps,k.memoizedProps);break;case 5:if(ba(C,P),Co(P),W&512&&(rh||k===null||Bh(k,k.return)),P.flags&32){C=P.stateNode;try{Zt(P,Ca,C)}catch(mn){_o(P,P.return,mn)}}W&4&&P.stateNode!=null&&(C=P.memoizedProps,Df(P,C,k!==null?k.memoizedProps:C)),W&1024&&(a4e=!0,P.type!=="form"&&console.error("Unexpected host component type. Expected a form. This is a bug in React."));break;case 6:if(ba(C,P),Co(P),W&4){if(P.stateNode===null)throw Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");W=P.memoizedProps,k=k!==null?k.memoizedProps:W,C=P.stateNode;try{Zt(P,zl,C,k,W)}catch(mn){_o(P,P.return,mn)}}break;case 3:if(Z=du(),Bq=null,le=n6,n6=dd(C.containerInfo),ba(C,P),n6=le,Co(P),W&4&&k!==null&&k.memoizedState.isDehydrated)try{Zt(P,zf,C.containerInfo)}catch(mn){_o(P,P.return,mn)}a4e&&(a4e=!1,a0(P)),C.effectDuration+=ym(Z);break;case 4:W=n6,n6=dd(P.stateNode.containerInfo),ba(C,P),Co(P),n6=W;break;case 12:W=du(),ba(C,P),Co(P),P.stateNode.effectDuration+=hp(W);break;case 13:ba(C,P),Co(P),P.child.flags&8192&&P.memoizedState!==null!=(k!==null&&k.memoizedState!==null)&&(h4e=Uh()),W&4&&(W=P.updateQueue,W!==null&&(P.updateQueue=null,E_(P,W)));break;case 22:Z=P.memoizedState!==null;var qe=k!==null&&k.memoizedState!==null,dt=bb,yt=rh;if(bb=dt||Z,rh=yt||qe,ba(C,P),rh=yt,bb=dt,Co(P),W&8192)e:for(C=P.stateNode,C._visibility=Z?C._visibility&~Oa:C._visibility|Oa,Z&&(k===null||qe||bb||rh||ju(P)),k=null,C=P;;){if(C.tag===5||C.tag===26){if(k===null){qe=k=C;try{le=qe.stateNode,Z?Zt(qe,$0,le):Zt(qe,tx,qe.stateNode,qe.memoizedProps)}catch(mn){_o(qe,qe.return,mn)}}}else if(C.tag===6){if(k===null){qe=C;try{Le=qe.stateNode,Z?Zt(qe,ex,Le):Zt(qe,B1,Le,qe.memoizedProps)}catch(mn){_o(qe,qe.return,mn)}}}else if((C.tag!==22&&C.tag!==23||C.memoizedState===null||C===P)&&C.child!==null){C.child.return=C,C=C.child;continue}if(C===P)break e;for(;C.sibling===null;){if(C.return===null||C.return===P)break e;k===C&&(k=null),C=C.return}k===C&&(k=null),C.sibling.return=C.return,C=C.sibling}W&4&&(W=P.updateQueue,W!==null&&(k=W.retryQueue,k!==null&&(W.retryQueue=null,E_(P,k))));break;case 19:ba(C,P),Co(P),W&4&&(W=P.updateQueue,W!==null&&(P.updateQueue=null,E_(P,W)));break;case 30:break;case 21:break;default:ba(C,P),Co(P)}}function Co(P){var C=P.flags;if(C&2){try{Zt(P,vp,P)}catch(k){_o(P,P.return,k)}P.flags&=-3}C&4096&&(P.flags&=-4097)}function a0(P){if(P.subtreeFlags&1024)for(P=P.child;P!==null;){var C=P;a0(C),C.tag===5&&C.flags&1024&&C.stateNode.reset(),P=P.sibling}}function Gd(P,C){if(C.subtreeFlags&8772)for(C=C.child;C!==null;)J2(P,C.alternate,C),C=C.sibling}function sd(P){switch(P.tag){case 0:case 11:case 14:case 15:vs(P,P.return,Ri),ju(P);break;case 1:Bh(P,P.return);var C=P.stateNode;typeof C.componentWillUnmount=="function"&&Sy(P,P.return,C),ju(P);break;case 27:Zt(P,Vl,P.stateNode);case 26:case 5:Bh(P,P.return),ju(P);break;case 22:P.memoizedState===null&&ju(P);break;case 30:ju(P);break;default:ju(P)}}function ju(P){for(P=P.child;P!==null;)sd(P),P=P.sibling}function ni(P,C,k,W){var Z=k.flags;switch(k.tag){case 0:case 11:case 15:Sp(P,k,W),by(k,Ri);break;case 1:if(Sp(P,k,W),C=k.stateNode,typeof C.componentDidMount=="function"&&Zt(k,e4e,k,C),C=k.updateQueue,C!==null){P=k.stateNode;try{Zt(k,Z_,C,P)}catch(le){_o(k,k.return,le)}}W&&Z&64&&V4(k),Em(k,k.return);break;case 27:G5(k);case 26:case 5:Sp(P,k,W),W&&C===null&&Z&4&&q2(k),Em(k,k.return);break;case 12:if(W&&Z&4){Z=du(),Sp(P,k,W),W=k.stateNode,W.effectDuration+=hp(Z);try{Zt(k,W4,k,C,mD,W.effectDuration)}catch(le){_o(k,k.return,le)}}else Sp(P,k,W);break;case 13:Sp(P,k,W),W&&Z&4&&Xu(P,k);break;case 22:k.memoizedState===null&&Sp(P,k,W),Em(k,k.return);break;case 30:break;default:Sp(P,k,W)}}function Sp(P,C,k){for(k=k&&(C.subtreeFlags&8772)!==0,C=C.child;C!==null;)ni(P,C.alternate,C,k),C=C.sibling}function yc(P,C){var k=null;P!==null&&P.memoizedState!==null&&P.memoizedState.cachePool!==null&&(k=P.memoizedState.cachePool.pool),P=null,C.memoizedState!==null&&C.memoizedState.cachePool!==null&&(P=C.memoizedState.cachePool.pool),P!==k&&(P!=null&&n0(P),k!=null&&q_(k))}function Ea(P,C){P=null,C.alternate!==null&&(P=C.alternate.memoizedState.cache),C=C.memoizedState.cache,C!==P&&(n0(C),P!=null&&q_(P))}function Kn(P,C,k,W){if(C.subtreeFlags&10256)for(C=C.child;C!==null;)zh(P,C,k,W),C=C.sibling}function zh(P,C,k,W){var Z=C.flags;switch(C.tag){case 0:case 11:case 15:Kn(P,C,k,W),Z&2048&&Pp(C,G0|mo);break;case 1:Kn(P,C,k,W);break;case 3:var le=du();Kn(P,C,k,W),Z&2048&&(k=null,C.alternate!==null&&(k=C.alternate.memoizedState.cache),C=C.memoizedState.cache,C!==k&&(n0(C),k!=null&&q_(k))),P.passiveEffectDuration+=ym(le);break;case 12:if(Z&2048){Z=du(),Kn(P,C,k,W),P=C.stateNode,P.passiveEffectDuration+=hp(Z);try{Zt(C,H1,C,C.alternate,mD,P.passiveEffectDuration)}catch(qe){_o(C,C.return,qe)}}else Kn(P,C,k,W);break;case 13:Kn(P,C,k,W);break;case 23:break;case 22:le=C.stateNode;var Le=C.alternate;C.memoizedState!==null?le._visibility&L_?Kn(P,C,k,W):Pa(P,C):le._visibility&L_?Kn(P,C,k,W):(le._visibility|=L_,Da(P,C,k,W,(C.subtreeFlags&10256)!==0)),Z&2048&&yc(Le,C);break;case 24:Kn(P,C,k,W),Z&2048&&Ea(C.alternate,C);break;default:Kn(P,C,k,W)}}function Da(P,C,k,W,Z){for(Z=Z&&(C.subtreeFlags&10256)!==0,C=C.child;C!==null;)Cp(P,C,k,W,Z),C=C.sibling}function Cp(P,C,k,W,Z){var le=C.flags;switch(C.tag){case 0:case 11:case 15:Da(P,C,k,W,Z),Pp(C,G0);break;case 23:break;case 22:var Le=C.stateNode;C.memoizedState!==null?Le._visibility&L_?Da(P,C,k,W,Z):Pa(P,C):(Le._visibility|=L_,Da(P,C,k,W,Z)),Z&&le&2048&&yc(C.alternate,C);break;case 24:Da(P,C,k,W,Z),Z&&le&2048&&Ea(C.alternate,C);break;default:Da(P,C,k,W,Z)}}function Pa(P,C){if(C.subtreeFlags&10256)for(C=C.child;C!==null;){var k=P,W=C,Z=W.flags;switch(W.tag){case 22:Pa(k,W),Z&2048&&yc(W.alternate,W);break;case 24:Pa(k,W),Z&2048&&Ea(W.alternate,W);break;default:Pa(k,W)}C=C.sibling}}function ad(P){if(P.subtreeFlags&UI)for(P=P.child;P!==null;)bc(P),P=P.sibling}function bc(P){switch(P.tag){case 26:ad(P),P.flags&UI&&P.memoizedState!==null&&L(n6,P.memoizedState,P.memoizedProps);break;case 5:ad(P);break;case 3:case 4:var C=n6;n6=dd(P.stateNode.containerInfo),ad(P),n6=C;break;case 22:P.memoizedState===null&&(C=P.alternate,C!==null&&C.memoizedState!==null?(C=UI,UI=16777216,ad(P),UI=C):ad(P));break;default:ad(P)}}function Yd(P){var C=P.alternate;if(C!==null&&(P=C.child,P!==null)){C.child=null;do C=P.sibling,P.sibling=null,P=C;while(P!==null)}}function c0(P){var C=P.deletions;if((P.flags&16)!==0){if(C!==null)for(var k=0;k<C.length;k++){var W=C[k];Up=W,Ss(W,P)}Yd(P)}if(P.subtreeFlags&10256)for(P=P.child;P!==null;)l0(P),P=P.sibling}function l0(P){switch(P.tag){case 0:case 11:case 15:c0(P),P.flags&2048&&Py(P,P.return,G0|mo);break;case 3:var C=du();c0(P),P.stateNode.passiveEffectDuration+=ym(C);break;case 12:C=du(),c0(P),P.stateNode.passiveEffectDuration+=hp(C);break;case 22:C=P.stateNode,P.memoizedState!==null&&C._visibility&L_&&(P.return===null||P.return.tag!==13)?(C._visibility&=~L_,K2(P)):c0(P);break;default:c0(P)}}function K2(P){var C=P.deletions;if((P.flags&16)!==0){if(C!==null)for(var k=0;k<C.length;k++){var W=C[k];Up=W,Ss(W,P)}Yd(P)}for(P=P.child;P!==null;)Q2(P),P=P.sibling}function Q2(P){switch(P.tag){case 0:case 11:case 15:Py(P,P.return,G0),K2(P);break;case 22:var C=P.stateNode;C._visibility&L_&&(C._visibility&=~L_,K2(P));break;default:K2(P)}}function Ss(P,C){for(;Up!==null;){var k=Up,W=k;switch(W.tag){case 0:case 11:case 15:Py(W,C,G0);break;case 23:case 22:W.memoizedState!==null&&W.memoizedState.cachePool!==null&&(W=W.memoizedState.cachePool.pool,W!=null&&n0(W));break;case 24:q_(W.memoizedState.cache)}if(W=k.child,W!==null)W.return=k,Up=W;else e:for(k=P;Up!==null;){W=Up;var Z=W.sibling,le=W.return;if(pl(W),W===k){Up=null;break e}if(Z!==null){Z.return=le,Up=Z;break e}Up=le}}}function B0(){fro.forEach(function(P){return P()})}function I1(){var P=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;return P||an.actQueue===null||console.error("The current testing environment is not configured to support act(...)"),P}function bu(P){if((Fc&px)!==Wy&&oa!==0)return oa&-oa;var C=an.T;return C!==null?(C._updatedFibers||(C._updatedFibers=new Set),C._updatedFibers.add(P),P=L3,P!==0?P:Ay()):Lt()}function U4(){Xy===0&&(Xy=(oa&536870912)===0||ha?Pe():536870912);var P=t4.current;return P!==null&&(P.flags|=32),Xy}function Zs(P,C,k){if(ED&&console.error("useInsertionEffect must not schedule updates."),g4e&&(wq=!0),(P===g0&&(Qc===SC||Qc===CC)||P.cancelPendingCommit!==null)&&(Z2(P,0),Am(P,oa,Xy,!1)),ze(P,k),(Fc&px)!==0&&P===g0){if(j0)switch(C.tag){case 0:case 11:case 15:P=Ys&&A(Ys)||"Unknown",r1t.has(P)||(r1t.add(P),C=A(C)||"Unknown",console.error("Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://react.dev/link/setstate-in-render",C,P,P));break;case 1:o1t||(console.error("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),o1t=!0)}}else qa&<(P,C,k),Ey(C),P===g0&&((Fc&px)===Wy&&(y7|=k),Pd===vC&&Am(P,oa,Xy,!1)),d0(P)}function Ar(P,C,k){if((Fc&(px|o6))!==Wy)throw Error("Should not already be working.");var W=!k&&(C&124)===0&&(C&P.expiredLanes)===0||Ve(P,C),Z=W?Rm(P,C):O1(P,C,!0),le=W;do{if(Z===Pb){TD&&!W&&Am(P,C,0,!1);break}else{if(k=P.current.alternate,le&&!w3(k)){Z=O1(P,C,!1),le=!1;continue}if(Z===CD){if(le=C,P.errorRecoveryDisabledLanes&le)var Le=0;else Le=P.pendingLanes&-536870913,Le=Le!==0?Le:Le&536870912?536870912:0;if(Le!==0){C=Le;e:{Z=P;var qe=Le;Le=JI;var dt=Z.current.memoizedState.isDehydrated;if(dt&&(Z2(Z,qe).flags|=256),qe=O1(Z,qe,!1),qe!==CD){if(_4e&&!dt){Z.errorRecoveryDisabledLanes|=le,y7|=le,Z=vC;break e}Z=fx,fx=Le,Z!==null&&(fx===null?fx=Z:fx.push.apply(fx,Z))}Z=qe}if(le=!1,Z!==CD)continue}}if(Z===jI){Z2(P,0),Am(P,C,0,!0);break}e:{switch(W=P,Z){case Pb:case jI:throw Error("Root did not complete. This is a bug in React.");case vC:if((C&4194048)!==C)break;case Cq:Am(W,C,Xy,!x7);break e;case CD:fx=null;break;case c4e:case qft:break;default:throw Error("Unknown root exit status.")}if(an.actQueue!==null)Hc(W,k,C,fx,KI,Mq,Xy,y7,MC);else{if((C&62914560)===C&&(le=h4e+Kft-Uh(),10<le)){if(Am(W,C,Xy,!x7),Ne(W,0,!0)!==0)break e;W.timeoutHandle=d1t(sn.bind(null,W,k,fx,KI,Mq,C,Xy,y7,MC,x7,Z,bro,FI,0),le);break e}sn(W,k,fx,KI,Mq,C,Xy,y7,MC,x7,Z,gro,FI,0)}}}break}while(!0);d0(P)}function sn(P,C,k,W,Z,le,Le,qe,dt,yt,mn,vn,_n,Dn){if(P.timeoutHandle=AC,vn=C.subtreeFlags,(vn&8192||(vn&16785408)===16785408)&&(oL={stylesheets:null,count:0,unsuspend:$l},bc(C),vn=B(),vn!==null)){P.cancelPendingCommit=vn(Hc.bind(null,P,C,le,k,W,Z,Le,qe,dt,mn,yro,_n,Dn)),Am(P,le,Le,!yt);return}Hc(P,C,le,k,W,Z,Le,qe,dt)}function w3(P){for(var C=P;;){var k=C.tag;if((k===0||k===11||k===15)&&C.flags&16384&&(k=C.updateQueue,k!==null&&(k=k.stores,k!==null)))for(var W=0;W<k.length;W++){var Z=k[W],le=Z.getSnapshot;Z=Z.value;try{if(!bd(le(),Z))return!1}catch{return!1}}if(k=C.child,C.subtreeFlags&16384&&k!==null)k.return=C,C=k;else{if(C===P)break;for(;C.sibling===null;){if(C.return===null||C.return===P)return!0;C=C.return}C.sibling.return=C.return,C=C.sibling}}return!0}function Am(P,C,k,W){C&=~d4e,C&=~y7,P.suspendedLanes|=C,P.pingedLanes&=~C,W&&(P.warmLanes|=C),W=P.expirationTimes;for(var Z=C;0<Z;){var le=31-Jc(Z),Le=1<<le;W[le]=-1,Z&=~Le}k!==0&&et(P,k,C)}function L1(){return(Fc&(px|o6))===Wy?(qd(0),!1):!0}function u0(){if(Ys!==null){if(Qc===Mg)var P=Ys.return;else P=Ys,S1(),r0(P),xD=null,$I=0,P=Ys;for(;P!==null;)N1(P.alternate,P),P=P.return;Ys=null}}function Z2(P,C){var k=P.timeoutHandle;k!==AC&&(P.timeoutHandle=AC,Nro(k)),k=P.cancelPendingCommit,k!==null&&(P.cancelPendingCommit=null,k()),u0(),g0=P,Ys=k=Th(P.current,null),oa=C,Qc=Mg,Uy=null,x7=!1,TD=Ve(P,C),_4e=!1,Pd=Pb,MC=Xy=d4e=y7=g7=0,fx=JI=null,Mq=!1,(C&8)!==0&&(C|=C&32);var W=P.entangledLanes;if(W!==0)for(P=P.entanglements,W&=C;0<W;){var Z=31-Jc(W),le=1<<Z;C|=P[Z],W&=~le}return z3=C,Nl(),C=dD(),1e3<C-Z4&&(an.recentlyCreatedOwnerStacks=0,Z4=C),vg.discardPendingWarnings(),k}function fl(P,C){Zi=null,an.H=vq,an.getCurrentStack=null,j0=!1,t_=null,C===ye||C===pt?(C=Ld(),Qc=YI):C===Ke?(C=Ld(),Qc=Jft):Qc=C===zft?u4e:C!==null&&typeof C=="object"&&typeof C.then=="function"?MD:GI,Uy=C;var k=Ys;if(k===null)Pd=jI,z2(P,Lu(C,P.current));else switch(k.mode&Oc&&J_(k),xe(),Qc){case GI:po!==null&&typeof po.markComponentErrored=="function"&&po.markComponentErrored(k,C,oa);break;case SC:case CC:case YI:case MD:case qI:po!==null&&typeof po.markComponentSuspended=="function"&&po.markComponentSuspended(k,C,oa)}}function _0(){var P=an.H;return an.H=vq,P===null?vq:P}function wy(){var P=an.A;return an.A=pro,P}function sg(){Pd=vC,x7||(oa&4194048)!==oa&&t4.current!==null||(TD=!0),(g7&134217727)===0&&(y7&134217727)===0||g0===null||Am(g0,oa,Xy,!1)}function O1(P,C,k){var W=Fc;Fc|=px;var Z=_0(),le=wy();if(g0!==P||oa!==C){if(qa){var Le=P.memoizedUpdaters;0<Le.size&&(Ic(P,oa),Le.clear()),xt(P,C)}KI=null,Z2(P,C)}We(C),C=!1,Le=Pd;e:do try{if(Qc!==Mg&&Ys!==null){var qe=Ys,dt=Uy;switch(Qc){case u4e:u0(),Le=Cq;break e;case YI:case SC:case CC:case MD:t4.current===null&&(C=!0);var yt=Qc;if(Qc=Mg,Uy=null,va(P,qe,dt,yt),k&&TD){Le=Pb;break e}break;default:yt=Qc,Qc=Mg,Uy=null,va(P,qe,dt,yt)}}ag(),Le=Pd;break}catch(mn){fl(P,mn)}while(!0);return C&&P.shellSuspendCounter++,S1(),Fc=W,an.H=Z,an.A=le,Xe(),Ys===null&&(g0=null,oa=0,Nl()),Le}function ag(){for(;Ys!==null;)cg(Ys)}function Rm(P,C){var k=Fc;Fc|=px;var W=_0(),Z=wy();if(g0!==P||oa!==C){if(qa){var le=P.memoizedUpdaters;0<le.size&&(Ic(P,oa),le.clear()),xt(P,C)}KI=null,Tq=Uh()+Qft,Z2(P,C)}else TD=Ve(P,C);We(C);e:do try{if(Qc!==Mg&&Ys!==null)t:switch(C=Ys,le=Uy,Qc){case GI:Qc=Mg,Uy=null,va(P,C,le,GI);break;case SC:case CC:if(E2(le)){Qc=Mg,Uy=null,kf(C);break}C=function(){Qc!==SC&&Qc!==CC||g0!==P||(Qc=qI),d0(P)},le.then(C,C);break e;case YI:Qc=qI;break e;case Jft:Qc=l4e;break e;case qI:E2(le)?(Qc=Mg,Uy=null,kf(C)):(Qc=Mg,Uy=null,va(P,C,le,qI));break;case l4e:var Le=null;switch(Ys.tag){case 26:Le=Ys.memoizedState;case 5:case 27:var qe=Ys;if(!Le||A_(Le)){Qc=Mg,Uy=null;var dt=qe.sibling;if(dt!==null)Ys=dt;else{var yt=qe.return;yt!==null?(Ys=yt,Aa(yt)):Ys=null}break t}break;default:console.error("Unexpected type of fiber triggered a suspensey commit. This is a bug in React.")}Qc=Mg,Uy=null,va(P,C,le,l4e);break;case MD:Qc=Mg,Uy=null,va(P,C,le,MD);break;case u4e:u0(),Pd=Cq;break e;default:throw Error("Unexpected SuspendedReason. This is a bug in React.")}an.actQueue!==null?ag():Rf();break}catch(mn){fl(P,mn)}while(!0);return S1(),an.H=W,an.A=Z,Fc=k,Ys!==null?(po!==null&&typeof po.markRenderYielded=="function"&&po.markRenderYielded(),Pb):(Xe(),g0=null,oa=0,Nl(),Pd)}function Rf(){for(;Ys!==null&&!U1();)cg(Ys)}function cg(P){var C=P.alternate;(P.mode&Oc)!==Ba?(T2(P),C=Zt(P,G2,C,P,z3),J_(P)):C=Zt(P,G2,C,P,z3),P.memoizedProps=P.pendingProps,C===null?Aa(P):Ys=C}function kf(P){var C=Zt(P,Nc,P);P.memoizedProps=P.pendingProps,C===null?Aa(P):Ys=C}function Nc(P){var C=P.alternate,k=(P.mode&Oc)!==Ba;switch(k&&T2(P),P.tag){case 15:case 0:C=Mm(C,P,P.pendingProps,P.type,void 0,oa);break;case 11:C=Mm(C,P,P.pendingProps,P.type.render,P.ref,oa);break;case 5:r0(P);default:N1(C,P),P=Ys=cy(P,z3),C=G2(C,P,z3)}return k&&J_(P),C}function va(P,C,k,W){S1(),r0(C),xD=null,$I=0;var Z=C.return;try{if(A1(P,Z,C,k,oa)){Pd=jI,z2(P,Lu(k,P.current)),Ys=null;return}}catch(le){if(Z!==null)throw Ys=Z,le;Pd=jI,z2(P,Lu(k,P.current)),Ys=null;return}C.flags&32768?(ha||W===GI?P=!0:TD||(oa&536870912)!==0?P=!1:(x7=P=!0,(W===SC||W===CC||W===YI||W===MD)&&(W=t4.current,W!==null&&W.tag===13&&(W.flags|=16384))),Fl(C,P)):Aa(C)}function Aa(P){var C=P;do{if((C.flags&32768)!==0){Fl(C,x7);return}var k=C.alternate;if(P=C.return,T2(C),k=Zt(C,Fh,k,C,z3),(C.mode&Oc)!==Ba&&mf(C),k!==null){Ys=k;return}if(C=C.sibling,C!==null){Ys=C;return}Ys=C=P}while(C!==null);Pd===Pb&&(Pd=qft)}function Fl(P,C){do{var k=j5(P.alternate,P);if(k!==null){k.flags&=32767,Ys=k;return}if((P.mode&Oc)!==Ba){mf(P),k=P.actualDuration;for(var W=P.child;W!==null;)k+=W.actualDuration,W=W.sibling;P.actualDuration=k}if(k=P.return,k!==null&&(k.flags|=32768,k.subtreeFlags=0,k.deletions=null),!C&&(P=P.sibling,P!==null)){Ys=P;return}Ys=P=k}while(P!==null);Pd=Cq,Ys=null}function Hc(P,C,k,W,Z,le,Le,qe,dt){P.cancelPendingCommit=null;do os();while(Qf!==TC);if(vg.flushLegacyContextWarning(),vg.flushPendingUnsafeLifecycleWarnings(),(Fc&(px|o6))!==Wy)throw Error("Should not already be working.");if(po!==null&&typeof po.markCommitStarted=="function"&&po.markCommitStarted(k),C===null)pe();else{if(k===0&&console.error("finishedLanes should not be empty during a commit. This is a bug in React."),C===P.current)throw Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");if(le=C.lanes|C.childLanes,le|=fC,Ue(P,k,le,Le,qe,dt),P===g0&&(Ys=g0=null,oa=0),wD=C,P7=P,v7=k,p4e=le,f4e=Z,n1t=W,(C.subtreeFlags&10256)!==0||(C.flags&10256)!==0?(P.callbackNode=null,P.callbackPriority=0,km(pg,function(){return si(),null})):(P.callbackNode=null,P.callbackPriority=0),mD=pb(),W=(C.flags&13878)!==0,(C.subtreeFlags&13878)!==0||W){W=an.T,an.T=null,Z=Or.p,Or.p=U0,Le=Fc,Fc|=o6;try{Uu(P,C,k)}finally{Fc=Le,Or.p=Z,an.T=W}}Qf=Zft,Ga(),Pu(),qi()}}function Ga(){if(Qf===Zft){Qf=TC;var P=P7,C=wD,k=v7,W=(C.flags&13878)!==0;if((C.subtreeFlags&13878)!==0||W){W=an.T,an.T=null;var Z=Or.p;Or.p=U0;var le=Fc;Fc|=o6;try{vD=k,SD=P,Ty(C,P),SD=vD=null,k=w4e;var Le=b2(P.containerInfo),qe=k.focusedElem,dt=k.selectionRange;if(Le!==qe&&qe&&qe.ownerDocument&&Nd(qe.ownerDocument.documentElement,qe)){if(dt!==null&&Gx(qe)){var yt=dt.start,mn=dt.end;if(mn===void 0&&(mn=yt),"selectionStart"in qe)qe.selectionStart=yt,qe.selectionEnd=Math.min(mn,qe.value.length);else{var vn=qe.ownerDocument||document,_n=vn&&vn.defaultView||window;if(_n.getSelection){var Dn=_n.getSelection(),dr=qe.textContent.length,Ni=Math.min(dt.start,dr),y0=dt.end===void 0?Ni:Math.min(dt.end,dr);!Dn.extend&&Ni>y0&&(Le=y0,y0=Ni,Ni=Le);var ma=Ds(qe,Ni),Mt=Ds(qe,y0);if(ma&&Mt&&(Dn.rangeCount!==1||Dn.anchorNode!==ma.node||Dn.anchorOffset!==ma.offset||Dn.focusNode!==Mt.node||Dn.focusOffset!==Mt.offset)){var Et=vn.createRange();Et.setStart(ma.node,ma.offset),Dn.removeAllRanges(),Ni>y0?(Dn.addRange(Et),Dn.extend(Mt.node,Mt.offset)):(Et.setEnd(Mt.node,Mt.offset),Dn.addRange(Et))}}}}for(vn=[],Dn=qe;Dn=Dn.parentNode;)Dn.nodeType===1&&vn.push({element:Dn,left:Dn.scrollLeft,top:Dn.scrollTop});for(typeof qe.focus=="function"&&qe.focus(),qe=0;qe<vn.length;qe++){var Ft=vn[qe];Ft.element.scrollLeft=Ft.left,Ft.element.scrollTop=Ft.top}}$q=!!T4e,w4e=T4e=null}finally{Fc=le,Or.p=Z,an.T=W}}P.current=C,Qf=e1t}}function Pu(){if(Qf===e1t){Qf=TC;var P=P7,C=wD,k=v7,W=(C.flags&8772)!==0;if((C.subtreeFlags&8772)!==0||W){W=an.T,an.T=null;var Z=Or.p;Or.p=U0;var le=Fc;Fc|=o6;try{po!==null&&typeof po.markLayoutEffectsStarted=="function"&&po.markLayoutEffectsStarted(k),vD=k,SD=P,J2(P,C.alternate,C),SD=vD=null,po!==null&&typeof po.markLayoutEffectsStopped=="function"&&po.markLayoutEffectsStopped()}finally{Fc=le,Or.p=Z,an.T=W}}Qf=t1t}}function qi(){if(Qf===Pro||Qf===t1t){Qf=TC,A3();var P=P7,C=wD,k=v7,W=n1t,Z=(C.subtreeFlags&10256)!==0||(C.flags&10256)!==0;Z?Qf=m4e:(Qf=TC,wD=P7=null,ns(P,P.pendingLanes),wC=0,ZI=null);var le=P.pendingLanes;if(le===0&&(b7=null),Z||Hf(P),Z=Ct(k),C=C.stateNode,Wl&&typeof Wl.onCommitFiberRoot=="function")try{var Le=(C.current.flags&128)===128;switch(Z){case U0:var qe=j1;break;case N_:qe=Lp;break;case Xh:qe=pg;break;case xg:qe=j4;break;default:qe=pg}Wl.onCommitFiberRoot(Mu,C,qe,Le)}catch(vn){W0||(W0=!0,console.error("React instrumentation encountered an error: %s",vn))}if(qa&&P.memoizedUpdaters.clear(),B0(),W!==null){Le=an.T,qe=Or.p,Or.p=U0,an.T=null;try{var dt=P.onRecoverableError;for(C=0;C<W.length;C++){var yt=W[C],mn=z0(yt.stack);Zt(yt.source,dt,yt.value,mn)}}finally{an.T=Le,Or.p=qe}}(v7&3)!==0&&os(),d0(P),le=P.pendingLanes,(k&4194090)!==0&&(le&42)!==0?(bC=!0,P===x4e?QI++:(QI=0,x4e=P)):QI=0,qd(0),pe()}}function z0(P){return P={componentStack:P},Object.defineProperty(P,"digest",{get:function(){console.error('You are accessing "digest" from the errorInfo object passed to onRecoverableError. This property is no longer provided as part of errorInfo but can be accessed as a property of the Error instance itself.')}}),P}function ns(P,C){(P.pooledCacheLanes&=C)===0&&(C=P.pooledCache,C!=null&&(P.pooledCache=null,q_(C)))}function os(P){return Ga(),Pu(),qi(),si()}function si(){if(Qf!==m4e)return!1;var P=P7,C=p4e;p4e=0;var k=Ct(v7),W=Xh>k?Xh:k;k=an.T;var Z=Or.p;try{Or.p=W,an.T=null,W=f4e,f4e=null;var le=P7,Le=v7;if(Qf=TC,wD=P7=null,v7=0,(Fc&(px|o6))!==Wy)throw Error("Cannot flush passive effects while already rendering.");g4e=!0,wq=!1,po!==null&&typeof po.markPassiveEffectsStarted=="function"&&po.markPassiveEffectsStarted(Le);var qe=Fc;if(Fc|=o6,l0(le.current),zh(le,le.current,Le,W),po!==null&&typeof po.markPassiveEffectsStopped=="function"&&po.markPassiveEffectsStopped(),Hf(le),Fc=qe,qd(0,!1),wq?le===ZI?wC++:(wC=0,ZI=le):wC=0,wq=g4e=!1,Wl&&typeof Wl.onPostCommitFiberRoot=="function")try{Wl.onPostCommitFiberRoot(Mu,le)}catch(yt){W0||(W0=!0,console.error("React instrumentation encountered an error: %s",yt))}var dt=le.current.stateNode;return dt.effectDuration=0,dt.passiveEffectDuration=0,!0}finally{Or.p=Z,an.T=k,ns(P,C)}}function xl(P,C,k){C=Lu(k,C),C=F0(P.stateNode,C,2),P=Rc(P,C,2),P!==null&&(ze(P,2),d0(P))}function _o(P,C,k){if(ED=!1,P.tag===3)xl(P,P,k);else{for(;C!==null;){if(C.tag===3){xl(C,P,k);return}if(C.tag===1){var W=C.stateNode;if(typeof C.type.getDerivedStateFromError=="function"||typeof W.componentDidCatch=="function"&&(b7===null||!b7.has(W))){P=Lu(k,P),k=xc(2),W=Rc(C,k,2),W!==null&&(V2(k,W,C,P),ze(W,2),d0(W));return}}C=C.return}console.error(`Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Potential causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.
|
|
163
163
|
|
|
164
164
|
Error message:
|
|
165
165
|
|
|
166
|
-
%s`,k)}}function D_(P,C,k){var W=P.pingCache;if(W===null){W=P.pingCache=new
|
|
166
|
+
%s`,k)}}function D_(P,C,k){var W=P.pingCache;if(W===null){W=P.pingCache=new xro;var Z=new Set;W.set(C,Z)}else Z=W.get(C),Z===void 0&&(Z=new Set,W.set(C,Z));Z.has(k)||(_4e=!0,Z.add(k),W=Pc.bind(null,P,C,k),qa&&Ic(P,k),C.then(W,W))}function Pc(P,C,k){var W=P.pingCache;W!==null&&W.delete(C),P.pingedLanes|=P.suspendedLanes&k,P.warmLanes&=~k,I1()&&an.actQueue===null&&console.error(`A suspended resource finished loading inside a test, but the event was not wrapped in act(...).
|
|
167
167
|
|
|
168
168
|
When testing, code that resolves suspended data should be wrapped into act(...):
|
|
169
169
|
|
|
@@ -172,7 +172,7 @@ act(() => {
|
|
|
172
172
|
});
|
|
173
173
|
/* assert on the output */
|
|
174
174
|
|
|
175
|
-
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`),g0===P&&(oa&k)===k&&(Pd===vC||Pd===c4e&&(oa&62914560)===oa&&Uh()-h4e<Kft?(Fc&px)===Wy&&Z2(P,0):d4e|=k,MC===oa&&(MC=0)),d0(P)}function Sa(P,C){C===0&&(C=Ee()),P=k0(P,C),P!==null&&(ze(P,C),d0(P))}function Gu(P){var C=P.memoizedState,k=0;C!==null&&(k=C.retryLane),Sa(P,k)}function sc(P,C){var k=0;switch(P.tag){case 13:var W=P.stateNode,Z=P.memoizedState;Z!==null&&(k=Z.retryLane);break;case 19:W=P.stateNode;break;case 22:W=P.stateNode._retryCache;break;default:throw Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}W!==null&&W.delete(C),Sa(P,k)}function Nf(P,C,k){if((C.subtreeFlags&67117056)!==0)for(C=C.child;C!==null;){var W=P,Z=C,le=Z.type===Iy;le=k||le,Z.tag!==22?Z.flags&67108864?le&&Zt(Z,X4,W,Z,(Z.mode&Vp)===Ba):Nf(W,Z,le):Z.memoizedState===null&&(le&&Z.flags&8192?Zt(Z,X4,W,Z):Z.subtreeFlags&67108864&&Zt(Z,Nf,W,Z,le)),C=C.sibling}}function X4(P,C){var k=2<arguments.length&&arguments[2]!==void 0?arguments[2]:!0;Ce(!0);try{sd(C),k&&Q2(C),ni(P,C.alternate,C,!1),k&&Cp(P,C,0,null,!1,0)}finally{Ce(!1)}}function Hf(P){var C=!0;P.current.mode&(o_|Jf)||(C=!1),Nf(P,P.current,C)}function $s(P){if((Fc&px)===Wy){var C=P.tag;if(C===3||C===1||C===0||C===11||C===14||C===15){if(C=A(P)||"ReactComponent",Eq!==null){if(Eq.has(C))return;Eq.add(C)}else Eq=new Set([C]);Zt(P,function(){console.error("Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously later calls tries to update the component. Move this work to useEffect instead.")})}}}function Ic(P,C){qa&&P.memoizedUpdaters.forEach(function(k){lt(P,k,C)})}function km(P,C){var k=an.actQueue;return k!==null?(k.push(C),
|
|
175
|
+
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`),g0===P&&(oa&k)===k&&(Pd===vC||Pd===c4e&&(oa&62914560)===oa&&Uh()-h4e<Kft?(Fc&px)===Wy&&Z2(P,0):d4e|=k,MC===oa&&(MC=0)),d0(P)}function Sa(P,C){C===0&&(C=Ee()),P=k0(P,C),P!==null&&(ze(P,C),d0(P))}function Gu(P){var C=P.memoizedState,k=0;C!==null&&(k=C.retryLane),Sa(P,k)}function sc(P,C){var k=0;switch(P.tag){case 13:var W=P.stateNode,Z=P.memoizedState;Z!==null&&(k=Z.retryLane);break;case 19:W=P.stateNode;break;case 22:W=P.stateNode._retryCache;break;default:throw Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}W!==null&&W.delete(C),Sa(P,k)}function Nf(P,C,k){if((C.subtreeFlags&67117056)!==0)for(C=C.child;C!==null;){var W=P,Z=C,le=Z.type===Iy;le=k||le,Z.tag!==22?Z.flags&67108864?le&&Zt(Z,X4,W,Z,(Z.mode&Vp)===Ba):Nf(W,Z,le):Z.memoizedState===null&&(le&&Z.flags&8192?Zt(Z,X4,W,Z):Z.subtreeFlags&67108864&&Zt(Z,Nf,W,Z,le)),C=C.sibling}}function X4(P,C){var k=2<arguments.length&&arguments[2]!==void 0?arguments[2]:!0;Ce(!0);try{sd(C),k&&Q2(C),ni(P,C.alternate,C,!1),k&&Cp(P,C,0,null,!1,0)}finally{Ce(!1)}}function Hf(P){var C=!0;P.current.mode&(o_|Jf)||(C=!1),Nf(P,P.current,C)}function $s(P){if((Fc&px)===Wy){var C=P.tag;if(C===3||C===1||C===0||C===11||C===14||C===15){if(C=A(P)||"ReactComponent",Eq!==null){if(Eq.has(C))return;Eq.add(C)}else Eq=new Set([C]);Zt(P,function(){console.error("Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously later calls tries to update the component. Move this work to useEffect instead.")})}}}function Ic(P,C){qa&&P.memoizedUpdaters.forEach(function(k){lt(P,k,C)})}function km(P,C){var k=an.actQueue;return k!==null?(k.push(C),Cro):mg(P,C)}function Ey(P){I1()&&an.actQueue===null&&Zt(P,function(){console.error(`An update to %s inside a test was not wrapped in act(...).
|
|
176
176
|
|
|
177
177
|
When testing, code that causes React state updates should be wrapped into act(...):
|
|
178
178
|
|
|
@@ -181,8 +181,8 @@ act(() => {
|
|
|
181
181
|
});
|
|
182
182
|
/* assert on the output */
|
|
183
183
|
|
|
184
|
-
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`,A(P))})}function d0(P){P!==DD&&P.next===null&&(DD===null?Dq=DD=P:DD=DD.next=P),Aq=!0,an.actQueue!==null?b4e||(b4e=!0,Mo()):y4e||(y4e=!0,Mo())}function qd(P,C){if(!P4e&&Aq){P4e=!0;do for(var k=!1,W=Dq;W!==null;){if(P!==0){var Z=W.pendingLanes;if(Z===0)var le=0;else{var Le=W.suspendedLanes,qe=W.pingedLanes;le=(1<<31-Jc(42|P)+1)-1,le&=Z&~(Le&~qe),le=le&201326741?le&201326741|1:le?le|2:0}le!==0&&(k=!0,Lf(W,le))}else le=oa,le=Ne(W,W===g0?le:0,W.cancelPendingCommit!==null||W.timeoutHandle!==AC),(le&3)===0||Ve(W,le)||(k=!0,Lf(W,le));W=W.next}while(k);P4e=!1}}function If(){F1()}function F1(){Aq=b4e=y4e=!1;var P=0;EC!==0&&(Na()&&(P=EC),EC=0);for(var C=Uh(),k=null,W=Dq;W!==null;){var Z=W.next,le=Jd(W,C);le===0?(W.next=null,k===null?Dq=Z:k.next=Z,Z===null&&(DD=k)):(k=W,(P!==0||(le&3)!==0)&&(Aq=!0)),W=Z}qd(P)}function Jd(P,C){for(var k=P.suspendedLanes,W=P.pingedLanes,Z=P.expirationTimes,le=P.pendingLanes&-62914561;0<le;){var Le=31-Jc(le),qe=1<<Le,dt=Z[Le];dt===-1?((qe&k)===0||(qe&W)!==0)&&(Z[Le]=Re(qe,C)):dt<=C&&(P.expiredLanes|=qe),le&=~qe}if(C=g0,k=oa,k=Ne(P,P===C?k:0,P.cancelPendingCommit!==null||P.timeoutHandle!==AC),W=P.callbackNode,k===0||P===C&&(Qc===SC||Qc===CC)||P.cancelPendingCommit!==null)return W!==null&&Dy(W),P.callbackNode=null,P.callbackPriority=0;if((k&3)===0||Ve(P,k)){if(C=k&-k,C!==P.callbackPriority||an.actQueue!==null&&W!==v4e)Dy(W);else return C;switch(Ct(k)){case U0:case N_:k=Lp;break;case Xh:k=pg;break;case xg:k=j4;break;default:k=pg}return W=Ra.bind(null,P),an.actQueue!==null?(an.actQueue.push(W),k=v4e):k=mg(k,W),P.callbackPriority=C,P.callbackNode=k,C}return W!==null&&Dy(W),P.callbackPriority=2,P.callbackNode=null,2}function Ra(P,C){if(bC=yC=!1,Qf!==TC&&Qf!==m4e)return P.callbackNode=null,P.callbackPriority=0,null;var k=P.callbackNode;if(os()&&P.callbackNode!==k)return null;var W=oa;return W=Ne(P,P===g0?W:0,P.cancelPendingCommit!==null||P.timeoutHandle!==AC),W===0?null:(Ar(P,W,C),Jd(P,Uh()),P.callbackNode!=null&&P.callbackNode===k?Ra.bind(null,P):null)}function Lf(P,C){if(os())return null;yC=bC,bC=!1,Ar(P,C,!0)}function Dy(P){P!==v4e&&P!==null&&q5(P)}function Mo(){an.actQueue!==null&&an.actQueue.push(function(){return F1(),null}),Nro(function(){(Fc&(px|o6))!==Wy?mg(j1,If):F1()})}function Ay(){return EC===0&&(EC=Pe()),EC}function Nm(P){return P==null||typeof P=="symbol"||typeof P=="boolean"?null:typeof P=="function"?P:(ie(P,"action"),Ad(""+P))}function Mp(P,C){var k=C.ownerDocument.createElement("input");return k.name=C.name,k.value=C.value,P.id&&k.setAttribute("form",P.id),C.parentNode.insertBefore(k,C),P=new FormData(P),k.parentNode.removeChild(k),P}function ka(P,C,k,W,Z){if(C==="submit"&&k&&k.stateNode===Z){var le=Nm((Z[Ja]||null).action),Le=W.submitter;Le&&(C=(C=Le[Ja]||null)?Nm(C.formAction):Le.getAttribute("formAction"),C!==null&&(le=C,Le=null));var qe=new Zo("action","action",null,W,Z);P.push({event:qe,listeners:[{instance:null,listener:function(){if(W.defaultPrevented){if(EC!==0){var dt=Le?Mp(Z,Le):new FormData(Z),yt={pending:!0,data:dt,method:Z.method,action:le};Object.freeze(yt),E1(k,yt,null,dt)}}else typeof le=="function"&&(qe.preventDefault(),dt=Le?Mp(Z,Le):new FormData(Z),yt={pending:!0,data:dt,method:Z.method,action:le},Object.freeze(yt),E1(k,yt,le,dt))},currentTarget:Z}]})}}function gl(P,C,k){P.currentTarget=k;try{C(P)}catch(W){o4e(W)}P.currentTarget=null}function h0(P,C){C=(C&4)!==0;for(var k=0;k<P.length;k++){var W=P[k];e:{var Z=void 0,le=W.event;if(W=W.listeners,C)for(var Le=W.length-1;0<=Le;Le--){var qe=W[Le],dt=qe.instance,yt=qe.currentTarget;if(qe=qe.listener,dt!==Z&&le.isPropagationStopped())break e;dt!==null?Zt(dt,gl,le,qe,yt):gl(le,qe,yt),Z=dt}else for(Le=0;Le<W.length;Le++){if(qe=W[Le],dt=qe.instance,yt=qe.currentTarget,qe=qe.listener,dt!==Z&&le.isPropagationStopped())break e;dt!==null?Zt(dt,gl,le,qe,yt):gl(le,qe,yt),Z=dt}}}}function Dr(P,C){S4e.has(P)||console.error('Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',P);var k=C[Ul];k===void 0&&(k=C[Ul]=new Set);var W=P+"__bubble";k.has(W)||(cd(C,P,2,!1),k.add(W))}function Tp(P,C,k){S4e.has(P)&&!C&&console.error('Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. This is a bug in React. Please file an issue.',P);var W=0;C&&(W|=4),cd(k,P,W,C)}function Ry(P){if(!P[Rq]){P[Rq]=!0,ab.forEach(function(k){k!=="selectionchange"&&(S4e.has(k)||Tp(k,!1,P),Tp(k,!0,P))});var C=P.nodeType===9?P:P.ownerDocument;C===null||C[Rq]||(C[Rq]=!0,Tp("selectionchange",!1,C))}}function cd(P,C,k,W){switch(dn(C)){case U0:var Z=pd;break;case N_:Z=kp;break;default:Z=p0}k=Z.bind(null,C,k,P),Z=void 0,!Gt||C!=="touchstart"&&C!=="touchmove"&&C!=="wheel"||(Z=!0),W?Z!==void 0?P.addEventListener(C,k,{capture:!0,passive:Z}):P.addEventListener(C,k,!0):Z!==void 0?P.addEventListener(C,k,{passive:Z}):P.addEventListener(C,k,!1)}function vu(P,C,k,W,Z){var le=W;if((C&1)===0&&(C&2)===0&&W!==null)e:for(;;){if(W===null)return;var Le=W.tag;if(Le===3||Le===4){var qe=W.stateNode.containerInfo;if(qe===Z)break;if(Le===4)for(Le=W.return;Le!==null;){var dt=Le.tag;if((dt===3||dt===4)&&Le.stateNode.containerInfo===Z)return;Le=Le.return}for(;qe!==null;){if(Le=Dt(qe),Le===null)return;if(dt=Le.tag,dt===5||dt===6||dt===26||dt===27){W=le=Le;continue e}qe=qe.parentNode}}W=W.return}pm(function(){var yt=le,mn=U_(k),vn=[];e:{var _n=i7.get(P);if(_n!==void 0){var Dn=Zo,dr=P;switch(P){case"keypress":if(Hu(k)===0)break e;case"keydown":case"keyup":Dn=q4;break;case"focusin":dr="focus",Dn=js;break;case"focusout":dr="blur",Dn=js;break;case"beforeblur":case"afterblur":Dn=js;break;case"click":if(k.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Dn=ss;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Dn=Nr;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Dn=Yh;break;case qf:case r7:case N3:Dn=cD;break;case ub:Dn=Kv;break;case"scroll":case"scrollend":Dn=Yt;break;case"wheel":Dn=Q1;break;case"copy":case"cut":case"paste":Dn=uq;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Dn=lD;break;case"toggle":case"beforetoggle":Dn=Qv}var Ni=(C&4)!==0,y0=!Ni&&(P==="scroll"||P==="scrollend"),ma=Ni?_n!==null?_n+"Capture":null:_n;Ni=[];for(var Mt=yt,Et;Mt!==null;){var Ft=Mt;if(Et=Ft.stateNode,Ft=Ft.tag,Ft!==5&&Ft!==26&&Ft!==27||Et===null||ma===null||(Ft=ja(Mt,ma),Ft!=null&&Ni.push(Bl(Mt,Ft,Et))),y0)break;Mt=Mt.return}0<Ni.length&&(_n=new Dn(_n,dr,null,k,mn),vn.push({event:_n,listeners:Ni}))}}if((C&7)===0){e:{if(_n=P==="mouseover"||P==="pointerover",Dn=P==="mouseout"||P==="pointerout",_n&&k!==ue&&(dr=k.relatedTarget||k.fromElement)&&(Dt(dr)||dr[Kc]))break e;if((Dn||_n)&&(_n=mn.window===mn?mn:(_n=mn.ownerDocument)?_n.defaultView||_n.parentWindow:window,Dn?(dr=k.relatedTarget||k.toElement,Dn=yt,dr=dr?Dt(dr):null,dr!==null&&(y0=g(dr),Ni=dr.tag,dr!==y0||Ni!==5&&Ni!==27&&Ni!==6)&&(dr=null)):(Dn=null,dr=yt),Dn!==dr)){if(Ni=ss,Ft="onMouseLeave",ma="onMouseEnter",Mt="mouse",(P==="pointerout"||P==="pointerover")&&(Ni=lD,Ft="onPointerLeave",ma="onPointerEnter",Mt="pointer"),y0=Dn==null?_n:Cn(Dn),Et=dr==null?_n:Cn(dr),_n=new Ni(Ft,Mt+"leave",Dn,k,mn),_n.target=y0,_n.relatedTarget=Et,Ft=null,Dt(mn)===yt&&(Ni=new Ni(ma,Mt+"enter",dr,k,mn),Ni.target=Et,Ni.relatedTarget=y0,Ft=Ni),y0=Ft,Dn&&dr)t:{for(Ni=Dn,ma=dr,Mt=0,Et=Ni;Et;Et=_a(Et))Mt++;for(Et=0,Ft=ma;Ft;Ft=_a(Ft))Et++;for(;0<Mt-Et;)Ni=_a(Ni),Mt--;for(;0<Et-Mt;)ma=_a(ma),Et--;for(;Mt--;){if(Ni===ma||ma!==null&&Ni===ma.alternate)break t;Ni=_a(Ni),ma=_a(ma)}Ni=null}else Ni=null;Dn!==null&&wi(vn,_n,Dn,Ni,!1),dr!==null&&y0!==null&&wi(vn,y0,dr,Ni,!0)}}e:{if(_n=yt?Cn(yt):window,Dn=_n.nodeName&&_n.nodeName.toLowerCase(),Dn==="select"||Dn==="input"&&_n.type==="file")var Rn=dl;else if(j_(_n))if(t7)Rn=Fo;else{Rn=Sh;var Po=up}else Dn=_n.nodeName,!Dn||Dn.toLowerCase()!=="input"||_n.type!=="checkbox"&&_n.type!=="radio"?yt&&p_(yt.elementType)&&(Rn=dl):Rn=y1;if(Rn&&(Rn=Rn(P,yt))){fm(vn,Rn,k,mn);break e}Po&&Po(P,_n,yt),P==="focusout"&&yt&&_n.type==="number"&&yt.memoizedProps.value!=null&&Bn(_n,"number",_n.value)}switch(Po=yt?Cn(yt):window,P){case"focusin":(j_(Po)||Po.contentEditable==="true")&&(yg=Po,n7=yt,o7=null);break;case"focusout":o7=n7=yg=null;break;case"mousedown":Ws=!0;break;case"contextmenu":case"mouseup":case"dragend":Ws=!1,P2(vn,k,mn);break;case"selectionchange":if(NI)break;case"keydown":case"keyup":P2(vn,k,mn)}var ls;if(Zv)e:{switch(P){case"compositionstart":var hr="onCompositionStart";break e;case"compositionend":hr="onCompositionEnd";break e;case"compositionupdate":hr="onCompositionUpdate";break e}hr=void 0}else yd?oc(P,k)&&(hr="onCompositionEnd"):P==="keydown"&&k.keyCode===_C&&(hr="onCompositionStart");hr&&(dC&&k.locale!=="ko"&&(yd||hr!=="onCompositionStart"?hr==="onCompositionEnd"&&yd&&(ls=Nu()):(kn=mn,tn="value"in kn?kn.value:kn.textContent,yd=!0)),Po=Hm(yt,hr),0<Po.length&&(hr=new lb(hr,P,null,k,mn),vn.push({event:hr,listeners:Po}),ls?hr.data=ls:(ls=Ac(k),ls!==null&&(hr.data=ls)))),(ls=uD?lp(P,k):uu(P,k))&&(hr=Hm(yt,"onBeforeInput"),0<hr.length&&(Po=new dq("onBeforeInput","beforeinput",null,k,mn),vn.push({event:Po,listeners:hr}),Po.data=ls)),ka(vn,P,yt,k,mn)}h0(vn,C)})}function Bl(P,C,k){return{instance:P,listener:C,currentTarget:k}}function Hm(P,C){for(var k=C+"Capture",W=[];P!==null;){var Z=P,le=Z.stateNode;if(Z=Z.tag,Z!==5&&Z!==26&&Z!==27||le===null||(Z=ja(P,k),Z!=null&&W.unshift(Bl(P,Z,le)),Z=ja(P,C),Z!=null&&W.push(Bl(P,Z,le))),P.tag===3)return W;P=P.return}return[]}function _a(P){if(P===null)return null;do P=P.return;while(P&&P.tag!==5&&P.tag!==27);return P||null}function wi(P,C,k,W,Z){for(var le=C._reactName,Le=[];k!==null&&k!==W;){var qe=k,dt=qe.alternate,yt=qe.stateNode;if(qe=qe.tag,dt!==null&&dt===W)break;qe!==5&&qe!==26&&qe!==27||yt===null||(dt=yt,Z?(yt=ja(k,le),yt!=null&&Le.unshift(Bl(k,yt,dt))):Z||(yt=ja(k,le),yt!=null&&Le.push(Bl(k,yt,dt)))),k=k.return}Le.length!==0&&P.push({event:C,listeners:Le})}function Ei(P,C){f_(P,C),P!=="input"&&P!=="textarea"&&P!=="select"||C==null||C.value!==null||K1||(K1=!0,P==="select"&&C.multiple?console.error("`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.",P):console.error("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",P));var k={registrationNameDependencies:Vm,possibleRegistrationNames:ax};p_(P)||typeof C.is=="string"||vh(P,C,k),C.contentEditable&&!C.suppressContentEditableWarning&&C.children!=null&&console.error("A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional.")}function ai(P,C,k,W){C!==k&&(k=qc(k),qc(C)!==k&&(W[P]=C))}function Kd(P,C,k){C.forEach(function(W){k[Of(W)]=W==="style"?Yu(P):P.getAttribute(W)})}function Yc(P,C){C===!1?console.error("Expected `%s` listener to be a function, instead got `false`.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.",P,P,P):console.error("Expected `%s` listener to be a function, instead got a value of `%s` type.",P,typeof C)}function Vh(P,C){return P=P.namespaceURI===xd||P.namespaceURI===Gh?P.ownerDocument.createElementNS(P.namespaceURI,P.tagName):P.ownerDocument.createElement(P.tagName),P.innerHTML=C,P.innerHTML}function qc(P){return ee(P)&&(console.error("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before using it here.",ce(P)),oe(P)),(typeof P=="string"?P:""+P).replace(Cro,`
|
|
185
|
-
`).replace(Mro,"")}function wp(P,C){return C=qc(C),qc(P)===C}function ld(){}function Rs(P,C,k,W,Z,le){switch(k){case"children":typeof W=="string"?(mm(W,C,!1),C==="body"||C==="textarea"&&W===""||m_(P,W)):(typeof W=="number"||typeof W=="bigint")&&(mm(""+W,C,!1),C!=="body"&&m_(P,""+W));break;case"className":Sn(P,"class",W);break;case"tabIndex":Sn(P,"tabindex",W);break;case"dir":case"role":case"viewBox":case"width":case"height":Sn(P,k,W);break;case"style":W_(P,W,le);break;case"data":if(C!=="object"){Sn(P,"data",W);break}case"src":case"href":if(W===""&&(C!=="a"||k!=="href")){console.error(k==="src"?'An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.':'An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',k,k),P.removeAttribute(k);break}if(W==null||typeof W=="function"||typeof W=="symbol"||typeof W=="boolean"){P.removeAttribute(k);break}ie(W,k),W=Ad(""+W),P.setAttribute(k,W);break;case"action":case"formAction":if(W!=null&&(C==="form"?k==="formAction"?console.error("You can only pass the formAction prop to <input> or <button>. Use the action prop on <form>."):typeof W=="function"&&(Z.encType==null&&Z.method==null||Hq||(Hq=!0,console.error("Cannot specify a encType or method for a form that specifies a function as the action. React provides those automatically. They will get overridden.")),Z.target==null||Nq||(Nq=!0,console.error("Cannot specify a target for a form that specifies a function as the action. The function will always be executed in the same window."))):C==="input"||C==="button"?k==="action"?console.error("You can only pass the action prop to <form>. Use the formAction prop on <input> or <button>."):C!=="input"||Z.type==="submit"||Z.type==="image"||kq?C!=="button"||Z.type==null||Z.type==="submit"||kq?typeof W=="function"&&(Z.name==null||a1t||(a1t=!0,console.error('Cannot specify a "name" prop for a button that specifies a function as a formAction. React needs it to encode which action should be invoked. It will get overridden.')),Z.formEncType==null&&Z.formMethod==null||Hq||(Hq=!0,console.error("Cannot specify a formEncType or formMethod for a button that specifies a function as a formAction. React provides those automatically. They will get overridden.")),Z.formTarget==null||Nq||(Nq=!0,console.error("Cannot specify a formTarget for a button that specifies a function as a formAction. The function will always be executed in the same window."))):(kq=!0,console.error('A button can only specify a formAction along with type="submit" or no type.')):(kq=!0,console.error('An input can only specify a formAction along with type="submit" or type="image".')):console.error(k==="action"?"You can only pass the action prop to <form>.":"You can only pass the formAction prop to <input> or <button>.")),typeof W=="function"){P.setAttribute(k,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof le=="function"&&(k==="formAction"?(C!=="input"&&Rs(P,C,"name",Z.name,Z,null),Rs(P,C,"formEncType",Z.formEncType,Z,null),Rs(P,C,"formMethod",Z.formMethod,Z,null),Rs(P,C,"formTarget",Z.formTarget,Z,null)):(Rs(P,C,"encType",Z.encType,Z,null),Rs(P,C,"method",Z.method,Z,null),Rs(P,C,"target",Z.target,Z,null)));if(W==null||typeof W=="symbol"||typeof W=="boolean"){P.removeAttribute(k);break}ie(W,k),W=Ad(""+W),P.setAttribute(k,W);break;case"onClick":W!=null&&(typeof W!="function"&&Yc(k,W),P.onclick=ld);break;case"onScroll":W!=null&&(typeof W!="function"&&Yc(k,W),Dr("scroll",P));break;case"onScrollEnd":W!=null&&(typeof W!="function"&&Yc(k,W),Dr("scrollend",P));break;case"dangerouslySetInnerHTML":if(W!=null){if(typeof W!="object"||!("__html"in W))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");if(k=W.__html,k!=null){if(Z.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");P.innerHTML=k}}break;case"multiple":P.multiple=W&&typeof W!="function"&&typeof W!="symbol";break;case"muted":P.muted=W&&typeof W!="function"&&typeof W!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(W==null||typeof W=="function"||typeof W=="boolean"||typeof W=="symbol"){P.removeAttribute("xlink:href");break}ie(W,k),k=Ad(""+W),P.setAttributeNS(DC,"xlink:href",k);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":W!=null&&typeof W!="function"&&typeof W!="symbol"?(ie(W,k),P.setAttribute(k,""+W)):P.removeAttribute(k);break;case"inert":W!==""||Iq[k]||(Iq[k]=!0,console.error("Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",k));case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":W&&typeof W!="function"&&typeof W!="symbol"?P.setAttribute(k,""):P.removeAttribute(k);break;case"capture":case"download":W===!0?P.setAttribute(k,""):W!==!1&&W!=null&&typeof W!="function"&&typeof W!="symbol"?(ie(W,k),P.setAttribute(k,W)):P.removeAttribute(k);break;case"cols":case"rows":case"size":case"span":W!=null&&typeof W!="function"&&typeof W!="symbol"&&!isNaN(W)&&1<=W?(ie(W,k),P.setAttribute(k,W)):P.removeAttribute(k);break;case"rowSpan":case"start":W==null||typeof W=="function"||typeof W=="symbol"||isNaN(W)?P.removeAttribute(k):(ie(W,k),P.setAttribute(k,W));break;case"popover":Dr("beforetoggle",P),Dr("toggle",P),$n(P,"popover",W);break;case"xlinkActuate":en(P,DC,"xlink:actuate",W);break;case"xlinkArcrole":en(P,DC,"xlink:arcrole",W);break;case"xlinkRole":en(P,DC,"xlink:role",W);break;case"xlinkShow":en(P,DC,"xlink:show",W);break;case"xlinkTitle":en(P,DC,"xlink:title",W);break;case"xlinkType":en(P,DC,"xlink:type",W);break;case"xmlBase":en(P,C4e,"xml:base",W);break;case"xmlLang":en(P,C4e,"xml:lang",W);break;case"xmlSpace":en(P,C4e,"xml:space",W);break;case"is":le!=null&&console.error('Cannot update the "is" prop after it has been initialized.'),$n(P,"is",W);break;case"innerText":case"textContent":break;case"popoverTarget":c1t||W==null||typeof W!="object"||(c1t=!0,console.error("The `popoverTarget` prop expects the ID of an Element as a string. Received %s instead.",W));default:!(2<k.length)||k[0]!=="o"&&k[0]!=="O"||k[1]!=="n"&&k[1]!=="N"?(k=ku(k),$n(P,k,W)):Vm.hasOwnProperty(k)&&W!=null&&typeof W!="function"&&Yc(k,W)}}function ud(P,C,k,W,Z,le){switch(k){case"style":W_(P,W,le);break;case"dangerouslySetInnerHTML":if(W!=null){if(typeof W!="object"||!("__html"in W))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");if(k=W.__html,k!=null){if(Z.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");P.innerHTML=k}}break;case"children":typeof W=="string"?m_(P,W):(typeof W=="number"||typeof W=="bigint")&&m_(P,""+W);break;case"onScroll":W!=null&&(typeof W!="function"&&Yc(k,W),Dr("scroll",P));break;case"onScrollEnd":W!=null&&(typeof W!="function"&&Yc(k,W),Dr("scrollend",P));break;case"onClick":W!=null&&(typeof W!="function"&&Yc(k,W),P.onclick=ld);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(Vm.hasOwnProperty(k))W!=null&&typeof W!="function"&&Yc(k,W);else e:{if(k[0]==="o"&&k[1]==="n"&&(Z=k.endsWith("Capture"),C=k.slice(2,Z?k.length-7:void 0),le=P[Ja]||null,le=le!=null?le[k]:null,typeof le=="function"&&P.removeEventListener(C,le,Z),typeof W=="function")){typeof le!="function"&&le!==null&&(k in P?P[k]=null:P.hasAttribute(k)&&P.removeAttribute(k)),P.addEventListener(C,W,Z);break e}k in P?P[k]=W:W===!0?P.setAttribute(k,""):$n(P,k,W)}}}function Lc(P,C,k){switch(Ei(C,k),C){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Dr("error",P),Dr("load",P);var W=!1,Z=!1,le;for(le in k)if(k.hasOwnProperty(le)){var Le=k[le];if(Le!=null)switch(le){case"src":W=!0;break;case"srcSet":Z=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(C+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:Rs(P,C,le,Le,k,null)}}Z&&Rs(P,C,"srcSet",k.srcSet,k,null),W&&Rs(P,C,"src",k.src,k,null);return;case"input":kt("input",k),Dr("invalid",P);var qe=le=Le=Z=null,dt=null,yt=null;for(W in k)if(k.hasOwnProperty(W)){var mn=k[W];if(mn!=null)switch(W){case"name":Z=mn;break;case"type":Le=mn;break;case"checked":dt=mn;break;case"defaultChecked":yt=mn;break;case"value":le=mn;break;case"defaultValue":qe=mn;break;case"children":case"dangerouslySetInnerHTML":if(mn!=null)throw Error(C+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:Rs(P,C,W,mn,k,null)}}In(P,k),ao(P,le,qe,dt,yt,Le,Z,!1),Jt(P);return;case"select":kt("select",k),Dr("invalid",P),W=Le=le=null;for(Z in k)if(k.hasOwnProperty(Z)&&(qe=k[Z],qe!=null))switch(Z){case"value":le=qe;break;case"defaultValue":Le=qe;break;case"multiple":W=qe;default:Rs(P,C,Z,qe,k,null)}Jo(P,k),C=le,k=Le,P.multiple=!!W,C!=null?Eo(P,!!W,C,!1):k!=null&&Eo(P,!!W,k,!0);return;case"textarea":kt("textarea",k),Dr("invalid",P),le=Z=W=null;for(Le in k)if(k.hasOwnProperty(Le)&&(qe=k[Le],qe!=null))switch(Le){case"value":W=qe;break;case"defaultValue":Z=qe;break;case"children":le=qe;break;case"dangerouslySetInnerHTML":if(qe!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:Rs(P,C,Le,qe,k,null)}vr(P,k),Vo(P,W,Z,le),Jt(P);return;case"option":Go(P,k);for(dt in k)k.hasOwnProperty(dt)&&(W=k[dt],W!=null)&&(dt==="selected"?P.selected=W&&typeof W!="function"&&typeof W!="symbol":Rs(P,C,dt,W,k,null));return;case"dialog":Dr("beforetoggle",P),Dr("toggle",P),Dr("cancel",P),Dr("close",P);break;case"iframe":case"object":Dr("load",P);break;case"video":case"audio":for(W=0;W<eL.length;W++)Dr(eL[W],P);break;case"image":Dr("error",P),Dr("load",P);break;case"details":Dr("toggle",P);break;case"embed":case"source":case"link":Dr("error",P),Dr("load",P);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(yt in k)if(k.hasOwnProperty(yt)&&(W=k[yt],W!=null))switch(yt){case"children":case"dangerouslySetInnerHTML":throw Error(C+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:Rs(P,C,yt,W,k,null)}return;default:if(p_(C)){for(mn in k)k.hasOwnProperty(mn)&&(W=k[mn],W!==void 0&&ud(P,C,mn,W,k,void 0));return}}for(qe in k)k.hasOwnProperty(qe)&&(W=k[qe],W!=null&&Rs(P,C,qe,W,k,null))}function ky(P,C,k,W){switch(Ei(C,W),C){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var Z=null,le=null,Le=null,qe=null,dt=null,yt=null,mn=null;for(Dn in k){var vn=k[Dn];if(k.hasOwnProperty(Dn)&&vn!=null)switch(Dn){case"checked":break;case"value":break;case"defaultValue":dt=vn;default:W.hasOwnProperty(Dn)||Rs(P,C,Dn,null,W,vn)}}for(var _n in W){var Dn=W[_n];if(vn=k[_n],W.hasOwnProperty(_n)&&(Dn!=null||vn!=null))switch(_n){case"type":le=Dn;break;case"name":Z=Dn;break;case"checked":yt=Dn;break;case"defaultChecked":mn=Dn;break;case"value":Le=Dn;break;case"defaultValue":qe=Dn;break;case"children":case"dangerouslySetInnerHTML":if(Dn!=null)throw Error(C+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:Dn!==vn&&Rs(P,C,_n,Dn,W,vn)}}C=k.type==="checkbox"||k.type==="radio"?k.checked!=null:k.value!=null,W=W.type==="checkbox"||W.type==="radio"?W.checked!=null:W.value!=null,C||!W||s1t||(console.error("A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/link/controlled-components"),s1t=!0),!C||W||i1t||(console.error("A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/link/controlled-components"),i1t=!0),Qn(P,Le,qe,dt,yt,mn,le,Z);return;case"select":Dn=Le=qe=_n=null;for(le in k)if(dt=k[le],k.hasOwnProperty(le)&&dt!=null)switch(le){case"value":break;case"multiple":Dn=dt;default:W.hasOwnProperty(le)||Rs(P,C,le,null,W,dt)}for(Z in W)if(le=W[Z],dt=k[Z],W.hasOwnProperty(Z)&&(le!=null||dt!=null))switch(Z){case"value":_n=le;break;case"defaultValue":qe=le;break;case"multiple":Le=le;default:le!==dt&&Rs(P,C,Z,le,W,dt)}W=qe,C=Le,k=Dn,_n!=null?Eo(P,!!C,_n,!1):!!k!=!!C&&(W!=null?Eo(P,!!C,W,!0):Eo(P,!!C,C?[]:"",!1));return;case"textarea":Dn=_n=null;for(qe in k)if(Z=k[qe],k.hasOwnProperty(qe)&&Z!=null&&!W.hasOwnProperty(qe))switch(qe){case"value":break;case"children":break;default:Rs(P,C,qe,null,W,Z)}for(Le in W)if(Z=W[Le],le=k[Le],W.hasOwnProperty(Le)&&(Z!=null||le!=null))switch(Le){case"value":_n=Z;break;case"defaultValue":Dn=Z;break;case"children":break;case"dangerouslySetInnerHTML":if(Z!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:Z!==le&&Rs(P,C,Le,Z,W,le)}xi(P,_n,Dn);return;case"option":for(var dr in k)_n=k[dr],k.hasOwnProperty(dr)&&_n!=null&&!W.hasOwnProperty(dr)&&(dr==="selected"?P.selected=!1:Rs(P,C,dr,null,W,_n));for(dt in W)_n=W[dt],Dn=k[dt],W.hasOwnProperty(dt)&&_n!==Dn&&(_n!=null||Dn!=null)&&(dt==="selected"?P.selected=_n&&typeof _n!="function"&&typeof _n!="symbol":Rs(P,C,dt,_n,W,Dn));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ni in k)_n=k[Ni],k.hasOwnProperty(Ni)&&_n!=null&&!W.hasOwnProperty(Ni)&&Rs(P,C,Ni,null,W,_n);for(yt in W)if(_n=W[yt],Dn=k[yt],W.hasOwnProperty(yt)&&_n!==Dn&&(_n!=null||Dn!=null))switch(yt){case"children":case"dangerouslySetInnerHTML":if(_n!=null)throw Error(C+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:Rs(P,C,yt,_n,W,Dn)}return;default:if(p_(C)){for(var y0 in k)_n=k[y0],k.hasOwnProperty(y0)&&_n!==void 0&&!W.hasOwnProperty(y0)&&ud(P,C,y0,void 0,W,_n);for(mn in W)_n=W[mn],Dn=k[mn],!W.hasOwnProperty(mn)||_n===Dn||_n===void 0&&Dn===void 0||ud(P,C,mn,_n,W,Dn);return}}for(var ma in k)_n=k[ma],k.hasOwnProperty(ma)&&_n!=null&&!W.hasOwnProperty(ma)&&Rs(P,C,ma,null,W,_n);for(vn in W)_n=W[vn],Dn=k[vn],!W.hasOwnProperty(vn)||_n===Dn||_n==null&&Dn==null||Rs(P,C,vn,_n,W,Dn)}function Of(P){switch(P){case"class":return"className";case"for":return"htmlFor";default:return P}}function Yu(P){var C={};P=P.style;for(var k=0;k<P.length;k++){var W=P[k];C[W]=P.getPropertyValue(W)}return C}function Ep(P,C,k){if(C!=null&&typeof C!="object")console.error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");else{var W,Z=W="",le;for(le in C)if(C.hasOwnProperty(le)){var Le=C[le];Le!=null&&typeof Le!="boolean"&&Le!==""&&(le.indexOf("--")===0?(ae(Le,le),W+=Z+le+":"+(""+Le).trim()):typeof Le!="number"||Le===0||na.has(le)?(ae(Le,le),W+=Z+le.replace(Hn,"-$1").toLowerCase().replace(eo,"-ms-")+":"+(""+Le).trim()):W+=Z+le.replace(Hn,"-$1").toLowerCase().replace(eo,"-ms-")+":"+Le+"px",Z=";")}W=W||null,C=P.getAttribute("style"),C!==W&&(W=qc(W),qc(C)!==W&&(k.style=Yu(P)))}}function yl(P,C,k,W,Z,le){if(Z.delete(k),P=P.getAttribute(k),P===null)switch(typeof W){case"undefined":case"function":case"symbol":case"boolean":return}else if(W!=null)switch(typeof W){case"function":case"symbol":case"boolean":break;default:if(ie(W,C),P===""+W)return}ai(C,P,W,le)}function Y5(P,C,k,W,Z,le){if(Z.delete(k),P=P.getAttribute(k),P===null){switch(typeof W){case"function":case"symbol":return}if(!W)return}else switch(typeof W){case"function":case"symbol":break;default:if(W)return}ai(C,P,W,le)}function _d(P,C,k,W,Z,le){if(Z.delete(k),P=P.getAttribute(k),P===null)switch(typeof W){case"undefined":case"function":case"symbol":return}else if(W!=null)switch(typeof W){case"function":case"symbol":break;default:if(ie(W,k),P===""+W)return}ai(C,P,W,le)}function Im(P,C,k,W,Z,le){if(Z.delete(k),P=P.getAttribute(k),P===null)switch(typeof W){case"undefined":case"function":case"symbol":case"boolean":return;default:if(isNaN(W))return}else if(W!=null)switch(typeof W){case"function":case"symbol":case"boolean":break;default:if(!isNaN(W)&&(ie(W,C),P===""+W))return}ai(C,P,W,le)}function zr(P,C,k,W,Z,le){if(Z.delete(k),P=P.getAttribute(k),P===null)switch(typeof W){case"undefined":case"function":case"symbol":case"boolean":return}else if(W!=null)switch(typeof W){case"function":case"symbol":case"boolean":break;default:if(ie(W,C),k=Ad(""+W),P===k)return}ai(C,P,W,le)}function da(P,C,k,W){for(var Z={},le=new Set,Le=P.attributes,qe=0;qe<Le.length;qe++)switch(Le[qe].name.toLowerCase()){case"value":break;case"checked":break;case"selected":break;default:le.add(Le[qe].name)}if(p_(C)){for(var dt in k)if(k.hasOwnProperty(dt)){var yt=k[dt];if(yt!=null){if(Vm.hasOwnProperty(dt))typeof yt!="function"&&Yc(dt,yt);else if(k.suppressHydrationWarning!==!0)switch(dt){case"children":typeof yt!="string"&&typeof yt!="number"||ai("children",P.textContent,yt,Z);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":Le=P.innerHTML,yt=yt?yt.__html:void 0,yt!=null&&(yt=Vh(P,yt),ai(dt,Le,yt,Z));continue;case"style":le.delete(dt),Ep(P,yt,Z);continue;case"offsetParent":case"offsetTop":case"offsetLeft":case"offsetWidth":case"offsetHeight":case"isContentEditable":case"outerText":case"outerHTML":le.delete(dt.toLowerCase()),console.error("Assignment to read-only property will result in a no-op: `%s`",dt);continue;case"className":le.delete("class"),Le=nn(P,"class",yt),ai("className",Le,yt,Z);continue;default:W.context===Sb&&C!=="svg"&&C!=="math"?le.delete(dt.toLowerCase()):le.delete(dt),Le=nn(P,dt,yt),ai(dt,Le,yt,Z)}}}}else for(yt in k)if(k.hasOwnProperty(yt)&&(dt=k[yt],dt!=null)){if(Vm.hasOwnProperty(yt))typeof dt!="function"&&Yc(yt,dt);else if(k.suppressHydrationWarning!==!0)switch(yt){case"children":typeof dt!="string"&&typeof dt!="number"||ai("children",P.textContent,dt,Z);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"value":case"checked":case"selected":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":Le=P.innerHTML,dt=dt?dt.__html:void 0,dt!=null&&(dt=Vh(P,dt),Le!==dt&&(Z[yt]={__html:Le}));continue;case"className":yl(P,yt,"class",dt,le,Z);continue;case"tabIndex":yl(P,yt,"tabindex",dt,le,Z);continue;case"style":le.delete(yt),Ep(P,dt,Z);continue;case"multiple":le.delete(yt),ai(yt,P.multiple,dt,Z);continue;case"muted":le.delete(yt),ai(yt,P.muted,dt,Z);continue;case"autoFocus":le.delete("autofocus"),ai(yt,P.autofocus,dt,Z);continue;case"data":if(C!=="object"){le.delete(yt),Le=P.getAttribute("data"),ai(yt,Le,dt,Z);continue}case"src":case"href":if(!(dt!==""||C==="a"&&yt==="href"||C==="object"&&yt==="data")){console.error(yt==="src"?'An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.':'An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',yt,yt);continue}zr(P,yt,yt,dt,le,Z);continue;case"action":case"formAction":if(Le=P.getAttribute(yt),typeof dt=="function"){le.delete(yt.toLowerCase()),yt==="formAction"?(le.delete("name"),le.delete("formenctype"),le.delete("formmethod"),le.delete("formtarget")):(le.delete("enctype"),le.delete("method"),le.delete("target"));continue}else if(Le===Tro){le.delete(yt.toLowerCase()),ai(yt,"function",dt,Z);continue}zr(P,yt,yt.toLowerCase(),dt,le,Z);continue;case"xlinkHref":zr(P,yt,"xlink:href",dt,le,Z);continue;case"contentEditable":_d(P,yt,"contenteditable",dt,le,Z);continue;case"spellCheck":_d(P,yt,"spellcheck",dt,le,Z);continue;case"draggable":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":_d(P,yt,yt,dt,le,Z);continue;case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":Y5(P,yt,yt.toLowerCase(),dt,le,Z);continue;case"capture":case"download":e:{qe=P;var mn=Le=yt,vn=Z;if(le.delete(mn),qe=qe.getAttribute(mn),qe===null)switch(typeof dt){case"undefined":case"function":case"symbol":break e;default:if(dt===!1)break e}else if(dt!=null)switch(typeof dt){case"function":case"symbol":break;case"boolean":if(dt===!0&&qe==="")break e;break;default:if(ie(dt,Le),qe===""+dt)break e}ai(Le,qe,dt,vn)}continue;case"cols":case"rows":case"size":case"span":e:{if(qe=P,mn=Le=yt,vn=Z,le.delete(mn),qe=qe.getAttribute(mn),qe===null)switch(typeof dt){case"undefined":case"function":case"symbol":case"boolean":break e;default:if(isNaN(dt)||1>dt)break e}else if(dt!=null)switch(typeof dt){case"function":case"symbol":case"boolean":break;default:if(!(isNaN(dt)||1>dt)&&(ie(dt,Le),qe===""+dt))break e}ai(Le,qe,dt,vn)}continue;case"rowSpan":Im(P,yt,"rowspan",dt,le,Z);continue;case"start":Im(P,yt,yt,dt,le,Z);continue;case"xHeight":yl(P,yt,"x-height",dt,le,Z);continue;case"xlinkActuate":yl(P,yt,"xlink:actuate",dt,le,Z);continue;case"xlinkArcrole":yl(P,yt,"xlink:arcrole",dt,le,Z);continue;case"xlinkRole":yl(P,yt,"xlink:role",dt,le,Z);continue;case"xlinkShow":yl(P,yt,"xlink:show",dt,le,Z);continue;case"xlinkTitle":yl(P,yt,"xlink:title",dt,le,Z);continue;case"xlinkType":yl(P,yt,"xlink:type",dt,le,Z);continue;case"xmlBase":yl(P,yt,"xml:base",dt,le,Z);continue;case"xmlLang":yl(P,yt,"xml:lang",dt,le,Z);continue;case"xmlSpace":yl(P,yt,"xml:space",dt,le,Z);continue;case"inert":dt!==""||Iq[yt]||(Iq[yt]=!0,console.error("Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",yt)),Y5(P,yt,yt,dt,le,Z);continue;default:if(!(2<yt.length)||yt[0]!=="o"&&yt[0]!=="O"||yt[1]!=="n"&&yt[1]!=="N"){qe=ku(yt),Le=!1,W.context===Sb&&C!=="svg"&&C!=="math"?le.delete(qe.toLowerCase()):(mn=yt.toLowerCase(),mn=Fp.hasOwnProperty(mn)&&Fp[mn]||null,mn!==null&&mn!==yt&&(Le=!0,le.delete(mn)),le.delete(qe));e:if(mn=P,vn=qe,qe=dt,Bt(vn))if(mn.hasAttribute(vn))mn=mn.getAttribute(vn),ie(qe,vn),qe=mn===""+qe?qe:mn;else{switch(typeof qe){case"function":case"symbol":break e;case"boolean":if(mn=vn.toLowerCase().slice(0,5),mn!=="data-"&&mn!=="aria-")break e}qe=qe===void 0?void 0:null}else qe=void 0;Le||ai(yt,qe,dt,Z)}}}return 0<le.size&&k.suppressHydrationWarning!==!0&&Kd(P,le,Z),Object.keys(Z).length===0?null:Z}function Ui(P,C){switch(P.length){case 0:return"";case 1:return P[0];case 2:return P[0]+" "+C+" "+P[1];default:return P.slice(0,-1).join(", ")+", "+C+" "+P[P.length-1]}}function Ji(P){return P.nodeType===9?P:P.ownerDocument}function Yr(P){switch(P){case Gh:return AD;case xd:return Fq;default:return Sb}}function qu(P,C){if(P===Sb)switch(C){case"svg":return AD;case"math":return Fq;default:return Sb}return P===AD&&C==="foreignObject"?Sb:P}function V0(P,C){return P==="textarea"||P==="noscript"||typeof C.children=="string"||typeof C.children=="number"||typeof C.children=="bigint"||typeof C.dangerouslySetInnerHTML=="object"&&C.dangerouslySetInnerHTML!==null&&C.dangerouslySetInnerHTML.__html!=null}function Na(){var P=window.event;return P&&P.type==="popstate"?P===E4e?!1:(E4e=P,!0):(E4e=null,!1)}function lg(P){setTimeout(function(){throw P})}function Lm(P,C,k){switch(C){case"button":case"input":case"select":case"textarea":k.autoFocus&&P.focus();break;case"img":k.src?P.src=k.src:k.srcSet&&(P.srcset=k.srcSet)}}function Bi(P,C,k,W){ky(P,C,k,W),P[Ja]=W}function Ca(P){m_(P,"")}function zl(P,C,k){P.nodeValue=k}function ea(P){return P==="head"}function m0(P,C){P.removeChild(C)}function Ff(P,C){(P.nodeType===9?P.body:P.nodeName==="HTML"?P.ownerDocument.body:P).removeChild(C)}function Dp(P,C){var k=C,W=0,Z=0;do{var le=k.nextSibling;if(P.removeChild(k),le&&le.nodeType===8)if(k=le.data,k===Oq){if(0<W&&8>W){k=W;var Le=P.ownerDocument;if(k&Ero&&Vl(Le.documentElement),k&Dro&&Vl(Le.body),k&Aro)for(k=Le.head,Vl(k),Le=k.firstChild;Le;){var qe=Le.nextSibling,dt=Le.nodeName;Le[sx]||dt==="SCRIPT"||dt==="STYLE"||dt==="LINK"&&Le.rel.toLowerCase()==="stylesheet"||k.removeChild(Le),Le=qe}}if(Z===0){P.removeChild(le),_g(C);return}Z--}else k===Lq||k===vb||k===tL?Z++:W=k.charCodeAt(0)-48;else W=0;k=le}while(k);_g(C)}function $0(P){P=P.style,typeof P.setProperty=="function"?P.setProperty("display","none","important"):P.display="none"}function ex(P){P.nodeValue=""}function tx(P,C){C=C[Rro],C=C!=null&&C.hasOwnProperty("display")?C.display:null,P.style.display=C==null||typeof C=="boolean"?"":(""+C).trim()}function B1(P,C){P.nodeValue=C}function Om(P){var C=P.firstChild;for(C&&C.nodeType===10&&(C=C.nextSibling);C;){var k=C;switch(C=C.nextSibling,k.nodeName){case"HTML":case"HEAD":case"BODY":Om(k),Ot(k);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(k.rel.toLowerCase()==="stylesheet")continue}P.removeChild(k)}}function Bf(P,C,k,W){for(;P.nodeType===1;){var Z=k;if(P.nodeName.toLowerCase()!==C.toLowerCase()){if(!W&&(P.nodeName!=="INPUT"||P.type!=="hidden"))break}else if(W){if(!P[sx])switch(C){case"meta":if(!P.hasAttribute("itemprop"))break;return P;case"link":if(le=P.getAttribute("rel"),le==="stylesheet"&&P.hasAttribute("data-precedence"))break;if(le!==Z.rel||P.getAttribute("href")!==(Z.href==null||Z.href===""?null:Z.href)||P.getAttribute("crossorigin")!==(Z.crossOrigin==null?null:Z.crossOrigin)||P.getAttribute("title")!==(Z.title==null?null:Z.title))break;return P;case"style":if(P.hasAttribute("data-precedence"))break;return P;case"script":if(le=P.getAttribute("src"),(le!==(Z.src==null?null:Z.src)||P.getAttribute("type")!==(Z.type==null?null:Z.type)||P.getAttribute("crossorigin")!==(Z.crossOrigin==null?null:Z.crossOrigin))&&le&&P.hasAttribute("async")&&!P.hasAttribute("itemprop"))break;return P;default:return P}}else if(C==="input"&&P.type==="hidden"){ie(Z.name,"name");var le=Z.name==null?null:""+Z.name;if(Z.type==="hidden"&&P.getAttribute("name")===le)return P}else return P;if(P=Cr(P.nextSibling),P===null)break}return null}function Rr(P,C,k){if(C==="")return null;for(;P.nodeType!==3;)if((P.nodeType!==1||P.nodeName!=="INPUT"||P.type!=="hidden")&&!k||(P=Cr(P.nextSibling),P===null))return null;return P}function cs(P){return P.data===tL||P.data===vb&&P.ownerDocument.readyState===u1t}function oi(P,C){var k=P.ownerDocument;if(P.data!==vb||k.readyState===u1t)C();else{var W=function(){C(),k.removeEventListener("DOMContentLoaded",W)};k.addEventListener("DOMContentLoaded",W),P._reactRetry=W}}function Cr(P){for(;P!=null;P=P.nextSibling){var C=P.nodeType;if(C===1||C===3)break;if(C===8){if(C=P.data,C===Lq||C===tL||C===vb||C===M4e||C===l1t)break;if(C===Oq)return null}}return P}function wr(P){if(P.nodeType===1){for(var C=P.nodeName.toLowerCase(),k={},W=P.attributes,Z=0;Z<W.length;Z++){var le=W[Z];k[Of(le.name)]=le.name.toLowerCase()==="style"?Yu(P):le.value}return{type:C,props:k}}return P.nodeType===8?{type:"Suspense",props:{}}:P.nodeValue}function vc(P,C,k){return k===null||k[wro]!==!0?(P.nodeValue===C?P=null:(C=qc(C),P=qc(P.nodeValue)===C?null:P.nodeValue),P):null}function Ap(P){P=P.nextSibling;for(var C=0;P;){if(P.nodeType===8){var k=P.data;if(k===Oq){if(C===0)return Cr(P.nextSibling);C--}else k!==Lq&&k!==tL&&k!==vb||C++}P=P.nextSibling}return null}function Ju(P){P=P.previousSibling;for(var C=0;P;){if(P.nodeType===8){var k=P.data;if(k===Lq||k===tL||k===vb){if(C===0)return P;C--}else k===Oq&&C++}P=P.previousSibling}return null}function zf(P){_g(P)}function Ha(P){_g(P)}function Ia(P,C,k,W,Z){switch(Z&&lf(P,W.ancestorInfo),C=Ji(k),P){case"html":if(P=C.documentElement,!P)throw Error("React expected an <html> element (document.documentElement) to exist in the Document but one was not found. React never removes the documentElement for any Document it renders into so the cause is likely in some other script running on this page.");return P;case"head":if(P=C.head,!P)throw Error("React expected a <head> element (document.head) to exist in the Document but one was not found. React never removes the head for any Document it renders into so the cause is likely in some other script running on this page.");return P;case"body":if(P=C.body,!P)throw Error("React expected a <body> element (document.body) to exist in the Document but one was not found. React never removes the body for any Document it renders into so the cause is likely in some other script running on this page.");return P;default:throw Error("resolveSingletonInstance was called with an element type that is not supported. This is a bug in React.")}}function Ya(P,C,k,W){if(!k[Kc]&&Wt(k)){var Z=k.tagName.toLowerCase();console.error("You are mounting a new %s component when a previous one has not first unmounted. It is an error to render more than one %s component at a time and attributes and children of these components will likely fail in unpredictable ways. Please only render a single instance of <%s> and if you need to mount a new one, ensure any previous ones have unmounted first.",Z,Z,Z)}switch(P){case"html":case"head":case"body":break;default:console.error("acquireSingletonInstance was called with an element type that is not supported. This is a bug in React.")}for(Z=k.attributes;Z.length;)k.removeAttributeNode(Z[0]);Lc(k,P,C),k[cc]=W,k[Ja]=C}function Vl(P){for(var C=P.attributes;C.length;)P.removeAttributeNode(C[0]);Ot(P)}function dd(P){return typeof P.getRootNode=="function"?P.getRootNode():P.nodeType===9?P:P.ownerDocument}function La(P,C,k){var W=RD;if(W&&typeof C=="string"&&C){var Z=Vn(C);Z='link[rel="'+P+'"][href="'+Z+'"]',typeof k=="string"&&(Z+='[crossorigin="'+k+'"]'),f1t.has(Z)||(f1t.add(Z),P={rel:P,crossOrigin:k,href:C},W.querySelector(Z)===null&&(C=W.createElement("link"),Lc(C,"link",P),tt(C),W.head.appendChild(C)))}}function hd(P,C,k,W){var Z=(Z=fd.current)?dd(Z):null;if(!Z)throw Error('"resourceRoot" was expected to exist. This is a bug in React.');switch(P){case"meta":case"title":return null;case"style":return typeof k.precedence=="string"&&typeof k.href=="string"?(k=ac(k.href),C=ge(Z).hoistableStyles,W=C.get(k),W||(W={type:"style",instance:null,count:0,state:null},C.set(k,W)),W):{type:"void",instance:null,count:0,state:null};case"link":if(k.rel==="stylesheet"&&typeof k.href=="string"&&typeof k.precedence=="string"){P=ac(k.href);var le=ge(Z).hoistableStyles,Le=le.get(P);if(!Le&&(Z=Z.ownerDocument||Z,Le={type:"stylesheet",instance:null,count:0,state:{loading:RC,preload:null}},le.set(P,Le),(le=Z.querySelector(Ku(P)))&&!le._p&&(Le.instance=le,Le.state.loading=nL|n4),!o4.has(P))){var qe={rel:"preload",as:"style",href:k.href,crossOrigin:k.crossOrigin,integrity:k.integrity,media:k.media,hrefLang:k.hrefLang,referrerPolicy:k.referrerPolicy};o4.set(P,qe),le||ug(Z,P,qe,Le.state)}if(C&&W===null)throw k=`
|
|
184
|
+
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`,A(P))})}function d0(P){P!==DD&&P.next===null&&(DD===null?Dq=DD=P:DD=DD.next=P),Aq=!0,an.actQueue!==null?b4e||(b4e=!0,Mo()):y4e||(y4e=!0,Mo())}function qd(P,C){if(!P4e&&Aq){P4e=!0;do for(var k=!1,W=Dq;W!==null;){if(P!==0){var Z=W.pendingLanes;if(Z===0)var le=0;else{var Le=W.suspendedLanes,qe=W.pingedLanes;le=(1<<31-Jc(42|P)+1)-1,le&=Z&~(Le&~qe),le=le&201326741?le&201326741|1:le?le|2:0}le!==0&&(k=!0,Lf(W,le))}else le=oa,le=Ne(W,W===g0?le:0,W.cancelPendingCommit!==null||W.timeoutHandle!==AC),(le&3)===0||Ve(W,le)||(k=!0,Lf(W,le));W=W.next}while(k);P4e=!1}}function If(){F1()}function F1(){Aq=b4e=y4e=!1;var P=0;EC!==0&&(Na()&&(P=EC),EC=0);for(var C=Uh(),k=null,W=Dq;W!==null;){var Z=W.next,le=Jd(W,C);le===0?(W.next=null,k===null?Dq=Z:k.next=Z,Z===null&&(DD=k)):(k=W,(P!==0||(le&3)!==0)&&(Aq=!0)),W=Z}qd(P)}function Jd(P,C){for(var k=P.suspendedLanes,W=P.pingedLanes,Z=P.expirationTimes,le=P.pendingLanes&-62914561;0<le;){var Le=31-Jc(le),qe=1<<Le,dt=Z[Le];dt===-1?((qe&k)===0||(qe&W)!==0)&&(Z[Le]=Re(qe,C)):dt<=C&&(P.expiredLanes|=qe),le&=~qe}if(C=g0,k=oa,k=Ne(P,P===C?k:0,P.cancelPendingCommit!==null||P.timeoutHandle!==AC),W=P.callbackNode,k===0||P===C&&(Qc===SC||Qc===CC)||P.cancelPendingCommit!==null)return W!==null&&Dy(W),P.callbackNode=null,P.callbackPriority=0;if((k&3)===0||Ve(P,k)){if(C=k&-k,C!==P.callbackPriority||an.actQueue!==null&&W!==v4e)Dy(W);else return C;switch(Ct(k)){case U0:case N_:k=Lp;break;case Xh:k=pg;break;case xg:k=j4;break;default:k=pg}return W=Ra.bind(null,P),an.actQueue!==null?(an.actQueue.push(W),k=v4e):k=mg(k,W),P.callbackPriority=C,P.callbackNode=k,C}return W!==null&&Dy(W),P.callbackPriority=2,P.callbackNode=null,2}function Ra(P,C){if(bC=yC=!1,Qf!==TC&&Qf!==m4e)return P.callbackNode=null,P.callbackPriority=0,null;var k=P.callbackNode;if(os()&&P.callbackNode!==k)return null;var W=oa;return W=Ne(P,P===g0?W:0,P.cancelPendingCommit!==null||P.timeoutHandle!==AC),W===0?null:(Ar(P,W,C),Jd(P,Uh()),P.callbackNode!=null&&P.callbackNode===k?Ra.bind(null,P):null)}function Lf(P,C){if(os())return null;yC=bC,bC=!1,Ar(P,C,!0)}function Dy(P){P!==v4e&&P!==null&&q5(P)}function Mo(){an.actQueue!==null&&an.actQueue.push(function(){return F1(),null}),Hro(function(){(Fc&(px|o6))!==Wy?mg(j1,If):F1()})}function Ay(){return EC===0&&(EC=Pe()),EC}function Nm(P){return P==null||typeof P=="symbol"||typeof P=="boolean"?null:typeof P=="function"?P:(ie(P,"action"),Ad(""+P))}function Mp(P,C){var k=C.ownerDocument.createElement("input");return k.name=C.name,k.value=C.value,P.id&&k.setAttribute("form",P.id),C.parentNode.insertBefore(k,C),P=new FormData(P),k.parentNode.removeChild(k),P}function ka(P,C,k,W,Z){if(C==="submit"&&k&&k.stateNode===Z){var le=Nm((Z[Ja]||null).action),Le=W.submitter;Le&&(C=(C=Le[Ja]||null)?Nm(C.formAction):Le.getAttribute("formAction"),C!==null&&(le=C,Le=null));var qe=new Zo("action","action",null,W,Z);P.push({event:qe,listeners:[{instance:null,listener:function(){if(W.defaultPrevented){if(EC!==0){var dt=Le?Mp(Z,Le):new FormData(Z),yt={pending:!0,data:dt,method:Z.method,action:le};Object.freeze(yt),E1(k,yt,null,dt)}}else typeof le=="function"&&(qe.preventDefault(),dt=Le?Mp(Z,Le):new FormData(Z),yt={pending:!0,data:dt,method:Z.method,action:le},Object.freeze(yt),E1(k,yt,le,dt))},currentTarget:Z}]})}}function gl(P,C,k){P.currentTarget=k;try{C(P)}catch(W){o4e(W)}P.currentTarget=null}function h0(P,C){C=(C&4)!==0;for(var k=0;k<P.length;k++){var W=P[k];e:{var Z=void 0,le=W.event;if(W=W.listeners,C)for(var Le=W.length-1;0<=Le;Le--){var qe=W[Le],dt=qe.instance,yt=qe.currentTarget;if(qe=qe.listener,dt!==Z&&le.isPropagationStopped())break e;dt!==null?Zt(dt,gl,le,qe,yt):gl(le,qe,yt),Z=dt}else for(Le=0;Le<W.length;Le++){if(qe=W[Le],dt=qe.instance,yt=qe.currentTarget,qe=qe.listener,dt!==Z&&le.isPropagationStopped())break e;dt!==null?Zt(dt,gl,le,qe,yt):gl(le,qe,yt),Z=dt}}}}function Dr(P,C){S4e.has(P)||console.error('Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',P);var k=C[Ul];k===void 0&&(k=C[Ul]=new Set);var W=P+"__bubble";k.has(W)||(cd(C,P,2,!1),k.add(W))}function Tp(P,C,k){S4e.has(P)&&!C&&console.error('Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. This is a bug in React. Please file an issue.',P);var W=0;C&&(W|=4),cd(k,P,W,C)}function Ry(P){if(!P[Rq]){P[Rq]=!0,ab.forEach(function(k){k!=="selectionchange"&&(S4e.has(k)||Tp(k,!1,P),Tp(k,!0,P))});var C=P.nodeType===9?P:P.ownerDocument;C===null||C[Rq]||(C[Rq]=!0,Tp("selectionchange",!1,C))}}function cd(P,C,k,W){switch(dn(C)){case U0:var Z=pd;break;case N_:Z=kp;break;default:Z=p0}k=Z.bind(null,C,k,P),Z=void 0,!Gt||C!=="touchstart"&&C!=="touchmove"&&C!=="wheel"||(Z=!0),W?Z!==void 0?P.addEventListener(C,k,{capture:!0,passive:Z}):P.addEventListener(C,k,!0):Z!==void 0?P.addEventListener(C,k,{passive:Z}):P.addEventListener(C,k,!1)}function vu(P,C,k,W,Z){var le=W;if((C&1)===0&&(C&2)===0&&W!==null)e:for(;;){if(W===null)return;var Le=W.tag;if(Le===3||Le===4){var qe=W.stateNode.containerInfo;if(qe===Z)break;if(Le===4)for(Le=W.return;Le!==null;){var dt=Le.tag;if((dt===3||dt===4)&&Le.stateNode.containerInfo===Z)return;Le=Le.return}for(;qe!==null;){if(Le=Dt(qe),Le===null)return;if(dt=Le.tag,dt===5||dt===6||dt===26||dt===27){W=le=Le;continue e}qe=qe.parentNode}}W=W.return}pm(function(){var yt=le,mn=U_(k),vn=[];e:{var _n=i7.get(P);if(_n!==void 0){var Dn=Zo,dr=P;switch(P){case"keypress":if(Hu(k)===0)break e;case"keydown":case"keyup":Dn=q4;break;case"focusin":dr="focus",Dn=js;break;case"focusout":dr="blur",Dn=js;break;case"beforeblur":case"afterblur":Dn=js;break;case"click":if(k.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Dn=ss;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Dn=Nr;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Dn=Yh;break;case qf:case r7:case N3:Dn=cD;break;case ub:Dn=Kv;break;case"scroll":case"scrollend":Dn=Yt;break;case"wheel":Dn=Q1;break;case"copy":case"cut":case"paste":Dn=uq;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Dn=lD;break;case"toggle":case"beforetoggle":Dn=Qv}var Ni=(C&4)!==0,y0=!Ni&&(P==="scroll"||P==="scrollend"),ma=Ni?_n!==null?_n+"Capture":null:_n;Ni=[];for(var Mt=yt,Et;Mt!==null;){var Ft=Mt;if(Et=Ft.stateNode,Ft=Ft.tag,Ft!==5&&Ft!==26&&Ft!==27||Et===null||ma===null||(Ft=ja(Mt,ma),Ft!=null&&Ni.push(Bl(Mt,Ft,Et))),y0)break;Mt=Mt.return}0<Ni.length&&(_n=new Dn(_n,dr,null,k,mn),vn.push({event:_n,listeners:Ni}))}}if((C&7)===0){e:{if(_n=P==="mouseover"||P==="pointerover",Dn=P==="mouseout"||P==="pointerout",_n&&k!==ue&&(dr=k.relatedTarget||k.fromElement)&&(Dt(dr)||dr[Kc]))break e;if((Dn||_n)&&(_n=mn.window===mn?mn:(_n=mn.ownerDocument)?_n.defaultView||_n.parentWindow:window,Dn?(dr=k.relatedTarget||k.toElement,Dn=yt,dr=dr?Dt(dr):null,dr!==null&&(y0=g(dr),Ni=dr.tag,dr!==y0||Ni!==5&&Ni!==27&&Ni!==6)&&(dr=null)):(Dn=null,dr=yt),Dn!==dr)){if(Ni=ss,Ft="onMouseLeave",ma="onMouseEnter",Mt="mouse",(P==="pointerout"||P==="pointerover")&&(Ni=lD,Ft="onPointerLeave",ma="onPointerEnter",Mt="pointer"),y0=Dn==null?_n:Cn(Dn),Et=dr==null?_n:Cn(dr),_n=new Ni(Ft,Mt+"leave",Dn,k,mn),_n.target=y0,_n.relatedTarget=Et,Ft=null,Dt(mn)===yt&&(Ni=new Ni(ma,Mt+"enter",dr,k,mn),Ni.target=Et,Ni.relatedTarget=y0,Ft=Ni),y0=Ft,Dn&&dr)t:{for(Ni=Dn,ma=dr,Mt=0,Et=Ni;Et;Et=_a(Et))Mt++;for(Et=0,Ft=ma;Ft;Ft=_a(Ft))Et++;for(;0<Mt-Et;)Ni=_a(Ni),Mt--;for(;0<Et-Mt;)ma=_a(ma),Et--;for(;Mt--;){if(Ni===ma||ma!==null&&Ni===ma.alternate)break t;Ni=_a(Ni),ma=_a(ma)}Ni=null}else Ni=null;Dn!==null&&wi(vn,_n,Dn,Ni,!1),dr!==null&&y0!==null&&wi(vn,y0,dr,Ni,!0)}}e:{if(_n=yt?Cn(yt):window,Dn=_n.nodeName&&_n.nodeName.toLowerCase(),Dn==="select"||Dn==="input"&&_n.type==="file")var Rn=dl;else if(j_(_n))if(t7)Rn=Fo;else{Rn=Sh;var Po=up}else Dn=_n.nodeName,!Dn||Dn.toLowerCase()!=="input"||_n.type!=="checkbox"&&_n.type!=="radio"?yt&&p_(yt.elementType)&&(Rn=dl):Rn=y1;if(Rn&&(Rn=Rn(P,yt))){fm(vn,Rn,k,mn);break e}Po&&Po(P,_n,yt),P==="focusout"&&yt&&_n.type==="number"&&yt.memoizedProps.value!=null&&Bn(_n,"number",_n.value)}switch(Po=yt?Cn(yt):window,P){case"focusin":(j_(Po)||Po.contentEditable==="true")&&(yg=Po,n7=yt,o7=null);break;case"focusout":o7=n7=yg=null;break;case"mousedown":Ws=!0;break;case"contextmenu":case"mouseup":case"dragend":Ws=!1,P2(vn,k,mn);break;case"selectionchange":if(NI)break;case"keydown":case"keyup":P2(vn,k,mn)}var ls;if(Zv)e:{switch(P){case"compositionstart":var hr="onCompositionStart";break e;case"compositionend":hr="onCompositionEnd";break e;case"compositionupdate":hr="onCompositionUpdate";break e}hr=void 0}else yd?oc(P,k)&&(hr="onCompositionEnd"):P==="keydown"&&k.keyCode===_C&&(hr="onCompositionStart");hr&&(dC&&k.locale!=="ko"&&(yd||hr!=="onCompositionStart"?hr==="onCompositionEnd"&&yd&&(ls=Nu()):(kn=mn,tn="value"in kn?kn.value:kn.textContent,yd=!0)),Po=Hm(yt,hr),0<Po.length&&(hr=new lb(hr,P,null,k,mn),vn.push({event:hr,listeners:Po}),ls?hr.data=ls:(ls=Ac(k),ls!==null&&(hr.data=ls)))),(ls=uD?lp(P,k):uu(P,k))&&(hr=Hm(yt,"onBeforeInput"),0<hr.length&&(Po=new dq("onBeforeInput","beforeinput",null,k,mn),vn.push({event:Po,listeners:hr}),Po.data=ls)),ka(vn,P,yt,k,mn)}h0(vn,C)})}function Bl(P,C,k){return{instance:P,listener:C,currentTarget:k}}function Hm(P,C){for(var k=C+"Capture",W=[];P!==null;){var Z=P,le=Z.stateNode;if(Z=Z.tag,Z!==5&&Z!==26&&Z!==27||le===null||(Z=ja(P,k),Z!=null&&W.unshift(Bl(P,Z,le)),Z=ja(P,C),Z!=null&&W.push(Bl(P,Z,le))),P.tag===3)return W;P=P.return}return[]}function _a(P){if(P===null)return null;do P=P.return;while(P&&P.tag!==5&&P.tag!==27);return P||null}function wi(P,C,k,W,Z){for(var le=C._reactName,Le=[];k!==null&&k!==W;){var qe=k,dt=qe.alternate,yt=qe.stateNode;if(qe=qe.tag,dt!==null&&dt===W)break;qe!==5&&qe!==26&&qe!==27||yt===null||(dt=yt,Z?(yt=ja(k,le),yt!=null&&Le.unshift(Bl(k,yt,dt))):Z||(yt=ja(k,le),yt!=null&&Le.push(Bl(k,yt,dt)))),k=k.return}Le.length!==0&&P.push({event:C,listeners:Le})}function Ei(P,C){f_(P,C),P!=="input"&&P!=="textarea"&&P!=="select"||C==null||C.value!==null||K1||(K1=!0,P==="select"&&C.multiple?console.error("`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.",P):console.error("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",P));var k={registrationNameDependencies:Vm,possibleRegistrationNames:ax};p_(P)||typeof C.is=="string"||vh(P,C,k),C.contentEditable&&!C.suppressContentEditableWarning&&C.children!=null&&console.error("A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional.")}function ai(P,C,k,W){C!==k&&(k=qc(k),qc(C)!==k&&(W[P]=C))}function Kd(P,C,k){C.forEach(function(W){k[Of(W)]=W==="style"?Yu(P):P.getAttribute(W)})}function Yc(P,C){C===!1?console.error("Expected `%s` listener to be a function, instead got `false`.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.",P,P,P):console.error("Expected `%s` listener to be a function, instead got a value of `%s` type.",P,typeof C)}function Vh(P,C){return P=P.namespaceURI===xd||P.namespaceURI===Gh?P.ownerDocument.createElementNS(P.namespaceURI,P.tagName):P.ownerDocument.createElement(P.tagName),P.innerHTML=C,P.innerHTML}function qc(P){return ee(P)&&(console.error("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before using it here.",ce(P)),oe(P)),(typeof P=="string"?P:""+P).replace(Mro,`
|
|
185
|
+
`).replace(Tro,"")}function wp(P,C){return C=qc(C),qc(P)===C}function ld(){}function Rs(P,C,k,W,Z,le){switch(k){case"children":typeof W=="string"?(mm(W,C,!1),C==="body"||C==="textarea"&&W===""||m_(P,W)):(typeof W=="number"||typeof W=="bigint")&&(mm(""+W,C,!1),C!=="body"&&m_(P,""+W));break;case"className":Sn(P,"class",W);break;case"tabIndex":Sn(P,"tabindex",W);break;case"dir":case"role":case"viewBox":case"width":case"height":Sn(P,k,W);break;case"style":W_(P,W,le);break;case"data":if(C!=="object"){Sn(P,"data",W);break}case"src":case"href":if(W===""&&(C!=="a"||k!=="href")){console.error(k==="src"?'An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.':'An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',k,k),P.removeAttribute(k);break}if(W==null||typeof W=="function"||typeof W=="symbol"||typeof W=="boolean"){P.removeAttribute(k);break}ie(W,k),W=Ad(""+W),P.setAttribute(k,W);break;case"action":case"formAction":if(W!=null&&(C==="form"?k==="formAction"?console.error("You can only pass the formAction prop to <input> or <button>. Use the action prop on <form>."):typeof W=="function"&&(Z.encType==null&&Z.method==null||Hq||(Hq=!0,console.error("Cannot specify a encType or method for a form that specifies a function as the action. React provides those automatically. They will get overridden.")),Z.target==null||Nq||(Nq=!0,console.error("Cannot specify a target for a form that specifies a function as the action. The function will always be executed in the same window."))):C==="input"||C==="button"?k==="action"?console.error("You can only pass the action prop to <form>. Use the formAction prop on <input> or <button>."):C!=="input"||Z.type==="submit"||Z.type==="image"||kq?C!=="button"||Z.type==null||Z.type==="submit"||kq?typeof W=="function"&&(Z.name==null||a1t||(a1t=!0,console.error('Cannot specify a "name" prop for a button that specifies a function as a formAction. React needs it to encode which action should be invoked. It will get overridden.')),Z.formEncType==null&&Z.formMethod==null||Hq||(Hq=!0,console.error("Cannot specify a formEncType or formMethod for a button that specifies a function as a formAction. React provides those automatically. They will get overridden.")),Z.formTarget==null||Nq||(Nq=!0,console.error("Cannot specify a formTarget for a button that specifies a function as a formAction. The function will always be executed in the same window."))):(kq=!0,console.error('A button can only specify a formAction along with type="submit" or no type.')):(kq=!0,console.error('An input can only specify a formAction along with type="submit" or type="image".')):console.error(k==="action"?"You can only pass the action prop to <form>.":"You can only pass the formAction prop to <input> or <button>.")),typeof W=="function"){P.setAttribute(k,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof le=="function"&&(k==="formAction"?(C!=="input"&&Rs(P,C,"name",Z.name,Z,null),Rs(P,C,"formEncType",Z.formEncType,Z,null),Rs(P,C,"formMethod",Z.formMethod,Z,null),Rs(P,C,"formTarget",Z.formTarget,Z,null)):(Rs(P,C,"encType",Z.encType,Z,null),Rs(P,C,"method",Z.method,Z,null),Rs(P,C,"target",Z.target,Z,null)));if(W==null||typeof W=="symbol"||typeof W=="boolean"){P.removeAttribute(k);break}ie(W,k),W=Ad(""+W),P.setAttribute(k,W);break;case"onClick":W!=null&&(typeof W!="function"&&Yc(k,W),P.onclick=ld);break;case"onScroll":W!=null&&(typeof W!="function"&&Yc(k,W),Dr("scroll",P));break;case"onScrollEnd":W!=null&&(typeof W!="function"&&Yc(k,W),Dr("scrollend",P));break;case"dangerouslySetInnerHTML":if(W!=null){if(typeof W!="object"||!("__html"in W))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");if(k=W.__html,k!=null){if(Z.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");P.innerHTML=k}}break;case"multiple":P.multiple=W&&typeof W!="function"&&typeof W!="symbol";break;case"muted":P.muted=W&&typeof W!="function"&&typeof W!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(W==null||typeof W=="function"||typeof W=="boolean"||typeof W=="symbol"){P.removeAttribute("xlink:href");break}ie(W,k),k=Ad(""+W),P.setAttributeNS(DC,"xlink:href",k);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":W!=null&&typeof W!="function"&&typeof W!="symbol"?(ie(W,k),P.setAttribute(k,""+W)):P.removeAttribute(k);break;case"inert":W!==""||Iq[k]||(Iq[k]=!0,console.error("Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",k));case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":W&&typeof W!="function"&&typeof W!="symbol"?P.setAttribute(k,""):P.removeAttribute(k);break;case"capture":case"download":W===!0?P.setAttribute(k,""):W!==!1&&W!=null&&typeof W!="function"&&typeof W!="symbol"?(ie(W,k),P.setAttribute(k,W)):P.removeAttribute(k);break;case"cols":case"rows":case"size":case"span":W!=null&&typeof W!="function"&&typeof W!="symbol"&&!isNaN(W)&&1<=W?(ie(W,k),P.setAttribute(k,W)):P.removeAttribute(k);break;case"rowSpan":case"start":W==null||typeof W=="function"||typeof W=="symbol"||isNaN(W)?P.removeAttribute(k):(ie(W,k),P.setAttribute(k,W));break;case"popover":Dr("beforetoggle",P),Dr("toggle",P),$n(P,"popover",W);break;case"xlinkActuate":en(P,DC,"xlink:actuate",W);break;case"xlinkArcrole":en(P,DC,"xlink:arcrole",W);break;case"xlinkRole":en(P,DC,"xlink:role",W);break;case"xlinkShow":en(P,DC,"xlink:show",W);break;case"xlinkTitle":en(P,DC,"xlink:title",W);break;case"xlinkType":en(P,DC,"xlink:type",W);break;case"xmlBase":en(P,C4e,"xml:base",W);break;case"xmlLang":en(P,C4e,"xml:lang",W);break;case"xmlSpace":en(P,C4e,"xml:space",W);break;case"is":le!=null&&console.error('Cannot update the "is" prop after it has been initialized.'),$n(P,"is",W);break;case"innerText":case"textContent":break;case"popoverTarget":c1t||W==null||typeof W!="object"||(c1t=!0,console.error("The `popoverTarget` prop expects the ID of an Element as a string. Received %s instead.",W));default:!(2<k.length)||k[0]!=="o"&&k[0]!=="O"||k[1]!=="n"&&k[1]!=="N"?(k=ku(k),$n(P,k,W)):Vm.hasOwnProperty(k)&&W!=null&&typeof W!="function"&&Yc(k,W)}}function ud(P,C,k,W,Z,le){switch(k){case"style":W_(P,W,le);break;case"dangerouslySetInnerHTML":if(W!=null){if(typeof W!="object"||!("__html"in W))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");if(k=W.__html,k!=null){if(Z.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");P.innerHTML=k}}break;case"children":typeof W=="string"?m_(P,W):(typeof W=="number"||typeof W=="bigint")&&m_(P,""+W);break;case"onScroll":W!=null&&(typeof W!="function"&&Yc(k,W),Dr("scroll",P));break;case"onScrollEnd":W!=null&&(typeof W!="function"&&Yc(k,W),Dr("scrollend",P));break;case"onClick":W!=null&&(typeof W!="function"&&Yc(k,W),P.onclick=ld);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(Vm.hasOwnProperty(k))W!=null&&typeof W!="function"&&Yc(k,W);else e:{if(k[0]==="o"&&k[1]==="n"&&(Z=k.endsWith("Capture"),C=k.slice(2,Z?k.length-7:void 0),le=P[Ja]||null,le=le!=null?le[k]:null,typeof le=="function"&&P.removeEventListener(C,le,Z),typeof W=="function")){typeof le!="function"&&le!==null&&(k in P?P[k]=null:P.hasAttribute(k)&&P.removeAttribute(k)),P.addEventListener(C,W,Z);break e}k in P?P[k]=W:W===!0?P.setAttribute(k,""):$n(P,k,W)}}}function Lc(P,C,k){switch(Ei(C,k),C){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Dr("error",P),Dr("load",P);var W=!1,Z=!1,le;for(le in k)if(k.hasOwnProperty(le)){var Le=k[le];if(Le!=null)switch(le){case"src":W=!0;break;case"srcSet":Z=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(C+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:Rs(P,C,le,Le,k,null)}}Z&&Rs(P,C,"srcSet",k.srcSet,k,null),W&&Rs(P,C,"src",k.src,k,null);return;case"input":kt("input",k),Dr("invalid",P);var qe=le=Le=Z=null,dt=null,yt=null;for(W in k)if(k.hasOwnProperty(W)){var mn=k[W];if(mn!=null)switch(W){case"name":Z=mn;break;case"type":Le=mn;break;case"checked":dt=mn;break;case"defaultChecked":yt=mn;break;case"value":le=mn;break;case"defaultValue":qe=mn;break;case"children":case"dangerouslySetInnerHTML":if(mn!=null)throw Error(C+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:Rs(P,C,W,mn,k,null)}}In(P,k),ao(P,le,qe,dt,yt,Le,Z,!1),Jt(P);return;case"select":kt("select",k),Dr("invalid",P),W=Le=le=null;for(Z in k)if(k.hasOwnProperty(Z)&&(qe=k[Z],qe!=null))switch(Z){case"value":le=qe;break;case"defaultValue":Le=qe;break;case"multiple":W=qe;default:Rs(P,C,Z,qe,k,null)}Jo(P,k),C=le,k=Le,P.multiple=!!W,C!=null?Eo(P,!!W,C,!1):k!=null&&Eo(P,!!W,k,!0);return;case"textarea":kt("textarea",k),Dr("invalid",P),le=Z=W=null;for(Le in k)if(k.hasOwnProperty(Le)&&(qe=k[Le],qe!=null))switch(Le){case"value":W=qe;break;case"defaultValue":Z=qe;break;case"children":le=qe;break;case"dangerouslySetInnerHTML":if(qe!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:Rs(P,C,Le,qe,k,null)}vr(P,k),Vo(P,W,Z,le),Jt(P);return;case"option":Go(P,k);for(dt in k)k.hasOwnProperty(dt)&&(W=k[dt],W!=null)&&(dt==="selected"?P.selected=W&&typeof W!="function"&&typeof W!="symbol":Rs(P,C,dt,W,k,null));return;case"dialog":Dr("beforetoggle",P),Dr("toggle",P),Dr("cancel",P),Dr("close",P);break;case"iframe":case"object":Dr("load",P);break;case"video":case"audio":for(W=0;W<eL.length;W++)Dr(eL[W],P);break;case"image":Dr("error",P),Dr("load",P);break;case"details":Dr("toggle",P);break;case"embed":case"source":case"link":Dr("error",P),Dr("load",P);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(yt in k)if(k.hasOwnProperty(yt)&&(W=k[yt],W!=null))switch(yt){case"children":case"dangerouslySetInnerHTML":throw Error(C+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:Rs(P,C,yt,W,k,null)}return;default:if(p_(C)){for(mn in k)k.hasOwnProperty(mn)&&(W=k[mn],W!==void 0&&ud(P,C,mn,W,k,void 0));return}}for(qe in k)k.hasOwnProperty(qe)&&(W=k[qe],W!=null&&Rs(P,C,qe,W,k,null))}function ky(P,C,k,W){switch(Ei(C,W),C){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var Z=null,le=null,Le=null,qe=null,dt=null,yt=null,mn=null;for(Dn in k){var vn=k[Dn];if(k.hasOwnProperty(Dn)&&vn!=null)switch(Dn){case"checked":break;case"value":break;case"defaultValue":dt=vn;default:W.hasOwnProperty(Dn)||Rs(P,C,Dn,null,W,vn)}}for(var _n in W){var Dn=W[_n];if(vn=k[_n],W.hasOwnProperty(_n)&&(Dn!=null||vn!=null))switch(_n){case"type":le=Dn;break;case"name":Z=Dn;break;case"checked":yt=Dn;break;case"defaultChecked":mn=Dn;break;case"value":Le=Dn;break;case"defaultValue":qe=Dn;break;case"children":case"dangerouslySetInnerHTML":if(Dn!=null)throw Error(C+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:Dn!==vn&&Rs(P,C,_n,Dn,W,vn)}}C=k.type==="checkbox"||k.type==="radio"?k.checked!=null:k.value!=null,W=W.type==="checkbox"||W.type==="radio"?W.checked!=null:W.value!=null,C||!W||s1t||(console.error("A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/link/controlled-components"),s1t=!0),!C||W||i1t||(console.error("A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/link/controlled-components"),i1t=!0),Qn(P,Le,qe,dt,yt,mn,le,Z);return;case"select":Dn=Le=qe=_n=null;for(le in k)if(dt=k[le],k.hasOwnProperty(le)&&dt!=null)switch(le){case"value":break;case"multiple":Dn=dt;default:W.hasOwnProperty(le)||Rs(P,C,le,null,W,dt)}for(Z in W)if(le=W[Z],dt=k[Z],W.hasOwnProperty(Z)&&(le!=null||dt!=null))switch(Z){case"value":_n=le;break;case"defaultValue":qe=le;break;case"multiple":Le=le;default:le!==dt&&Rs(P,C,Z,le,W,dt)}W=qe,C=Le,k=Dn,_n!=null?Eo(P,!!C,_n,!1):!!k!=!!C&&(W!=null?Eo(P,!!C,W,!0):Eo(P,!!C,C?[]:"",!1));return;case"textarea":Dn=_n=null;for(qe in k)if(Z=k[qe],k.hasOwnProperty(qe)&&Z!=null&&!W.hasOwnProperty(qe))switch(qe){case"value":break;case"children":break;default:Rs(P,C,qe,null,W,Z)}for(Le in W)if(Z=W[Le],le=k[Le],W.hasOwnProperty(Le)&&(Z!=null||le!=null))switch(Le){case"value":_n=Z;break;case"defaultValue":Dn=Z;break;case"children":break;case"dangerouslySetInnerHTML":if(Z!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:Z!==le&&Rs(P,C,Le,Z,W,le)}xi(P,_n,Dn);return;case"option":for(var dr in k)_n=k[dr],k.hasOwnProperty(dr)&&_n!=null&&!W.hasOwnProperty(dr)&&(dr==="selected"?P.selected=!1:Rs(P,C,dr,null,W,_n));for(dt in W)_n=W[dt],Dn=k[dt],W.hasOwnProperty(dt)&&_n!==Dn&&(_n!=null||Dn!=null)&&(dt==="selected"?P.selected=_n&&typeof _n!="function"&&typeof _n!="symbol":Rs(P,C,dt,_n,W,Dn));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ni in k)_n=k[Ni],k.hasOwnProperty(Ni)&&_n!=null&&!W.hasOwnProperty(Ni)&&Rs(P,C,Ni,null,W,_n);for(yt in W)if(_n=W[yt],Dn=k[yt],W.hasOwnProperty(yt)&&_n!==Dn&&(_n!=null||Dn!=null))switch(yt){case"children":case"dangerouslySetInnerHTML":if(_n!=null)throw Error(C+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:Rs(P,C,yt,_n,W,Dn)}return;default:if(p_(C)){for(var y0 in k)_n=k[y0],k.hasOwnProperty(y0)&&_n!==void 0&&!W.hasOwnProperty(y0)&&ud(P,C,y0,void 0,W,_n);for(mn in W)_n=W[mn],Dn=k[mn],!W.hasOwnProperty(mn)||_n===Dn||_n===void 0&&Dn===void 0||ud(P,C,mn,_n,W,Dn);return}}for(var ma in k)_n=k[ma],k.hasOwnProperty(ma)&&_n!=null&&!W.hasOwnProperty(ma)&&Rs(P,C,ma,null,W,_n);for(vn in W)_n=W[vn],Dn=k[vn],!W.hasOwnProperty(vn)||_n===Dn||_n==null&&Dn==null||Rs(P,C,vn,_n,W,Dn)}function Of(P){switch(P){case"class":return"className";case"for":return"htmlFor";default:return P}}function Yu(P){var C={};P=P.style;for(var k=0;k<P.length;k++){var W=P[k];C[W]=P.getPropertyValue(W)}return C}function Ep(P,C,k){if(C!=null&&typeof C!="object")console.error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");else{var W,Z=W="",le;for(le in C)if(C.hasOwnProperty(le)){var Le=C[le];Le!=null&&typeof Le!="boolean"&&Le!==""&&(le.indexOf("--")===0?(ae(Le,le),W+=Z+le+":"+(""+Le).trim()):typeof Le!="number"||Le===0||na.has(le)?(ae(Le,le),W+=Z+le.replace(Hn,"-$1").toLowerCase().replace(eo,"-ms-")+":"+(""+Le).trim()):W+=Z+le.replace(Hn,"-$1").toLowerCase().replace(eo,"-ms-")+":"+Le+"px",Z=";")}W=W||null,C=P.getAttribute("style"),C!==W&&(W=qc(W),qc(C)!==W&&(k.style=Yu(P)))}}function yl(P,C,k,W,Z,le){if(Z.delete(k),P=P.getAttribute(k),P===null)switch(typeof W){case"undefined":case"function":case"symbol":case"boolean":return}else if(W!=null)switch(typeof W){case"function":case"symbol":case"boolean":break;default:if(ie(W,C),P===""+W)return}ai(C,P,W,le)}function Y5(P,C,k,W,Z,le){if(Z.delete(k),P=P.getAttribute(k),P===null){switch(typeof W){case"function":case"symbol":return}if(!W)return}else switch(typeof W){case"function":case"symbol":break;default:if(W)return}ai(C,P,W,le)}function _d(P,C,k,W,Z,le){if(Z.delete(k),P=P.getAttribute(k),P===null)switch(typeof W){case"undefined":case"function":case"symbol":return}else if(W!=null)switch(typeof W){case"function":case"symbol":break;default:if(ie(W,k),P===""+W)return}ai(C,P,W,le)}function Im(P,C,k,W,Z,le){if(Z.delete(k),P=P.getAttribute(k),P===null)switch(typeof W){case"undefined":case"function":case"symbol":case"boolean":return;default:if(isNaN(W))return}else if(W!=null)switch(typeof W){case"function":case"symbol":case"boolean":break;default:if(!isNaN(W)&&(ie(W,C),P===""+W))return}ai(C,P,W,le)}function zr(P,C,k,W,Z,le){if(Z.delete(k),P=P.getAttribute(k),P===null)switch(typeof W){case"undefined":case"function":case"symbol":case"boolean":return}else if(W!=null)switch(typeof W){case"function":case"symbol":case"boolean":break;default:if(ie(W,C),k=Ad(""+W),P===k)return}ai(C,P,W,le)}function da(P,C,k,W){for(var Z={},le=new Set,Le=P.attributes,qe=0;qe<Le.length;qe++)switch(Le[qe].name.toLowerCase()){case"value":break;case"checked":break;case"selected":break;default:le.add(Le[qe].name)}if(p_(C)){for(var dt in k)if(k.hasOwnProperty(dt)){var yt=k[dt];if(yt!=null){if(Vm.hasOwnProperty(dt))typeof yt!="function"&&Yc(dt,yt);else if(k.suppressHydrationWarning!==!0)switch(dt){case"children":typeof yt!="string"&&typeof yt!="number"||ai("children",P.textContent,yt,Z);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":Le=P.innerHTML,yt=yt?yt.__html:void 0,yt!=null&&(yt=Vh(P,yt),ai(dt,Le,yt,Z));continue;case"style":le.delete(dt),Ep(P,yt,Z);continue;case"offsetParent":case"offsetTop":case"offsetLeft":case"offsetWidth":case"offsetHeight":case"isContentEditable":case"outerText":case"outerHTML":le.delete(dt.toLowerCase()),console.error("Assignment to read-only property will result in a no-op: `%s`",dt);continue;case"className":le.delete("class"),Le=nn(P,"class",yt),ai("className",Le,yt,Z);continue;default:W.context===Sb&&C!=="svg"&&C!=="math"?le.delete(dt.toLowerCase()):le.delete(dt),Le=nn(P,dt,yt),ai(dt,Le,yt,Z)}}}}else for(yt in k)if(k.hasOwnProperty(yt)&&(dt=k[yt],dt!=null)){if(Vm.hasOwnProperty(yt))typeof dt!="function"&&Yc(yt,dt);else if(k.suppressHydrationWarning!==!0)switch(yt){case"children":typeof dt!="string"&&typeof dt!="number"||ai("children",P.textContent,dt,Z);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"value":case"checked":case"selected":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":Le=P.innerHTML,dt=dt?dt.__html:void 0,dt!=null&&(dt=Vh(P,dt),Le!==dt&&(Z[yt]={__html:Le}));continue;case"className":yl(P,yt,"class",dt,le,Z);continue;case"tabIndex":yl(P,yt,"tabindex",dt,le,Z);continue;case"style":le.delete(yt),Ep(P,dt,Z);continue;case"multiple":le.delete(yt),ai(yt,P.multiple,dt,Z);continue;case"muted":le.delete(yt),ai(yt,P.muted,dt,Z);continue;case"autoFocus":le.delete("autofocus"),ai(yt,P.autofocus,dt,Z);continue;case"data":if(C!=="object"){le.delete(yt),Le=P.getAttribute("data"),ai(yt,Le,dt,Z);continue}case"src":case"href":if(!(dt!==""||C==="a"&&yt==="href"||C==="object"&&yt==="data")){console.error(yt==="src"?'An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.':'An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',yt,yt);continue}zr(P,yt,yt,dt,le,Z);continue;case"action":case"formAction":if(Le=P.getAttribute(yt),typeof dt=="function"){le.delete(yt.toLowerCase()),yt==="formAction"?(le.delete("name"),le.delete("formenctype"),le.delete("formmethod"),le.delete("formtarget")):(le.delete("enctype"),le.delete("method"),le.delete("target"));continue}else if(Le===wro){le.delete(yt.toLowerCase()),ai(yt,"function",dt,Z);continue}zr(P,yt,yt.toLowerCase(),dt,le,Z);continue;case"xlinkHref":zr(P,yt,"xlink:href",dt,le,Z);continue;case"contentEditable":_d(P,yt,"contenteditable",dt,le,Z);continue;case"spellCheck":_d(P,yt,"spellcheck",dt,le,Z);continue;case"draggable":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":_d(P,yt,yt,dt,le,Z);continue;case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":Y5(P,yt,yt.toLowerCase(),dt,le,Z);continue;case"capture":case"download":e:{qe=P;var mn=Le=yt,vn=Z;if(le.delete(mn),qe=qe.getAttribute(mn),qe===null)switch(typeof dt){case"undefined":case"function":case"symbol":break e;default:if(dt===!1)break e}else if(dt!=null)switch(typeof dt){case"function":case"symbol":break;case"boolean":if(dt===!0&&qe==="")break e;break;default:if(ie(dt,Le),qe===""+dt)break e}ai(Le,qe,dt,vn)}continue;case"cols":case"rows":case"size":case"span":e:{if(qe=P,mn=Le=yt,vn=Z,le.delete(mn),qe=qe.getAttribute(mn),qe===null)switch(typeof dt){case"undefined":case"function":case"symbol":case"boolean":break e;default:if(isNaN(dt)||1>dt)break e}else if(dt!=null)switch(typeof dt){case"function":case"symbol":case"boolean":break;default:if(!(isNaN(dt)||1>dt)&&(ie(dt,Le),qe===""+dt))break e}ai(Le,qe,dt,vn)}continue;case"rowSpan":Im(P,yt,"rowspan",dt,le,Z);continue;case"start":Im(P,yt,yt,dt,le,Z);continue;case"xHeight":yl(P,yt,"x-height",dt,le,Z);continue;case"xlinkActuate":yl(P,yt,"xlink:actuate",dt,le,Z);continue;case"xlinkArcrole":yl(P,yt,"xlink:arcrole",dt,le,Z);continue;case"xlinkRole":yl(P,yt,"xlink:role",dt,le,Z);continue;case"xlinkShow":yl(P,yt,"xlink:show",dt,le,Z);continue;case"xlinkTitle":yl(P,yt,"xlink:title",dt,le,Z);continue;case"xlinkType":yl(P,yt,"xlink:type",dt,le,Z);continue;case"xmlBase":yl(P,yt,"xml:base",dt,le,Z);continue;case"xmlLang":yl(P,yt,"xml:lang",dt,le,Z);continue;case"xmlSpace":yl(P,yt,"xml:space",dt,le,Z);continue;case"inert":dt!==""||Iq[yt]||(Iq[yt]=!0,console.error("Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",yt)),Y5(P,yt,yt,dt,le,Z);continue;default:if(!(2<yt.length)||yt[0]!=="o"&&yt[0]!=="O"||yt[1]!=="n"&&yt[1]!=="N"){qe=ku(yt),Le=!1,W.context===Sb&&C!=="svg"&&C!=="math"?le.delete(qe.toLowerCase()):(mn=yt.toLowerCase(),mn=Fp.hasOwnProperty(mn)&&Fp[mn]||null,mn!==null&&mn!==yt&&(Le=!0,le.delete(mn)),le.delete(qe));e:if(mn=P,vn=qe,qe=dt,Bt(vn))if(mn.hasAttribute(vn))mn=mn.getAttribute(vn),ie(qe,vn),qe=mn===""+qe?qe:mn;else{switch(typeof qe){case"function":case"symbol":break e;case"boolean":if(mn=vn.toLowerCase().slice(0,5),mn!=="data-"&&mn!=="aria-")break e}qe=qe===void 0?void 0:null}else qe=void 0;Le||ai(yt,qe,dt,Z)}}}return 0<le.size&&k.suppressHydrationWarning!==!0&&Kd(P,le,Z),Object.keys(Z).length===0?null:Z}function Ui(P,C){switch(P.length){case 0:return"";case 1:return P[0];case 2:return P[0]+" "+C+" "+P[1];default:return P.slice(0,-1).join(", ")+", "+C+" "+P[P.length-1]}}function Ji(P){return P.nodeType===9?P:P.ownerDocument}function Yr(P){switch(P){case Gh:return AD;case xd:return Fq;default:return Sb}}function qu(P,C){if(P===Sb)switch(C){case"svg":return AD;case"math":return Fq;default:return Sb}return P===AD&&C==="foreignObject"?Sb:P}function V0(P,C){return P==="textarea"||P==="noscript"||typeof C.children=="string"||typeof C.children=="number"||typeof C.children=="bigint"||typeof C.dangerouslySetInnerHTML=="object"&&C.dangerouslySetInnerHTML!==null&&C.dangerouslySetInnerHTML.__html!=null}function Na(){var P=window.event;return P&&P.type==="popstate"?P===E4e?!1:(E4e=P,!0):(E4e=null,!1)}function lg(P){setTimeout(function(){throw P})}function Lm(P,C,k){switch(C){case"button":case"input":case"select":case"textarea":k.autoFocus&&P.focus();break;case"img":k.src?P.src=k.src:k.srcSet&&(P.srcset=k.srcSet)}}function Bi(P,C,k,W){ky(P,C,k,W),P[Ja]=W}function Ca(P){m_(P,"")}function zl(P,C,k){P.nodeValue=k}function ea(P){return P==="head"}function m0(P,C){P.removeChild(C)}function Ff(P,C){(P.nodeType===9?P.body:P.nodeName==="HTML"?P.ownerDocument.body:P).removeChild(C)}function Dp(P,C){var k=C,W=0,Z=0;do{var le=k.nextSibling;if(P.removeChild(k),le&&le.nodeType===8)if(k=le.data,k===Oq){if(0<W&&8>W){k=W;var Le=P.ownerDocument;if(k&Dro&&Vl(Le.documentElement),k&Aro&&Vl(Le.body),k&Rro)for(k=Le.head,Vl(k),Le=k.firstChild;Le;){var qe=Le.nextSibling,dt=Le.nodeName;Le[sx]||dt==="SCRIPT"||dt==="STYLE"||dt==="LINK"&&Le.rel.toLowerCase()==="stylesheet"||k.removeChild(Le),Le=qe}}if(Z===0){P.removeChild(le),_g(C);return}Z--}else k===Lq||k===vb||k===tL?Z++:W=k.charCodeAt(0)-48;else W=0;k=le}while(k);_g(C)}function $0(P){P=P.style,typeof P.setProperty=="function"?P.setProperty("display","none","important"):P.display="none"}function ex(P){P.nodeValue=""}function tx(P,C){C=C[kro],C=C!=null&&C.hasOwnProperty("display")?C.display:null,P.style.display=C==null||typeof C=="boolean"?"":(""+C).trim()}function B1(P,C){P.nodeValue=C}function Om(P){var C=P.firstChild;for(C&&C.nodeType===10&&(C=C.nextSibling);C;){var k=C;switch(C=C.nextSibling,k.nodeName){case"HTML":case"HEAD":case"BODY":Om(k),Ot(k);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(k.rel.toLowerCase()==="stylesheet")continue}P.removeChild(k)}}function Bf(P,C,k,W){for(;P.nodeType===1;){var Z=k;if(P.nodeName.toLowerCase()!==C.toLowerCase()){if(!W&&(P.nodeName!=="INPUT"||P.type!=="hidden"))break}else if(W){if(!P[sx])switch(C){case"meta":if(!P.hasAttribute("itemprop"))break;return P;case"link":if(le=P.getAttribute("rel"),le==="stylesheet"&&P.hasAttribute("data-precedence"))break;if(le!==Z.rel||P.getAttribute("href")!==(Z.href==null||Z.href===""?null:Z.href)||P.getAttribute("crossorigin")!==(Z.crossOrigin==null?null:Z.crossOrigin)||P.getAttribute("title")!==(Z.title==null?null:Z.title))break;return P;case"style":if(P.hasAttribute("data-precedence"))break;return P;case"script":if(le=P.getAttribute("src"),(le!==(Z.src==null?null:Z.src)||P.getAttribute("type")!==(Z.type==null?null:Z.type)||P.getAttribute("crossorigin")!==(Z.crossOrigin==null?null:Z.crossOrigin))&&le&&P.hasAttribute("async")&&!P.hasAttribute("itemprop"))break;return P;default:return P}}else if(C==="input"&&P.type==="hidden"){ie(Z.name,"name");var le=Z.name==null?null:""+Z.name;if(Z.type==="hidden"&&P.getAttribute("name")===le)return P}else return P;if(P=Cr(P.nextSibling),P===null)break}return null}function Rr(P,C,k){if(C==="")return null;for(;P.nodeType!==3;)if((P.nodeType!==1||P.nodeName!=="INPUT"||P.type!=="hidden")&&!k||(P=Cr(P.nextSibling),P===null))return null;return P}function cs(P){return P.data===tL||P.data===vb&&P.ownerDocument.readyState===u1t}function oi(P,C){var k=P.ownerDocument;if(P.data!==vb||k.readyState===u1t)C();else{var W=function(){C(),k.removeEventListener("DOMContentLoaded",W)};k.addEventListener("DOMContentLoaded",W),P._reactRetry=W}}function Cr(P){for(;P!=null;P=P.nextSibling){var C=P.nodeType;if(C===1||C===3)break;if(C===8){if(C=P.data,C===Lq||C===tL||C===vb||C===M4e||C===l1t)break;if(C===Oq)return null}}return P}function wr(P){if(P.nodeType===1){for(var C=P.nodeName.toLowerCase(),k={},W=P.attributes,Z=0;Z<W.length;Z++){var le=W[Z];k[Of(le.name)]=le.name.toLowerCase()==="style"?Yu(P):le.value}return{type:C,props:k}}return P.nodeType===8?{type:"Suspense",props:{}}:P.nodeValue}function vc(P,C,k){return k===null||k[Ero]!==!0?(P.nodeValue===C?P=null:(C=qc(C),P=qc(P.nodeValue)===C?null:P.nodeValue),P):null}function Ap(P){P=P.nextSibling;for(var C=0;P;){if(P.nodeType===8){var k=P.data;if(k===Oq){if(C===0)return Cr(P.nextSibling);C--}else k!==Lq&&k!==tL&&k!==vb||C++}P=P.nextSibling}return null}function Ju(P){P=P.previousSibling;for(var C=0;P;){if(P.nodeType===8){var k=P.data;if(k===Lq||k===tL||k===vb){if(C===0)return P;C--}else k===Oq&&C++}P=P.previousSibling}return null}function zf(P){_g(P)}function Ha(P){_g(P)}function Ia(P,C,k,W,Z){switch(Z&&lf(P,W.ancestorInfo),C=Ji(k),P){case"html":if(P=C.documentElement,!P)throw Error("React expected an <html> element (document.documentElement) to exist in the Document but one was not found. React never removes the documentElement for any Document it renders into so the cause is likely in some other script running on this page.");return P;case"head":if(P=C.head,!P)throw Error("React expected a <head> element (document.head) to exist in the Document but one was not found. React never removes the head for any Document it renders into so the cause is likely in some other script running on this page.");return P;case"body":if(P=C.body,!P)throw Error("React expected a <body> element (document.body) to exist in the Document but one was not found. React never removes the body for any Document it renders into so the cause is likely in some other script running on this page.");return P;default:throw Error("resolveSingletonInstance was called with an element type that is not supported. This is a bug in React.")}}function Ya(P,C,k,W){if(!k[Kc]&&Wt(k)){var Z=k.tagName.toLowerCase();console.error("You are mounting a new %s component when a previous one has not first unmounted. It is an error to render more than one %s component at a time and attributes and children of these components will likely fail in unpredictable ways. Please only render a single instance of <%s> and if you need to mount a new one, ensure any previous ones have unmounted first.",Z,Z,Z)}switch(P){case"html":case"head":case"body":break;default:console.error("acquireSingletonInstance was called with an element type that is not supported. This is a bug in React.")}for(Z=k.attributes;Z.length;)k.removeAttributeNode(Z[0]);Lc(k,P,C),k[cc]=W,k[Ja]=C}function Vl(P){for(var C=P.attributes;C.length;)P.removeAttributeNode(C[0]);Ot(P)}function dd(P){return typeof P.getRootNode=="function"?P.getRootNode():P.nodeType===9?P:P.ownerDocument}function La(P,C,k){var W=RD;if(W&&typeof C=="string"&&C){var Z=Vn(C);Z='link[rel="'+P+'"][href="'+Z+'"]',typeof k=="string"&&(Z+='[crossorigin="'+k+'"]'),f1t.has(Z)||(f1t.add(Z),P={rel:P,crossOrigin:k,href:C},W.querySelector(Z)===null&&(C=W.createElement("link"),Lc(C,"link",P),tt(C),W.head.appendChild(C)))}}function hd(P,C,k,W){var Z=(Z=fd.current)?dd(Z):null;if(!Z)throw Error('"resourceRoot" was expected to exist. This is a bug in React.');switch(P){case"meta":case"title":return null;case"style":return typeof k.precedence=="string"&&typeof k.href=="string"?(k=ac(k.href),C=ge(Z).hoistableStyles,W=C.get(k),W||(W={type:"style",instance:null,count:0,state:null},C.set(k,W)),W):{type:"void",instance:null,count:0,state:null};case"link":if(k.rel==="stylesheet"&&typeof k.href=="string"&&typeof k.precedence=="string"){P=ac(k.href);var le=ge(Z).hoistableStyles,Le=le.get(P);if(!Le&&(Z=Z.ownerDocument||Z,Le={type:"stylesheet",instance:null,count:0,state:{loading:RC,preload:null}},le.set(P,Le),(le=Z.querySelector(Ku(P)))&&!le._p&&(Le.instance=le,Le.state.loading=nL|n4),!o4.has(P))){var qe={rel:"preload",as:"style",href:k.href,crossOrigin:k.crossOrigin,integrity:k.integrity,media:k.media,hrefLang:k.hrefLang,referrerPolicy:k.referrerPolicy};o4.set(P,qe),le||ug(Z,P,qe,Le.state)}if(C&&W===null)throw k=`
|
|
186
186
|
|
|
187
187
|
- `+$h(C)+`
|
|
188
188
|
+ `+$h(k),Error("Expected <link> not to update to be updated to a stylesheet with precedence. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key."+k);return Le}if(C&&W!==null)throw k=`
|
|
@@ -190,7 +190,7 @@ This ensures that you're testing the behavior the user would see in the browser.
|
|
|
190
190
|
- `+$h(C)+`
|
|
191
191
|
+ `+$h(k),Error("Expected stylesheet with precedence to not be updated to a different kind of <link>. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key."+k);return null;case"script":return C=k.async,k=k.src,typeof k=="string"&&C&&typeof C!="function"&&typeof C!="symbol"?(k=Rp(k),C=ge(Z).hoistableScripts,W=C.get(k),W||(W={type:"script",instance:null,count:0,state:null},C.set(k,W)),W):{type:"void",instance:null,count:0,state:null};default:throw Error('getResource encountered a type it did not expect: "'+P+'". this is a bug in React.')}}function $h(P){var C=0,k="<link";return typeof P.rel=="string"?(C++,k+=' rel="'+P.rel+'"'):Ip.call(P,"rel")&&(C++,k+=' rel="'+(P.rel===null?"null":"invalid type "+typeof P.rel)+'"'),typeof P.href=="string"?(C++,k+=' href="'+P.href+'"'):Ip.call(P,"href")&&(C++,k+=' href="'+(P.href===null?"null":"invalid type "+typeof P.href)+'"'),typeof P.precedence=="string"?(C++,k+=' precedence="'+P.precedence+'"'):Ip.call(P,"precedence")&&(C++,k+=" precedence={"+(P.precedence===null?"null":"invalid type "+typeof P.precedence)+"}"),Object.getOwnPropertyNames(P).length>C&&(k+=" ..."),k+" />"}function ac(P){return'href="'+Vn(P)+'"'}function Ku(P){return'link[rel="stylesheet"]['+P+"]"}function z1(P){return Lr({},P,{"data-precedence":P.precedence,precedence:null})}function ug(P,C,k,W){P.querySelector('link[rel="preload"][as="style"]['+C+"]")?W.loading=nL:(C=P.createElement("link"),W.preload=C,C.addEventListener("load",function(){return W.loading|=nL}),C.addEventListener("error",function(){return W.loading|=m1t}),Lc(C,"link",k),tt(C),P.head.appendChild(C))}function Rp(P){return'[src="'+Vn(P)+'"]'}function md(P){return"script[async]"+P}function kr(P,C,k){if(C.count++,C.instance===null)switch(C.type){case"style":var W=P.querySelector('style[data-href~="'+Vn(k.href)+'"]');if(W)return C.instance=W,tt(W),W;var Z=Lr({},k,{"data-href":k.href,"data-precedence":k.precedence,href:null,precedence:null});return W=(P.ownerDocument||P).createElement("style"),tt(W),Lc(W,"style",Z),Su(W,k.precedence,P),C.instance=W;case"stylesheet":Z=ac(k.href);var le=P.querySelector(Ku(Z));if(le)return C.state.loading|=n4,C.instance=le,tt(le),le;W=z1(k),(Z=o4.get(Z))&&bl(W,Z),le=(P.ownerDocument||P).createElement("link"),tt(le);var Le=le;return Le._p=new Promise(function(qe,dt){Le.onload=qe,Le.onerror=dt}),Lc(le,"link",W),C.state.loading|=n4,Su(le,k.precedence,P),C.instance=le;case"script":return le=Rp(k.src),(Z=P.querySelector(md(le)))?(C.instance=Z,tt(Z),Z):(W=k,(Z=o4.get(le))&&(W=Lr({},k),Qu(W,Z)),P=P.ownerDocument||P,Z=P.createElement("script"),tt(Z),Lc(Z,"link",W),P.head.appendChild(Z),C.instance=Z);case"void":return null;default:throw Error('acquireResource encountered a resource type it did not expect: "'+C.type+'". this is a bug in React.')}else C.type==="stylesheet"&&(C.state.loading&n4)===RC&&(W=C.instance,C.state.loading|=n4,Su(W,k.precedence,P));return C.instance}function Su(P,C,k){for(var W=k.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),Z=W.length?W[W.length-1]:null,le=Z,Le=0;Le<W.length;Le++){var qe=W[Le];if(qe.dataset.precedence===C)le=qe;else if(le!==Z)break}le?le.parentNode.insertBefore(P,le.nextSibling):(C=k.nodeType===9?k.head:k,C.insertBefore(P,C.firstChild))}function bl(P,C){P.crossOrigin==null&&(P.crossOrigin=C.crossOrigin),P.referrerPolicy==null&&(P.referrerPolicy=C.referrerPolicy),P.title==null&&(P.title=C.title)}function Qu(P,C){P.crossOrigin==null&&(P.crossOrigin=C.crossOrigin),P.referrerPolicy==null&&(P.referrerPolicy=C.referrerPolicy),P.integrity==null&&(P.integrity=C.integrity)}function nx(P,C,k){if(Bq===null){var W=new Map,Z=Bq=new Map;Z.set(k,W)}else Z=Bq,W=Z.get(k),W||(W=new Map,Z.set(k,W));if(W.has(P))return W;for(W.set(P,null),k=k.getElementsByTagName(P),Z=0;Z<k.length;Z++){var le=k[Z];if(!(le[sx]||le[cc]||P==="link"&&le.getAttribute("rel")==="stylesheet")&&le.namespaceURI!==Gh){var Le=le.getAttribute(C)||"";Le=P+Le;var qe=W.get(Le);qe?qe.push(le):W.set(Le,[le])}}return W}function Ny(P,C,k){P=P.ownerDocument||P,P.head.insertBefore(k,C==="title"?P.querySelector("head > title"):null)}function V1(P,C,k){var W=!k.ancestorInfo.containerTagInScope;if(k.context===AD||C.itemProp!=null)return!W||C.itemProp==null||P!=="meta"&&P!=="title"&&P!=="style"&&P!=="link"&&P!=="script"||console.error("Cannot render a <%s> outside the main document if it has an `itemProp` prop. `itemProp` suggests the tag belongs to an `itemScope` which can appear anywhere in the DOM. If you were intending for React to hoist this <%s> remove the `itemProp` prop. Otherwise, try moving this tag into the <head> or <body> of the Document.",P,P),!1;switch(P){case"meta":case"title":return!0;case"style":if(typeof C.precedence!="string"||typeof C.href!="string"||C.href===""){W&&console.error('Cannot render a <style> outside the main document without knowing its precedence and a unique href key. React can hoist and deduplicate <style> tags if you provide a `precedence` prop along with an `href` prop that does not conflict with the `href` values used in any other hoisted <style> or <link rel="stylesheet" ...> tags. Note that hoisting <style> tags is considered an advanced feature that most will not use directly. Consider moving the <style> tag to the <head> or consider adding a `precedence="default"` and `href="some unique resource identifier"`.');break}return!0;case"link":if(typeof C.rel!="string"||typeof C.href!="string"||C.href===""||C.onLoad||C.onError){if(C.rel==="stylesheet"&&typeof C.precedence=="string"){P=C.href;var Z=C.onError,le=C.disabled;k=[],C.onLoad&&k.push("`onLoad`"),Z&&k.push("`onError`"),le!=null&&k.push("`disabled`"),Z=Ui(k,"and"),Z+=k.length===1?" prop":" props",le=k.length===1?"an "+Z:"the "+Z,k.length&&console.error('React encountered a <link rel="stylesheet" href="%s" ... /> with a `precedence` prop that also included %s. The presence of loading and error handlers indicates an intent to manage the stylesheet loading state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the %s, otherwise remove the `precedence` prop.',P,le,Z)}W&&(typeof C.rel!="string"||typeof C.href!="string"||C.href===""?console.error("Cannot render a <link> outside the main document without a `rel` and `href` prop. Try adding a `rel` and/or `href` prop to this <link> or moving the link into the <head> tag"):(C.onError||C.onLoad)&&console.error("Cannot render a <link> with onLoad or onError listeners outside the main document. Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or somewhere in the <body>."));break}return C.rel==="stylesheet"?(P=C.precedence,C=C.disabled,typeof P!="string"&&W&&console.error('Cannot render a <link rel="stylesheet" /> outside the main document without knowing its precedence. Consider adding precedence="default" or moving it into the root <head> tag.'),typeof P=="string"&&C==null):!0;case"script":if(P=C.async&&typeof C.async!="function"&&typeof C.async!="symbol",!P||C.onLoad||C.onError||!C.src||typeof C.src!="string"){W&&(P?C.onLoad||C.onError?console.error("Cannot render a <script> with onLoad or onError listeners outside the main document. Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or somewhere in the <body>."):console.error("Cannot render a <script> outside the main document without `async={true}` and a non-empty `src` prop. Ensure there is a valid `src` and either make the script async or move it into the root <head> tag or somewhere in the <body>."):console.error('Cannot render a sync or defer <script> outside the main document without knowing its order. Try adding async="" or moving it into the root <head> tag.'));break}return!0;case"noscript":case"template":W&&console.error("Cannot render <%s> outside the main document. Try moving it into the root <head> tag.",P)}return!1}function A_(P){return!(P.type==="stylesheet"&&(P.state.loading&p1t)===RC)}function $l(){}function L(P,C,k){if(oL===null)throw Error("Internal React Error: suspendedState null when it was expected to exists. Please report this as a React bug.");var W=oL;if(C.type==="stylesheet"&&(typeof k.media!="string"||matchMedia(k.media).matches!==!1)&&(C.state.loading&n4)===RC){if(C.instance===null){var Z=ac(k.href),le=P.querySelector(Ku(Z));if(le){P=le._p,P!==null&&typeof P=="object"&&typeof P.then=="function"&&(W.count++,W=te.bind(W),P.then(W,W)),C.state.loading|=n4,C.instance=le,tt(le);return}le=P.ownerDocument||P,k=z1(k),(Z=o4.get(Z))&&bl(k,Z),le=le.createElement("link"),tt(le);var Le=le;Le._p=new Promise(function(qe,dt){Le.onload=qe,Le.onerror=dt}),Lc(le,"link",k),C.instance=le}W.stylesheets===null&&(W.stylesheets=new Map),W.stylesheets.set(C,P),(P=C.state.preload)&&(C.state.loading&p1t)===RC&&(W.count++,C=te.bind(W),P.addEventListener("load",C),P.addEventListener("error",C))}}function B(){if(oL===null)throw Error("Internal React Error: suspendedState null when it was expected to exists. Please report this as a React bug.");var P=oL;return P.stylesheets&&P.count===0&&he(P,P.stylesheets),0<P.count?function(C){var k=setTimeout(function(){if(P.stylesheets&&he(P,P.stylesheets),P.unsuspend){var W=P.unsuspend;P.unsuspend=null,W()}},6e4);return P.unsuspend=C,function(){P.unsuspend=null,clearTimeout(k)}}:null}function te(){if(this.count--,this.count===0){if(this.stylesheets)he(this,this.stylesheets);else if(this.unsuspend){var P=this.unsuspend;this.unsuspend=null,P()}}}function he(P,C){P.stylesheets=null,P.unsuspend!==null&&(P.count++,zq=new Map,C.forEach(Te,P),zq=null,te.call(P))}function Te(P,C){if(!(C.state.loading&n4)){var k=zq.get(P);if(k)var W=k.get(A4e);else{k=new Map,zq.set(P,k);for(var Z=P.querySelectorAll("link[data-precedence],style[data-precedence]"),le=0;le<Z.length;le++){var Le=Z[le];(Le.nodeName==="LINK"||Le.getAttribute("media")!=="not all")&&(k.set(Le.dataset.precedence,Le),W=Le)}W&&k.set(A4e,W)}Z=C.instance,Le=Z.getAttribute("data-precedence"),le=k.get(Le)||W,le===W&&k.set(A4e,Z),k.set(Le,Z),this.count++,W=te.bind(this),Z.addEventListener("load",W),Z.addEventListener("error",W),le?le.parentNode.insertBefore(Z,le.nextSibling):(P=P.nodeType===9?P.head:P,P.insertBefore(Z,P.firstChild)),C.state.loading|=n4}}function Fe(P,C,k,W,Z,le,Le,qe){for(this.tag=1,this.containerInfo=P,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=AC,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=we(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=we(0),this.hiddenUpdates=we(null),this.identifierPrefix=W,this.onUncaughtError=Z,this.onCaughtError=le,this.onRecoverableError=Le,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=qe,this.incompleteTransitions=new Map,this.passiveEffectDuration=this.effectDuration=-0,this.memoizedUpdaters=new Set,P=this.pendingUpdatersLaneMap=[],C=0;31>C;C++)P.push(new Set);this._debugRootType=k?"hydrateRoot()":"createRoot()"}function mt(P,C,k,W,Z,le,Le,qe,dt,yt,mn,vn){return P=new Fe(P,C,k,Le,qe,dt,yt,vn),C=II,le===!0&&(C|=o_|Jf),qa&&(C|=Oc),le=m(3,null,null,C),P.current=le,le.stateNode=P,C=hl(),n0(C),P.pooledCache=C,n0(C),le.memoizedState={element:W,isDehydrated:k,cache:C},Wc(le),P}function Tt(P){return P?(P=Wm,P):Wm}function jt(P,C,k,W,Z,le){if(Wl&&typeof Wl.onScheduleFiberRoot=="function")try{Wl.onScheduleFiberRoot(Mu,W,k)}catch(Le){W0||(W0=!0,console.error("React instrumentation encountered an error: %s",Le))}po!==null&&typeof po.markRenderScheduled=="function"&&po.markRenderScheduled(C),Z=Tt(Z),W.context===null?W.context=Z:W.pendingContext=Z,j0&&t_!==null&&!b1t&&(b1t=!0,console.error(`Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.
|
|
192
192
|
|
|
193
|
-
Check the render method of %s.`,A(t_)||"Unknown")),W=P_(C),W.payload={element:k},le=le===void 0?null:le,le!==null&&(typeof le!="function"&&console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",le),W.callback=le),k=Rc(P,W,C),k!==null&&(Zs(k,P,C),Od(k,P,C))}function Yn(P,C){if(P=P.memoizedState,P!==null&&P.dehydrated!==null){var k=P.retryLane;P.retryLane=k!==0&&k<C?k:C}}function Zn(P,C){Yn(P,C),(P=P.alternate)&&Yn(P,C)}function ho(P){if(P.tag===13){var C=k0(P,67108864);C!==null&&Zs(C,P,67108864),Zn(P,67108864)}}function go(){return t_}function mi(){for(var P=new Map,C=1,k=0;31>k;k++){var W=Ye(C);P.set(C,W),C*=2}return P}function pd(P,C,k,W){var Z=an.T;an.T=null;var le=Or.p;try{Or.p=U0,p0(P,C,k,W)}finally{Or.p=le,an.T=Z}}function kp(P,C,k,W){var Z=an.T;an.T=null;var le=Or.p;try{Or.p=N_,p0(P,C,k,W)}finally{Or.p=le,an.T=Z}}function p0(P,C,k,W){if($q){var Z=on(W);if(Z===null)vu(P,C,W,Wq,k),Wn(P,W);else if(rs(Z,P,C,k,W))W.stopPropagation();else if(Wn(P,W),C&4&&-1<Iro.indexOf(P)){for(;Z!==null;){var le=Wt(Z);if(le!==null)switch(le.tag){case 3:if(le=le.stateNode,le.current.memoizedState.isDehydrated){var Le=Oe(le.pendingLanes);if(Le!==0){var qe=le;for(qe.pendingLanes|=2,qe.entangledLanes|=2;Le;){var dt=1<<31-Jc(Le);qe.entanglements[1]|=dt,Le&=~dt}d0(le),(Fc&(px|o6))===Wy&&(Tq=Uh()+Qft,qd(0))}}break;case 13:qe=k0(le,2),qe!==null&&Zs(qe,le,2),L1(),Zn(le,2)}if(le=on(W),le===null&&vu(P,C,W,Wq,k),le===Z)break;Z=le}Z!==null&&W.stopPropagation()}else vu(P,C,W,null,k)}}function on(P){return P=U_(P),Ut(P)}function Ut(P){if(Wq=null,P=Dt(P),P!==null){var C=g(P);if(C===null)P=null;else{var k=C.tag;if(k===13){if(P=y(C),P!==null)return P;P=null}else if(k===3){if(C.stateNode.current.memoizedState.isDehydrated)return C.tag===3?C.stateNode.containerInfo:null;P=null}else C!==P&&(P=null)}}return Wq=P,null}function dn(P){switch(P){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return U0;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return N_;case"message":switch(X1()){case j1:return U0;case Lp:return N_;case pg:case Oy:return Xh;case j4:return xg;default:return Xh}default:return Xh}}function Wn(P,C){switch(P){case"focusin":case"focusout":S7=null;break;case"dragenter":case"dragleave":C7=null;break;case"mouseover":case"mouseout":M7=null;break;case"pointerover":case"pointerout":iL.delete(C.pointerId);break;case"gotpointercapture":case"lostpointercapture":sL.delete(C.pointerId)}}function uo(P,C,k,W,Z,le){return P===null||P.nativeEvent!==le?(P={blockedOn:C,domEventName:k,eventSystemFlags:W,nativeEvent:le,targetContainers:[Z]},C!==null&&(C=Wt(C),C!==null&&ho(C)),P):(P.eventSystemFlags|=W,C=P.targetContainers,Z!==null&&C.indexOf(Z)===-1&&C.push(Z),P)}function rs(P,C,k,W,Z){switch(C){case"focusin":return S7=uo(S7,P,C,k,W,Z),!0;case"dragenter":return C7=uo(C7,P,C,k,W,Z),!0;case"mouseover":return M7=uo(M7,P,C,k,W,Z),!0;case"pointerover":var le=Z.pointerId;return iL.set(le,uo(iL.get(le)||null,P,C,k,W,Z)),!0;case"gotpointercapture":return le=Z.pointerId,sL.set(le,uo(sL.get(le)||null,P,C,k,W,Z)),!0}return!1}function ur(P){var C=Dt(P.target);if(C!==null){var k=g(C);if(k!==null){if(C=k.tag,C===13){if(C=y(k),C!==null){P.blockedOn=C,$t(P.priority,function(){if(k.tag===13){var W=bu(k);W=at(W);var Z=k0(k,W);Z!==null&&Zs(Z,k,W),Zn(k,W)}});return}}else if(C===3&&k.stateNode.current.memoizedState.isDehydrated){P.blockedOn=k.tag===3?k.stateNode.containerInfo:null;return}}}P.blockedOn=null}function ci(P){if(P.blockedOn!==null)return!1;for(var C=P.targetContainers;0<C.length;){var k=on(P.nativeEvent);if(k===null){k=P.nativeEvent;var W=new k.constructor(k.type,k),Z=W;ue!==null&&console.error("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."),ue=Z,k.target.dispatchEvent(W),ue===null&&console.error("Expected currently replaying event to not be null. This error is likely caused by a bug in React. Please file an issue."),ue=null}else return C=Wt(k),C!==null&&ho(C),P.blockedOn=k,!1;C.shift()}return!0}function Gr(P,C,k){ci(P)&&k.delete(C)}function Ki(){R4e=!1,S7!==null&&ci(S7)&&(S7=null),C7!==null&&ci(C7)&&(C7=null),M7!==null&&ci(M7)&&(M7=null),iL.forEach(Gr),sL.forEach(Gr)}function f0(P,C){P.blockedOn===C&&(P.blockedOn=null,R4e||(R4e=!0,zi.unstable_scheduleCallback(zi.unstable_NormalPriority,Ki)))}function Hy(P){Uq!==P&&(Uq=P,zi.unstable_scheduleCallback(zi.unstable_NormalPriority,function(){Uq===P&&(Uq=null);for(var C=0;C<P.length;C+=3){var k=P[C],W=P[C+1],Z=P[C+2];if(typeof W!="function"){if(Ut(W||k)===null)continue;break}var le=Wt(k);le!==null&&(P.splice(C,3),C-=3,k={pending:!0,data:Z,method:k.method,action:W},Object.freeze(k),E1(le,k,W,Z))}}))}function _g(P){function C(dt){return f0(dt,P)}S7!==null&&f0(S7,P),C7!==null&&f0(C7,P),M7!==null&&f0(M7,P),iL.forEach(C),sL.forEach(C);for(var k=0;k<T7.length;k++){var W=T7[k];W.blockedOn===P&&(W.blockedOn=null)}for(;0<T7.length&&(k=T7[0],k.blockedOn===null);)ur(k),k.blockedOn===null&&T7.shift();if(k=(P.ownerDocument||P).$$reactFormReplay,k!=null)for(W=0;W<k.length;W+=3){var Z=k[W],le=k[W+1],Le=Z[Ja]||null;if(typeof le=="function")Le||Hy(k);else if(Le){var qe=null;if(le&&le.hasAttribute("formAction")){if(Z=le,Le=le[Ja]||null)qe=Le.formAction;else if(Ut(Z)!==null)continue}else qe=Le.action;typeof qe=="function"?k[W+1]=qe:(k.splice(W,3),W-=3),Hy(k)}}}function Np(P){this._internalRoot=P}function Wh(P){this._internalRoot=P}function R_(P){P[Kc]&&(P._reactRootContainer?console.error("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported."):console.error("You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it."))}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var zi=vL(),Qi=Tg(),ox=Jq(),Lr=Object.assign,Fm=Symbol.for("react.element"),Cu=Symbol.for("react.transitional.element"),Vf=Symbol.for("react.portal"),Di=Symbol.for("react.fragment"),Iy=Symbol.for("react.strict_mode"),Ly=Symbol.for("react.profiler"),ib=Symbol.for("react.provider"),Zu=Symbol.for("react.consumer"),fs=Symbol.for("react.context"),Bm=Symbol.for("react.forward_ref"),dg=Symbol.for("react.suspense"),$1=Symbol.for("react.suspense_list"),hg=Symbol.for("react.memo"),k_=Symbol.for("react.lazy"),$f=Symbol.for("react.activity"),rx=Symbol.for("react.memo_cache_sentinel"),sb=Symbol.iterator,E3=Symbol.for("react.client.reference"),gi=Array.isArray,an=Qi.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Or=ox.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,D3=Object.freeze({pending:!1,data:null,method:null,action:null}),e_=[],Wf=[],Qd=-1,Hp=I(null),W1=I(null),fd=I(null),ix=I(null),Ip=Object.prototype.hasOwnProperty,mg=zi.unstable_scheduleCallback,q5=zi.unstable_cancelCallback,U1=zi.unstable_shouldYield,A3=zi.unstable_requestPaint,Uh=zi.unstable_now,X1=zi.unstable_getCurrentPriorityLevel,j1=zi.unstable_ImmediatePriority,Lp=zi.unstable_UserBlockingPriority,pg=zi.unstable_NormalPriority,Oy=zi.unstable_LowPriority,j4=zi.unstable_IdlePriority,Uf=zi.log,Zd=zi.unstable_setDisableYieldValue,Mu=null,Wl=null,po=null,W0=!1,qa=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u",Jc=Math.clz32?Math.clz32:fe,G1=Math.log,Op=Math.LN2,fg=256,J5=4194304,U0=2,N_=8,Xh=32,xg=268435456,X0=Math.random().toString(36).slice(2),cc="__reactFiber$"+X0,Ja="__reactProps$"+X0,Kc="__reactContainer$"+X0,Ul="__reactEvents$"+X0,zm="__reactListeners$"+X0,Xf="__reactHandles$"+X0,gg="__reactResources$"+X0,sx="__reactMarker$"+X0,ab=new Set,Vm={},ax={},cx={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},G4=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),K5={},Q5={},$m=0,lx,ux,R3,Y4,_x,cb,dx;Tn.__reactDisabledLog=!0;var Fr,ta,Sc=!1,jf=new(typeof WeakMap=="function"?WeakMap:Map),t_=null,j0=!1,Fy=/[\n"\\]/g,eh=!1,jh=!1,H_=!1,By=!1,fn=!1,J=!1,X=["value","defaultValue"],se=!1,Se=/["'&<>\n\t]|^\s|\s$/,$e="address applet area article aside base basefont bgsound blockquote body br button caption center col colgroup dd details dir div dl dt embed fieldset figcaption figure footer form frame frameset h1 h2 h3 h4 h5 h6 head header hgroup hr html iframe img input isindex li link listing main marquee menu menuitem meta nav noembed noframes noscript object ol p param plaintext pre script section select source style summary table tbody td template textarea tfoot th thead title tr track ul wbr xmp".split(" "),Ze="applet caption html table td th marquee object template foreignObject desc title".split(" "),_t=Ze.concat(["button"]),bt="dd dt li option optgroup p rp rt".split(" "),vt={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null,containerTagInScope:null,implicitRootScope:!1},Ht={},gn={animation:"animationDelay animationDirection animationDuration animationFillMode animationIterationCount animationName animationPlayState animationTimingFunction".split(" "),background:"backgroundAttachment backgroundClip backgroundColor backgroundImage backgroundOrigin backgroundPositionX backgroundPositionY backgroundRepeat backgroundSize".split(" "),backgroundPosition:["backgroundPositionX","backgroundPositionY"],border:"borderBottomColor borderBottomStyle borderBottomWidth borderImageOutset borderImageRepeat borderImageSlice borderImageSource borderImageWidth borderLeftColor borderLeftStyle borderLeftWidth borderRightColor borderRightStyle borderRightWidth borderTopColor borderTopStyle borderTopWidth".split(" "),borderBlockEnd:["borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth"],borderBlockStart:["borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth"],borderBottom:["borderBottomColor","borderBottomStyle","borderBottomWidth"],borderColor:["borderBottomColor","borderLeftColor","borderRightColor","borderTopColor"],borderImage:["borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth"],borderInlineEnd:["borderInlineEndColor","borderInlineEndStyle","borderInlineEndWidth"],borderInlineStart:["borderInlineStartColor","borderInlineStartStyle","borderInlineStartWidth"],borderLeft:["borderLeftColor","borderLeftStyle","borderLeftWidth"],borderRadius:["borderBottomLeftRadius","borderBottomRightRadius","borderTopLeftRadius","borderTopRightRadius"],borderRight:["borderRightColor","borderRightStyle","borderRightWidth"],borderStyle:["borderBottomStyle","borderLeftStyle","borderRightStyle","borderTopStyle"],borderTop:["borderTopColor","borderTopStyle","borderTopWidth"],borderWidth:["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth"],columnRule:["columnRuleColor","columnRuleStyle","columnRuleWidth"],columns:["columnCount","columnWidth"],flex:["flexBasis","flexGrow","flexShrink"],flexFlow:["flexDirection","flexWrap"],font:"fontFamily fontFeatureSettings fontKerning fontLanguageOverride fontSize fontSizeAdjust fontStretch fontStyle fontVariant fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition fontWeight lineHeight".split(" "),fontVariant:"fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition".split(" "),gap:["columnGap","rowGap"],grid:"gridAutoColumns gridAutoFlow gridAutoRows gridTemplateAreas gridTemplateColumns gridTemplateRows".split(" "),gridArea:["gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart"],gridColumn:["gridColumnEnd","gridColumnStart"],gridColumnGap:["columnGap"],gridGap:["columnGap","rowGap"],gridRow:["gridRowEnd","gridRowStart"],gridRowGap:["rowGap"],gridTemplate:["gridTemplateAreas","gridTemplateColumns","gridTemplateRows"],listStyle:["listStyleImage","listStylePosition","listStyleType"],margin:["marginBottom","marginLeft","marginRight","marginTop"],marker:["markerEnd","markerMid","markerStart"],mask:"maskClip maskComposite maskImage maskMode maskOrigin maskPositionX maskPositionY maskRepeat maskSize".split(" "),maskPosition:["maskPositionX","maskPositionY"],outline:["outlineColor","outlineStyle","outlineWidth"],overflow:["overflowX","overflowY"],padding:["paddingBottom","paddingLeft","paddingRight","paddingTop"],placeContent:["alignContent","justifyContent"],placeItems:["alignItems","justifyItems"],placeSelf:["alignSelf","justifySelf"],textDecoration:["textDecorationColor","textDecorationLine","textDecorationStyle"],textEmphasis:["textEmphasisColor","textEmphasisStyle"],transition:["transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction"],wordWrap:["overflowWrap"]},Hn=/([A-Z])/g,eo=/^ms-/,vo=/^(?:webkit|moz|o)[A-Z]/,Xo=/^-ms-/,yr=/-(.)/g,Ai=/;\s*$/,Io={},To={},fo=!1,_r=!1,na=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" ")),xd="http://www.w3.org/1998/Math/MathML",Gh="http://www.w3.org/2000/svg",Y1=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Fp={accept:"accept",acceptcharset:"acceptCharset","accept-charset":"acceptCharset",accesskey:"accessKey",action:"action",allowfullscreen:"allowFullScreen",alt:"alt",as:"as",async:"async",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",capture:"capture",cellpadding:"cellPadding",cellspacing:"cellSpacing",challenge:"challenge",charset:"charSet",checked:"checked",children:"children",cite:"cite",class:"className",classid:"classID",classname:"className",cols:"cols",colspan:"colSpan",content:"content",contenteditable:"contentEditable",contextmenu:"contextMenu",controls:"controls",controlslist:"controlsList",coords:"coords",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",data:"data",datetime:"dateTime",default:"default",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",defer:"defer",dir:"dir",disabled:"disabled",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback",download:"download",draggable:"draggable",enctype:"encType",enterkeyhint:"enterKeyHint",fetchpriority:"fetchPriority",for:"htmlFor",form:"form",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",headers:"headers",height:"height",hidden:"hidden",high:"high",href:"href",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",id:"id",imagesizes:"imageSizes",imagesrcset:"imageSrcSet",inert:"inert",innerhtml:"innerHTML",inputmode:"inputMode",integrity:"integrity",is:"is",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",kind:"kind",label:"label",lang:"lang",list:"list",loop:"loop",low:"low",manifest:"manifest",marginwidth:"marginWidth",marginheight:"marginHeight",max:"max",maxlength:"maxLength",media:"media",mediagroup:"mediaGroup",method:"method",min:"min",minlength:"minLength",multiple:"multiple",muted:"muted",name:"name",nomodule:"noModule",nonce:"nonce",novalidate:"noValidate",open:"open",optimum:"optimum",pattern:"pattern",placeholder:"placeholder",playsinline:"playsInline",poster:"poster",preload:"preload",profile:"profile",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rel:"rel",required:"required",reversed:"reversed",role:"role",rows:"rows",rowspan:"rowSpan",sandbox:"sandbox",scope:"scope",scoped:"scoped",scrolling:"scrolling",seamless:"seamless",selected:"selected",shape:"shape",size:"size",sizes:"sizes",span:"span",spellcheck:"spellCheck",src:"src",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",start:"start",step:"step",style:"style",summary:"summary",tabindex:"tabIndex",target:"target",title:"title",type:"type",usemap:"useMap",value:"value",width:"width",wmode:"wmode",wrap:"wrap",about:"about",accentheight:"accentHeight","accent-height":"accentHeight",accumulate:"accumulate",additive:"additive",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",alphabetic:"alphabetic",amplitude:"amplitude",arabicform:"arabicForm","arabic-form":"arabicForm",ascent:"ascent",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",azimuth:"azimuth",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",bbox:"bbox",begin:"begin",bias:"bias",by:"by",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clip:"clip",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",color:"color",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",cursor:"cursor",cx:"cx",cy:"cy",d:"d",datatype:"datatype",decelerate:"decelerate",descent:"descent",diffuseconstant:"diffuseConstant",direction:"direction",display:"display",divisor:"divisor",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",dur:"dur",dx:"dx",dy:"dy",edgemode:"edgeMode",elevation:"elevation",enablebackground:"enableBackground","enable-background":"enableBackground",end:"end",exponent:"exponent",externalresourcesrequired:"externalResourcesRequired",fill:"fill",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filter:"filter",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",focusable:"focusable",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",format:"format",from:"from",fx:"fx",fy:"fy",g1:"g1",g2:"g2",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",hanging:"hanging",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",ideographic:"ideographic",imagerendering:"imageRendering","image-rendering":"imageRendering",in2:"in2",in:"in",inlist:"inlist",intercept:"intercept",k1:"k1",k2:"k2",k3:"k3",k4:"k4",k:"k",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",kerning:"kerning",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",local:"local",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",mask:"mask",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",mathematical:"mathematical",mode:"mode",numoctaves:"numOctaves",offset:"offset",opacity:"opacity",operator:"operator",order:"order",orient:"orient",orientation:"orientation",origin:"origin",overflow:"overflow",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder",panose1:"panose1","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",points:"points",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",popover:"popover",popovertarget:"popoverTarget",popovertargetaction:"popoverTargetAction",prefix:"prefix",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",property:"property",r:"r",radius:"radius",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",resource:"resource",restart:"restart",result:"result",results:"results",rotate:"rotate",rx:"rx",ry:"ry",scale:"scale",security:"security",seed:"seed",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",slope:"slope",spacing:"spacing",specularconstant:"specularConstant",specularexponent:"specularExponent",speed:"speed",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stemh:"stemh",stemv:"stemv",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",string:"string",stroke:"stroke",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",to:"to",transform:"transform",transformorigin:"transformOrigin","transform-origin":"transformOrigin",typeof:"typeof",u1:"u1",u2:"u2",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicode:"unicode",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",values:"values",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",version:"version",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",visibility:"visibility",vmathematical:"vMathematical","v-mathematical":"vMathematical",vocab:"vocab",widths:"widths",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",x1:"x1",x2:"x2",x:"x",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang",xmlns:"xmlns","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",y1:"y1",y2:"y2",y:"y",ychannelselector:"yChannelSelector",z:"z",zoomandpan:"zoomAndPan"},q1={"aria-current":0,"aria-description":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0},th={},J1=RegExp("^(aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Gf=RegExp("^(aria)[A-Z][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),K1=!1,nr={},Yf=/^on./,E=/^on[^A-Z]/,N=RegExp("^(aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),$=RegExp("^(aria)[A-Z][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Q=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i,ue=null,ve=null,Qe=null,st=!1,St=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Gt=!1;if(St)try{var un={};Object.defineProperty(un,"passive",{get:function(){Gt=!0}}),window.addEventListener("test",un,un),window.removeEventListener("test",un,un)}catch{Gt=!1}var kn=null,tn=null,ln=null,or={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(P){return P.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Zo=mc(or),is=Lr({},or,{view:0,detail:0}),Yt=mc(is),It,rn,Ln,jo=Lr({},is,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:kd,button:0,buttons:0,relatedTarget:function(P){return P.relatedTarget===void 0?P.fromElement===P.srcElement?P.toElement:P.fromElement:P.relatedTarget},movementX:function(P){return"movementX"in P?P.movementX:(P!==Ln&&(Ln&&P.type==="mousemove"?(It=P.screenX-Ln.screenX,rn=P.screenY-Ln.screenY):rn=It=0,Ln=P),It)},movementY:function(P){return"movementY"in P?P.movementY:rn}}),ss=mc(jo),Mr=Lr({},jo,{dataTransfer:0}),Nr=mc(Mr),n_=Lr({},is,{relatedTarget:0}),js=mc(n_),Pl=Lr({},or,{animationName:0,elapsedTime:0,pseudoElement:0}),cD=mc(Pl),lq=Lr({},or,{clipboardData:function(P){return"clipboardData"in P?P.clipboardData:window.clipboardData}}),uq=mc(lq),_q=Lr({},or,{data:0}),lb=mc(_q),dq=lb,RI={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},kI={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},hq={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},mq=Lr({},is,{key:function(P){if(P.key){var C=RI[P.key]||P.key;if(C!=="Unidentified")return C}return P.type==="keypress"?(P=Hu(P),P===13?"Enter":String.fromCharCode(P)):P.type==="keydown"||P.type==="keyup"?kI[P.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:kd,charCode:function(P){return P.type==="keypress"?Hu(P):0},keyCode:function(P){return P.type==="keydown"||P.type==="keyup"?P.keyCode:0},which:function(P){return P.type==="keypress"?Hu(P):P.type==="keydown"||P.type==="keyup"?P.keyCode:0}}),q4=mc(mq),I_=Lr({},jo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),lD=mc(I_),pq=Lr({},is,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:kd}),Yh=mc(pq),Jv=Lr({},or,{propertyName:0,elapsedTime:0,pseudoElement:0}),Kv=mc(Jv),gd=Lr({},jo,{deltaX:function(P){return"deltaX"in P?P.deltaX:"wheelDeltaX"in P?-P.wheelDeltaX:0},deltaY:function(P){return"deltaY"in P?P.deltaY:"wheelDeltaY"in P?-P.wheelDeltaY:"wheelDelta"in P?-P.wheelDelta:0},deltaZ:0,deltaMode:0}),Q1=mc(gd),zy=Lr({},or,{newState:0,oldState:0}),Qv=mc(zy),J5e=[9,13,27,32],_C=229,Zv=St&&"CompositionEvent"in window,k3=null;St&&"documentMode"in document&&(k3=document.documentMode);var uD=St&&"TextEvent"in window&&!k3,dC=St&&(!Zv||k3&&8<k3&&11>=k3),e7=32,hC=String.fromCharCode(e7),fq=!1,yd=!1,Bp={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0},zp=null,hx=null,t7=!1;St&&(t7=G_("input")&&(!document.documentMode||9<document.documentMode));var bd=typeof Object.is=="function"?Object.is:Xn,NI=St&&"documentMode"in document&&11>=document.documentMode,yg=null,n7=null,o7=null,Ws=!1,Ka={animationend:_p("Animation","AnimationEnd"),animationiteration:_p("Animation","AnimationIteration"),animationstart:_p("Animation","AnimationStart"),transitionrun:_p("Transition","TransitionRun"),transitionstart:_p("Transition","TransitionStart"),transitioncancel:_p("Transition","TransitionCancel"),transitionend:_p("Transition","TransitionEnd")},xs={},ks={};St&&(ks=document.createElement("div").style,"AnimationEvent"in window||(delete Ka.animationend.animation,delete Ka.animationiteration.animation,delete Ka.animationstart.animation),"TransitionEvent"in window||delete Ka.transitionend.transition);var qf=e0("animationend"),r7=e0("animationiteration"),N3=e0("animationstart"),mC=e0("transitionrun"),xq=e0("transitionstart"),HI=e0("transitioncancel"),ub=e0("transitionend"),i7=new Map,pC="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");pC.push("scrollEnd");var J4=new WeakMap,Oa=1,L_=2,nh=[],Vy=0,fC=0,Wm={};Object.freeze(Wm);var Fa=null,mx=null,Ba=0,II=1,Oc=2,o_=8,Jf=16,Vp=64,xC=!1;try{var _D=Object.preventExtensions({})}catch{xC=!0}var _b=[],Z5=0,s7=null,H3=0,oh=[],bg=0,db=null,K4=1,Kf="",$p=null,Tu=null,ha=!1,Q4=!1,Z1=null,wu=null,Um=!1,I3=Error("Hydration Mismatch Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."),Z4=0;if(typeof performance=="object"&&typeof performance.now=="function")var LI=performance,dD=function(){return LI.now()};else{var gq=Date;dD=function(){return gq.now()}}var OI=I(null),hb=I(null),hD={},a7=null,e6=null,c7=!1,mb=typeof AbortController<"u"?AbortController:function(){var P=[],C=this.signal={aborted:!1,addEventListener:function(k,W){P.push(W)}};this.abort=function(){C.aborted=!0,P.forEach(function(k){return k()})}},gC=zi.unstable_scheduleCallback,l7=zi.unstable_NormalPriority,r_={$$typeof:fs,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0,_currentRenderer:null,_currentRenderer2:null},pb=zi.unstable_now,FI=-0,mD=-0,x0=-1.1,Pg=-0,yC=!1,bC=!1,u7=null,pD=0,L3=0,fb=null,BI=an.S;an.S=function(P,C){typeof C=="object"&&C!==null&&typeof C.then=="function"&&V5(P,C),BI!==null&&BI(P,C)};var O3=I(null),vg={recordUnsafeLifecycleWarnings:function(){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}},_7=[],d7=[],h7=[],m7=[],T=[],R=[],U=new Set;vg.recordUnsafeLifecycleWarnings=function(P,C){U.has(P.type)||(typeof C.componentWillMount=="function"&&C.componentWillMount.__suppressDeprecationWarning!==!0&&_7.push(P),P.mode&o_&&typeof C.UNSAFE_componentWillMount=="function"&&d7.push(P),typeof C.componentWillReceiveProps=="function"&&C.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&h7.push(P),P.mode&o_&&typeof C.UNSAFE_componentWillReceiveProps=="function"&&m7.push(P),typeof C.componentWillUpdate=="function"&&C.componentWillUpdate.__suppressDeprecationWarning!==!0&&T.push(P),P.mode&o_&&typeof C.UNSAFE_componentWillUpdate=="function"&&R.push(P))},vg.flushPendingUnsafeLifecycleWarnings=function(){var P=new Set;0<_7.length&&(_7.forEach(function(qe){P.add(A(qe)||"Component"),U.add(qe.type)}),_7=[]);var C=new Set;0<d7.length&&(d7.forEach(function(qe){C.add(A(qe)||"Component"),U.add(qe.type)}),d7=[]);var k=new Set;0<h7.length&&(h7.forEach(function(qe){k.add(A(qe)||"Component"),U.add(qe.type)}),h7=[]);var W=new Set;0<m7.length&&(m7.forEach(function(qe){W.add(A(qe)||"Component"),U.add(qe.type)}),m7=[]);var Z=new Set;0<T.length&&(T.forEach(function(qe){Z.add(A(qe)||"Component"),U.add(qe.type)}),T=[]);var le=new Set;if(0<R.length&&(R.forEach(function(qe){le.add(A(qe)||"Component"),U.add(qe.type)}),R=[]),0<C.size){var Le=d(C);console.error(`Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
193
|
+
Check the render method of %s.`,A(t_)||"Unknown")),W=P_(C),W.payload={element:k},le=le===void 0?null:le,le!==null&&(typeof le!="function"&&console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",le),W.callback=le),k=Rc(P,W,C),k!==null&&(Zs(k,P,C),Od(k,P,C))}function Yn(P,C){if(P=P.memoizedState,P!==null&&P.dehydrated!==null){var k=P.retryLane;P.retryLane=k!==0&&k<C?k:C}}function Zn(P,C){Yn(P,C),(P=P.alternate)&&Yn(P,C)}function ho(P){if(P.tag===13){var C=k0(P,67108864);C!==null&&Zs(C,P,67108864),Zn(P,67108864)}}function go(){return t_}function mi(){for(var P=new Map,C=1,k=0;31>k;k++){var W=Ye(C);P.set(C,W),C*=2}return P}function pd(P,C,k,W){var Z=an.T;an.T=null;var le=Or.p;try{Or.p=U0,p0(P,C,k,W)}finally{Or.p=le,an.T=Z}}function kp(P,C,k,W){var Z=an.T;an.T=null;var le=Or.p;try{Or.p=N_,p0(P,C,k,W)}finally{Or.p=le,an.T=Z}}function p0(P,C,k,W){if($q){var Z=on(W);if(Z===null)vu(P,C,W,Wq,k),Wn(P,W);else if(rs(Z,P,C,k,W))W.stopPropagation();else if(Wn(P,W),C&4&&-1<Lro.indexOf(P)){for(;Z!==null;){var le=Wt(Z);if(le!==null)switch(le.tag){case 3:if(le=le.stateNode,le.current.memoizedState.isDehydrated){var Le=Oe(le.pendingLanes);if(Le!==0){var qe=le;for(qe.pendingLanes|=2,qe.entangledLanes|=2;Le;){var dt=1<<31-Jc(Le);qe.entanglements[1]|=dt,Le&=~dt}d0(le),(Fc&(px|o6))===Wy&&(Tq=Uh()+Qft,qd(0))}}break;case 13:qe=k0(le,2),qe!==null&&Zs(qe,le,2),L1(),Zn(le,2)}if(le=on(W),le===null&&vu(P,C,W,Wq,k),le===Z)break;Z=le}Z!==null&&W.stopPropagation()}else vu(P,C,W,null,k)}}function on(P){return P=U_(P),Ut(P)}function Ut(P){if(Wq=null,P=Dt(P),P!==null){var C=g(P);if(C===null)P=null;else{var k=C.tag;if(k===13){if(P=y(C),P!==null)return P;P=null}else if(k===3){if(C.stateNode.current.memoizedState.isDehydrated)return C.tag===3?C.stateNode.containerInfo:null;P=null}else C!==P&&(P=null)}}return Wq=P,null}function dn(P){switch(P){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return U0;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return N_;case"message":switch(X1()){case j1:return U0;case Lp:return N_;case pg:case Oy:return Xh;case j4:return xg;default:return Xh}default:return Xh}}function Wn(P,C){switch(P){case"focusin":case"focusout":S7=null;break;case"dragenter":case"dragleave":C7=null;break;case"mouseover":case"mouseout":M7=null;break;case"pointerover":case"pointerout":iL.delete(C.pointerId);break;case"gotpointercapture":case"lostpointercapture":sL.delete(C.pointerId)}}function uo(P,C,k,W,Z,le){return P===null||P.nativeEvent!==le?(P={blockedOn:C,domEventName:k,eventSystemFlags:W,nativeEvent:le,targetContainers:[Z]},C!==null&&(C=Wt(C),C!==null&&ho(C)),P):(P.eventSystemFlags|=W,C=P.targetContainers,Z!==null&&C.indexOf(Z)===-1&&C.push(Z),P)}function rs(P,C,k,W,Z){switch(C){case"focusin":return S7=uo(S7,P,C,k,W,Z),!0;case"dragenter":return C7=uo(C7,P,C,k,W,Z),!0;case"mouseover":return M7=uo(M7,P,C,k,W,Z),!0;case"pointerover":var le=Z.pointerId;return iL.set(le,uo(iL.get(le)||null,P,C,k,W,Z)),!0;case"gotpointercapture":return le=Z.pointerId,sL.set(le,uo(sL.get(le)||null,P,C,k,W,Z)),!0}return!1}function ur(P){var C=Dt(P.target);if(C!==null){var k=g(C);if(k!==null){if(C=k.tag,C===13){if(C=y(k),C!==null){P.blockedOn=C,$t(P.priority,function(){if(k.tag===13){var W=bu(k);W=at(W);var Z=k0(k,W);Z!==null&&Zs(Z,k,W),Zn(k,W)}});return}}else if(C===3&&k.stateNode.current.memoizedState.isDehydrated){P.blockedOn=k.tag===3?k.stateNode.containerInfo:null;return}}}P.blockedOn=null}function ci(P){if(P.blockedOn!==null)return!1;for(var C=P.targetContainers;0<C.length;){var k=on(P.nativeEvent);if(k===null){k=P.nativeEvent;var W=new k.constructor(k.type,k),Z=W;ue!==null&&console.error("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."),ue=Z,k.target.dispatchEvent(W),ue===null&&console.error("Expected currently replaying event to not be null. This error is likely caused by a bug in React. Please file an issue."),ue=null}else return C=Wt(k),C!==null&&ho(C),P.blockedOn=k,!1;C.shift()}return!0}function Gr(P,C,k){ci(P)&&k.delete(C)}function Ki(){R4e=!1,S7!==null&&ci(S7)&&(S7=null),C7!==null&&ci(C7)&&(C7=null),M7!==null&&ci(M7)&&(M7=null),iL.forEach(Gr),sL.forEach(Gr)}function f0(P,C){P.blockedOn===C&&(P.blockedOn=null,R4e||(R4e=!0,zi.unstable_scheduleCallback(zi.unstable_NormalPriority,Ki)))}function Hy(P){Uq!==P&&(Uq=P,zi.unstable_scheduleCallback(zi.unstable_NormalPriority,function(){Uq===P&&(Uq=null);for(var C=0;C<P.length;C+=3){var k=P[C],W=P[C+1],Z=P[C+2];if(typeof W!="function"){if(Ut(W||k)===null)continue;break}var le=Wt(k);le!==null&&(P.splice(C,3),C-=3,k={pending:!0,data:Z,method:k.method,action:W},Object.freeze(k),E1(le,k,W,Z))}}))}function _g(P){function C(dt){return f0(dt,P)}S7!==null&&f0(S7,P),C7!==null&&f0(C7,P),M7!==null&&f0(M7,P),iL.forEach(C),sL.forEach(C);for(var k=0;k<T7.length;k++){var W=T7[k];W.blockedOn===P&&(W.blockedOn=null)}for(;0<T7.length&&(k=T7[0],k.blockedOn===null);)ur(k),k.blockedOn===null&&T7.shift();if(k=(P.ownerDocument||P).$$reactFormReplay,k!=null)for(W=0;W<k.length;W+=3){var Z=k[W],le=k[W+1],Le=Z[Ja]||null;if(typeof le=="function")Le||Hy(k);else if(Le){var qe=null;if(le&&le.hasAttribute("formAction")){if(Z=le,Le=le[Ja]||null)qe=Le.formAction;else if(Ut(Z)!==null)continue}else qe=Le.action;typeof qe=="function"?k[W+1]=qe:(k.splice(W,3),W-=3),Hy(k)}}}function Np(P){this._internalRoot=P}function Wh(P){this._internalRoot=P}function R_(P){P[Kc]&&(P._reactRootContainer?console.error("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported."):console.error("You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it."))}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var zi=vL(),Qi=Tg(),ox=Jq(),Lr=Object.assign,Fm=Symbol.for("react.element"),Cu=Symbol.for("react.transitional.element"),Vf=Symbol.for("react.portal"),Di=Symbol.for("react.fragment"),Iy=Symbol.for("react.strict_mode"),Ly=Symbol.for("react.profiler"),ib=Symbol.for("react.provider"),Zu=Symbol.for("react.consumer"),fs=Symbol.for("react.context"),Bm=Symbol.for("react.forward_ref"),dg=Symbol.for("react.suspense"),$1=Symbol.for("react.suspense_list"),hg=Symbol.for("react.memo"),k_=Symbol.for("react.lazy"),$f=Symbol.for("react.activity"),rx=Symbol.for("react.memo_cache_sentinel"),sb=Symbol.iterator,E3=Symbol.for("react.client.reference"),gi=Array.isArray,an=Qi.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Or=ox.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,D3=Object.freeze({pending:!1,data:null,method:null,action:null}),e_=[],Wf=[],Qd=-1,Hp=I(null),W1=I(null),fd=I(null),ix=I(null),Ip=Object.prototype.hasOwnProperty,mg=zi.unstable_scheduleCallback,q5=zi.unstable_cancelCallback,U1=zi.unstable_shouldYield,A3=zi.unstable_requestPaint,Uh=zi.unstable_now,X1=zi.unstable_getCurrentPriorityLevel,j1=zi.unstable_ImmediatePriority,Lp=zi.unstable_UserBlockingPriority,pg=zi.unstable_NormalPriority,Oy=zi.unstable_LowPriority,j4=zi.unstable_IdlePriority,Uf=zi.log,Zd=zi.unstable_setDisableYieldValue,Mu=null,Wl=null,po=null,W0=!1,qa=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u",Jc=Math.clz32?Math.clz32:fe,G1=Math.log,Op=Math.LN2,fg=256,J5=4194304,U0=2,N_=8,Xh=32,xg=268435456,X0=Math.random().toString(36).slice(2),cc="__reactFiber$"+X0,Ja="__reactProps$"+X0,Kc="__reactContainer$"+X0,Ul="__reactEvents$"+X0,zm="__reactListeners$"+X0,Xf="__reactHandles$"+X0,gg="__reactResources$"+X0,sx="__reactMarker$"+X0,ab=new Set,Vm={},ax={},cx={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},G4=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),K5={},Q5={},$m=0,lx,ux,R3,Y4,_x,cb,dx;Tn.__reactDisabledLog=!0;var Fr,ta,Sc=!1,jf=new(typeof WeakMap=="function"?WeakMap:Map),t_=null,j0=!1,Fy=/[\n"\\]/g,eh=!1,jh=!1,H_=!1,By=!1,fn=!1,J=!1,X=["value","defaultValue"],se=!1,Se=/["'&<>\n\t]|^\s|\s$/,$e="address applet area article aside base basefont bgsound blockquote body br button caption center col colgroup dd details dir div dl dt embed fieldset figcaption figure footer form frame frameset h1 h2 h3 h4 h5 h6 head header hgroup hr html iframe img input isindex li link listing main marquee menu menuitem meta nav noembed noframes noscript object ol p param plaintext pre script section select source style summary table tbody td template textarea tfoot th thead title tr track ul wbr xmp".split(" "),Ze="applet caption html table td th marquee object template foreignObject desc title".split(" "),_t=Ze.concat(["button"]),bt="dd dt li option optgroup p rp rt".split(" "),vt={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null,containerTagInScope:null,implicitRootScope:!1},Ht={},gn={animation:"animationDelay animationDirection animationDuration animationFillMode animationIterationCount animationName animationPlayState animationTimingFunction".split(" "),background:"backgroundAttachment backgroundClip backgroundColor backgroundImage backgroundOrigin backgroundPositionX backgroundPositionY backgroundRepeat backgroundSize".split(" "),backgroundPosition:["backgroundPositionX","backgroundPositionY"],border:"borderBottomColor borderBottomStyle borderBottomWidth borderImageOutset borderImageRepeat borderImageSlice borderImageSource borderImageWidth borderLeftColor borderLeftStyle borderLeftWidth borderRightColor borderRightStyle borderRightWidth borderTopColor borderTopStyle borderTopWidth".split(" "),borderBlockEnd:["borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth"],borderBlockStart:["borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth"],borderBottom:["borderBottomColor","borderBottomStyle","borderBottomWidth"],borderColor:["borderBottomColor","borderLeftColor","borderRightColor","borderTopColor"],borderImage:["borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth"],borderInlineEnd:["borderInlineEndColor","borderInlineEndStyle","borderInlineEndWidth"],borderInlineStart:["borderInlineStartColor","borderInlineStartStyle","borderInlineStartWidth"],borderLeft:["borderLeftColor","borderLeftStyle","borderLeftWidth"],borderRadius:["borderBottomLeftRadius","borderBottomRightRadius","borderTopLeftRadius","borderTopRightRadius"],borderRight:["borderRightColor","borderRightStyle","borderRightWidth"],borderStyle:["borderBottomStyle","borderLeftStyle","borderRightStyle","borderTopStyle"],borderTop:["borderTopColor","borderTopStyle","borderTopWidth"],borderWidth:["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth"],columnRule:["columnRuleColor","columnRuleStyle","columnRuleWidth"],columns:["columnCount","columnWidth"],flex:["flexBasis","flexGrow","flexShrink"],flexFlow:["flexDirection","flexWrap"],font:"fontFamily fontFeatureSettings fontKerning fontLanguageOverride fontSize fontSizeAdjust fontStretch fontStyle fontVariant fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition fontWeight lineHeight".split(" "),fontVariant:"fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition".split(" "),gap:["columnGap","rowGap"],grid:"gridAutoColumns gridAutoFlow gridAutoRows gridTemplateAreas gridTemplateColumns gridTemplateRows".split(" "),gridArea:["gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart"],gridColumn:["gridColumnEnd","gridColumnStart"],gridColumnGap:["columnGap"],gridGap:["columnGap","rowGap"],gridRow:["gridRowEnd","gridRowStart"],gridRowGap:["rowGap"],gridTemplate:["gridTemplateAreas","gridTemplateColumns","gridTemplateRows"],listStyle:["listStyleImage","listStylePosition","listStyleType"],margin:["marginBottom","marginLeft","marginRight","marginTop"],marker:["markerEnd","markerMid","markerStart"],mask:"maskClip maskComposite maskImage maskMode maskOrigin maskPositionX maskPositionY maskRepeat maskSize".split(" "),maskPosition:["maskPositionX","maskPositionY"],outline:["outlineColor","outlineStyle","outlineWidth"],overflow:["overflowX","overflowY"],padding:["paddingBottom","paddingLeft","paddingRight","paddingTop"],placeContent:["alignContent","justifyContent"],placeItems:["alignItems","justifyItems"],placeSelf:["alignSelf","justifySelf"],textDecoration:["textDecorationColor","textDecorationLine","textDecorationStyle"],textEmphasis:["textEmphasisColor","textEmphasisStyle"],transition:["transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction"],wordWrap:["overflowWrap"]},Hn=/([A-Z])/g,eo=/^ms-/,vo=/^(?:webkit|moz|o)[A-Z]/,Xo=/^-ms-/,yr=/-(.)/g,Ai=/;\s*$/,Io={},To={},fo=!1,_r=!1,na=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" ")),xd="http://www.w3.org/1998/Math/MathML",Gh="http://www.w3.org/2000/svg",Y1=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Fp={accept:"accept",acceptcharset:"acceptCharset","accept-charset":"acceptCharset",accesskey:"accessKey",action:"action",allowfullscreen:"allowFullScreen",alt:"alt",as:"as",async:"async",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",capture:"capture",cellpadding:"cellPadding",cellspacing:"cellSpacing",challenge:"challenge",charset:"charSet",checked:"checked",children:"children",cite:"cite",class:"className",classid:"classID",classname:"className",cols:"cols",colspan:"colSpan",content:"content",contenteditable:"contentEditable",contextmenu:"contextMenu",controls:"controls",controlslist:"controlsList",coords:"coords",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",data:"data",datetime:"dateTime",default:"default",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",defer:"defer",dir:"dir",disabled:"disabled",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback",download:"download",draggable:"draggable",enctype:"encType",enterkeyhint:"enterKeyHint",fetchpriority:"fetchPriority",for:"htmlFor",form:"form",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",headers:"headers",height:"height",hidden:"hidden",high:"high",href:"href",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",id:"id",imagesizes:"imageSizes",imagesrcset:"imageSrcSet",inert:"inert",innerhtml:"innerHTML",inputmode:"inputMode",integrity:"integrity",is:"is",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",kind:"kind",label:"label",lang:"lang",list:"list",loop:"loop",low:"low",manifest:"manifest",marginwidth:"marginWidth",marginheight:"marginHeight",max:"max",maxlength:"maxLength",media:"media",mediagroup:"mediaGroup",method:"method",min:"min",minlength:"minLength",multiple:"multiple",muted:"muted",name:"name",nomodule:"noModule",nonce:"nonce",novalidate:"noValidate",open:"open",optimum:"optimum",pattern:"pattern",placeholder:"placeholder",playsinline:"playsInline",poster:"poster",preload:"preload",profile:"profile",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rel:"rel",required:"required",reversed:"reversed",role:"role",rows:"rows",rowspan:"rowSpan",sandbox:"sandbox",scope:"scope",scoped:"scoped",scrolling:"scrolling",seamless:"seamless",selected:"selected",shape:"shape",size:"size",sizes:"sizes",span:"span",spellcheck:"spellCheck",src:"src",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",start:"start",step:"step",style:"style",summary:"summary",tabindex:"tabIndex",target:"target",title:"title",type:"type",usemap:"useMap",value:"value",width:"width",wmode:"wmode",wrap:"wrap",about:"about",accentheight:"accentHeight","accent-height":"accentHeight",accumulate:"accumulate",additive:"additive",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",alphabetic:"alphabetic",amplitude:"amplitude",arabicform:"arabicForm","arabic-form":"arabicForm",ascent:"ascent",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",azimuth:"azimuth",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",bbox:"bbox",begin:"begin",bias:"bias",by:"by",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clip:"clip",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",color:"color",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",cursor:"cursor",cx:"cx",cy:"cy",d:"d",datatype:"datatype",decelerate:"decelerate",descent:"descent",diffuseconstant:"diffuseConstant",direction:"direction",display:"display",divisor:"divisor",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",dur:"dur",dx:"dx",dy:"dy",edgemode:"edgeMode",elevation:"elevation",enablebackground:"enableBackground","enable-background":"enableBackground",end:"end",exponent:"exponent",externalresourcesrequired:"externalResourcesRequired",fill:"fill",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filter:"filter",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",focusable:"focusable",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",format:"format",from:"from",fx:"fx",fy:"fy",g1:"g1",g2:"g2",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",hanging:"hanging",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",ideographic:"ideographic",imagerendering:"imageRendering","image-rendering":"imageRendering",in2:"in2",in:"in",inlist:"inlist",intercept:"intercept",k1:"k1",k2:"k2",k3:"k3",k4:"k4",k:"k",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",kerning:"kerning",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",local:"local",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",mask:"mask",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",mathematical:"mathematical",mode:"mode",numoctaves:"numOctaves",offset:"offset",opacity:"opacity",operator:"operator",order:"order",orient:"orient",orientation:"orientation",origin:"origin",overflow:"overflow",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder",panose1:"panose1","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",points:"points",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",popover:"popover",popovertarget:"popoverTarget",popovertargetaction:"popoverTargetAction",prefix:"prefix",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",property:"property",r:"r",radius:"radius",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",resource:"resource",restart:"restart",result:"result",results:"results",rotate:"rotate",rx:"rx",ry:"ry",scale:"scale",security:"security",seed:"seed",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",slope:"slope",spacing:"spacing",specularconstant:"specularConstant",specularexponent:"specularExponent",speed:"speed",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stemh:"stemh",stemv:"stemv",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",string:"string",stroke:"stroke",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",to:"to",transform:"transform",transformorigin:"transformOrigin","transform-origin":"transformOrigin",typeof:"typeof",u1:"u1",u2:"u2",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicode:"unicode",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",values:"values",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",version:"version",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",visibility:"visibility",vmathematical:"vMathematical","v-mathematical":"vMathematical",vocab:"vocab",widths:"widths",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",x1:"x1",x2:"x2",x:"x",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang",xmlns:"xmlns","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",y1:"y1",y2:"y2",y:"y",ychannelselector:"yChannelSelector",z:"z",zoomandpan:"zoomAndPan"},q1={"aria-current":0,"aria-description":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0},th={},J1=RegExp("^(aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Gf=RegExp("^(aria)[A-Z][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),K1=!1,nr={},Yf=/^on./,E=/^on[^A-Z]/,N=RegExp("^(aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),$=RegExp("^(aria)[A-Z][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Q=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i,ue=null,ve=null,Qe=null,st=!1,St=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Gt=!1;if(St)try{var un={};Object.defineProperty(un,"passive",{get:function(){Gt=!0}}),window.addEventListener("test",un,un),window.removeEventListener("test",un,un)}catch{Gt=!1}var kn=null,tn=null,ln=null,or={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(P){return P.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Zo=mc(or),is=Lr({},or,{view:0,detail:0}),Yt=mc(is),It,rn,Ln,jo=Lr({},is,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:kd,button:0,buttons:0,relatedTarget:function(P){return P.relatedTarget===void 0?P.fromElement===P.srcElement?P.toElement:P.fromElement:P.relatedTarget},movementX:function(P){return"movementX"in P?P.movementX:(P!==Ln&&(Ln&&P.type==="mousemove"?(It=P.screenX-Ln.screenX,rn=P.screenY-Ln.screenY):rn=It=0,Ln=P),It)},movementY:function(P){return"movementY"in P?P.movementY:rn}}),ss=mc(jo),Mr=Lr({},jo,{dataTransfer:0}),Nr=mc(Mr),n_=Lr({},is,{relatedTarget:0}),js=mc(n_),Pl=Lr({},or,{animationName:0,elapsedTime:0,pseudoElement:0}),cD=mc(Pl),lq=Lr({},or,{clipboardData:function(P){return"clipboardData"in P?P.clipboardData:window.clipboardData}}),uq=mc(lq),_q=Lr({},or,{data:0}),lb=mc(_q),dq=lb,RI={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},kI={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},hq={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},mq=Lr({},is,{key:function(P){if(P.key){var C=RI[P.key]||P.key;if(C!=="Unidentified")return C}return P.type==="keypress"?(P=Hu(P),P===13?"Enter":String.fromCharCode(P)):P.type==="keydown"||P.type==="keyup"?kI[P.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:kd,charCode:function(P){return P.type==="keypress"?Hu(P):0},keyCode:function(P){return P.type==="keydown"||P.type==="keyup"?P.keyCode:0},which:function(P){return P.type==="keypress"?Hu(P):P.type==="keydown"||P.type==="keyup"?P.keyCode:0}}),q4=mc(mq),I_=Lr({},jo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),lD=mc(I_),pq=Lr({},is,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:kd}),Yh=mc(pq),Jv=Lr({},or,{propertyName:0,elapsedTime:0,pseudoElement:0}),Kv=mc(Jv),gd=Lr({},jo,{deltaX:function(P){return"deltaX"in P?P.deltaX:"wheelDeltaX"in P?-P.wheelDeltaX:0},deltaY:function(P){return"deltaY"in P?P.deltaY:"wheelDeltaY"in P?-P.wheelDeltaY:"wheelDelta"in P?-P.wheelDelta:0},deltaZ:0,deltaMode:0}),Q1=mc(gd),zy=Lr({},or,{newState:0,oldState:0}),Qv=mc(zy),J5e=[9,13,27,32],_C=229,Zv=St&&"CompositionEvent"in window,k3=null;St&&"documentMode"in document&&(k3=document.documentMode);var uD=St&&"TextEvent"in window&&!k3,dC=St&&(!Zv||k3&&8<k3&&11>=k3),e7=32,hC=String.fromCharCode(e7),fq=!1,yd=!1,Bp={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0},zp=null,hx=null,t7=!1;St&&(t7=G_("input")&&(!document.documentMode||9<document.documentMode));var bd=typeof Object.is=="function"?Object.is:Xn,NI=St&&"documentMode"in document&&11>=document.documentMode,yg=null,n7=null,o7=null,Ws=!1,Ka={animationend:_p("Animation","AnimationEnd"),animationiteration:_p("Animation","AnimationIteration"),animationstart:_p("Animation","AnimationStart"),transitionrun:_p("Transition","TransitionRun"),transitionstart:_p("Transition","TransitionStart"),transitioncancel:_p("Transition","TransitionCancel"),transitionend:_p("Transition","TransitionEnd")},xs={},ks={};St&&(ks=document.createElement("div").style,"AnimationEvent"in window||(delete Ka.animationend.animation,delete Ka.animationiteration.animation,delete Ka.animationstart.animation),"TransitionEvent"in window||delete Ka.transitionend.transition);var qf=e0("animationend"),r7=e0("animationiteration"),N3=e0("animationstart"),mC=e0("transitionrun"),xq=e0("transitionstart"),HI=e0("transitioncancel"),ub=e0("transitionend"),i7=new Map,pC="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");pC.push("scrollEnd");var J4=new WeakMap,Oa=1,L_=2,nh=[],Vy=0,fC=0,Wm={};Object.freeze(Wm);var Fa=null,mx=null,Ba=0,II=1,Oc=2,o_=8,Jf=16,Vp=64,xC=!1;try{var _D=Object.preventExtensions({})}catch{xC=!0}var _b=[],Z5=0,s7=null,H3=0,oh=[],bg=0,db=null,K4=1,Kf="",$p=null,Tu=null,ha=!1,Q4=!1,Z1=null,wu=null,Um=!1,I3=Error("Hydration Mismatch Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."),Z4=0;if(typeof performance=="object"&&typeof performance.now=="function")var LI=performance,dD=function(){return LI.now()};else{var gq=Date;dD=function(){return gq.now()}}var OI=I(null),hb=I(null),hD={},a7=null,e6=null,c7=!1,mb=typeof AbortController<"u"?AbortController:function(){var P=[],C=this.signal={aborted:!1,addEventListener:function(k,W){P.push(W)}};this.abort=function(){C.aborted=!0,P.forEach(function(k){return k()})}},gC=zi.unstable_scheduleCallback,l7=zi.unstable_NormalPriority,r_={$$typeof:fs,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0,_currentRenderer:null,_currentRenderer2:null},pb=zi.unstable_now,FI=-0,mD=-0,x0=-1.1,Pg=-0,yC=!1,bC=!1,u7=null,pD=0,L3=0,fb=null,BI=an.S;an.S=function(P,C){typeof C=="object"&&C!==null&&typeof C.then=="function"&&V5(P,C),BI!==null&&BI(P,C)};var O3=I(null),vg={recordUnsafeLifecycleWarnings:function(){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}},_7=[],d7=[],h7=[],m7=[],T=[],R=[],U=new Set;vg.recordUnsafeLifecycleWarnings=function(P,C){U.has(P.type)||(typeof C.componentWillMount=="function"&&C.componentWillMount.__suppressDeprecationWarning!==!0&&_7.push(P),P.mode&o_&&typeof C.UNSAFE_componentWillMount=="function"&&d7.push(P),typeof C.componentWillReceiveProps=="function"&&C.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&h7.push(P),P.mode&o_&&typeof C.UNSAFE_componentWillReceiveProps=="function"&&m7.push(P),typeof C.componentWillUpdate=="function"&&C.componentWillUpdate.__suppressDeprecationWarning!==!0&&T.push(P),P.mode&o_&&typeof C.UNSAFE_componentWillUpdate=="function"&&R.push(P))},vg.flushPendingUnsafeLifecycleWarnings=function(){var P=new Set;0<_7.length&&(_7.forEach(function(qe){P.add(A(qe)||"Component"),U.add(qe.type)}),_7=[]);var C=new Set;0<d7.length&&(d7.forEach(function(qe){C.add(A(qe)||"Component"),U.add(qe.type)}),d7=[]);var k=new Set;0<h7.length&&(h7.forEach(function(qe){k.add(A(qe)||"Component"),U.add(qe.type)}),h7=[]);var W=new Set;0<m7.length&&(m7.forEach(function(qe){W.add(A(qe)||"Component"),U.add(qe.type)}),m7=[]);var Z=new Set;0<T.length&&(T.forEach(function(qe){Z.add(A(qe)||"Component"),U.add(qe.type)}),T=[]);var le=new Set;if(0<R.length&&(R.forEach(function(qe){le.add(A(qe)||"Component"),U.add(qe.type)}),R=[]),0<C.size){var Le=d(C);console.error(`Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
194
194
|
|
|
195
195
|
* Move code with side effects to componentDidMount, and set initial state in the constructor.
|
|
196
196
|
|
|
@@ -225,11 +225,11 @@ The old API will be supported in all 16.x releases, but applications using it sh
|
|
|
225
225
|
|
|
226
226
|
Please update the following components: %s
|
|
227
227
|
|
|
228
|
-
Learn more about this warning here: https://react.dev/link/legacy-context`,W)})}})},vg.discardPendingWarnings=function(){_7=[],d7=[],h7=[],m7=[],T=[],R=[],re=new Map};var ye=Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`."),Ke=Error("Suspense Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."),pt=Error("Suspense Exception: This is not a real error! It's an implementation detail of `useActionState` to interrupt the current render. You must either rethrow it immediately, or move the `useActionState` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary."),Qt={then:function(){console.error('Internal React error: A listener was unexpectedly attached to a "noop" thenable. This is a bug in React. Please file an issue.')}},Pn=null,oo=!1,to=0,mo=1,li=2,Ri=4,G0=8,xb=0,Sg=1,Rt=2,At=3,Xt=!1,On=!1,Bo=null,Gs=!1,qr=I(null),ki=I(0),yi,vl=new Set,i_=new Set,$y=new Set,yq=new Set,p7=0,Zi=null,Xl=null,qh=null,bq=!1,fD=!1,PC=!1,Pq=0,zI=0,gb=null,lro=0,uro=25,yn=null,e4=null,yb=-1,VI=!1,vq={readContext:Ps,use:td,useCallback:Bs,useContext:Bs,useEffect:Bs,useImperativeHandle:Bs,useLayoutEffect:Bs,useInsertionEffect:Bs,useMemo:Bs,useReducer:Bs,useRef:Bs,useState:Bs,useDebugValue:Bs,useDeferredValue:Bs,useTransition:Bs,useSyncExternalStore:Bs,useId:Bs,useHostTransitionStatus:Bs,useFormState:Bs,useActionState:Bs,useOptimistic:Bs,useMemoCache:Bs,useCacheRefresh:Bs},K5e=null,uft=null,Q5e=null,_ft=null,F3=null,t6=null,Sq=null;K5e={readContext:function(P){return Ps(P)},use:td,useCallback:function(P,C){return yn="useCallback",Xr(),S_(C),Ti(P,C)},useContext:function(P){return yn="useContext",Xr(),Ps(P)},useEffect:function(P,C){return yn="useEffect",Xr(),S_(C),Sf(P,C)},useImperativeHandle:function(P,C,k){return yn="useImperativeHandle",Xr(),S_(k),I2(P,C,k)},useInsertionEffect:function(P,C){yn="useInsertionEffect",Xr(),S_(C),zd(4,li,P,C)},useLayoutEffect:function(P,C){return yn="useLayoutEffect",Xr(),S_(C),Cm(P,C)},useMemo:function(P,C){yn="useMemo",Xr(),S_(C);var k=an.H;an.H=F3;try{return pu(P,C)}finally{an.H=k}},useReducer:function(P,C,k){yn="useReducer",Xr();var W=an.H;an.H=F3;try{return as(P,C,k)}finally{an.H=W}},useRef:function(P){return yn="useRef",Xr(),Vu(P)},useState:function(P){yn="useState",Xr();var C=an.H;an.H=F3;try{return vm(P)}finally{an.H=C}},useDebugValue:function(){yn="useDebugValue",Xr()},useDeferredValue:function(P,C){return yn="useDeferredValue",Xr(),Cf(P,C)},useTransition:function(){return yn="useTransition",Xr(),T_()},useSyncExternalStore:function(P,C,k){return yn="useSyncExternalStore",Xr(),Bd(P,C,k)},useId:function(){return yn="useId",Xr(),gu()},useFormState:function(P,C){return yn="useFormState",Xr(),ff(),H2(P,C)},useActionState:function(P,C){return yn="useActionState",Xr(),H2(P,C)},useOptimistic:function(P){return yn="useOptimistic",Xr(),Il(P)},useHostTransitionStatus:xu,useMemoCache:Ta,useCacheRefresh:function(){return yn="useCacheRefresh",Xr(),yp()}},uft={readContext:function(P){return Ps(P)},use:td,useCallback:function(P,C){return yn="useCallback",qn(),Ti(P,C)},useContext:function(P){return yn="useContext",qn(),Ps(P)},useEffect:function(P,C){return yn="useEffect",qn(),Sf(P,C)},useImperativeHandle:function(P,C,k){return yn="useImperativeHandle",qn(),I2(P,C,k)},useInsertionEffect:function(P,C){yn="useInsertionEffect",qn(),zd(4,li,P,C)},useLayoutEffect:function(P,C){return yn="useLayoutEffect",qn(),Cm(P,C)},useMemo:function(P,C){yn="useMemo",qn();var k=an.H;an.H=F3;try{return pu(P,C)}finally{an.H=k}},useReducer:function(P,C,k){yn="useReducer",qn();var W=an.H;an.H=F3;try{return as(P,C,k)}finally{an.H=W}},useRef:function(P){return yn="useRef",qn(),Vu(P)},useState:function(P){yn="useState",qn();var C=an.H;an.H=F3;try{return vm(P)}finally{an.H=C}},useDebugValue:function(){yn="useDebugValue",qn()},useDeferredValue:function(P,C){return yn="useDeferredValue",qn(),Cf(P,C)},useTransition:function(){return yn="useTransition",qn(),T_()},useSyncExternalStore:function(P,C,k){return yn="useSyncExternalStore",qn(),Bd(P,C,k)},useId:function(){return yn="useId",qn(),gu()},useActionState:function(P,C){return yn="useActionState",qn(),H2(P,C)},useFormState:function(P,C){return yn="useFormState",qn(),ff(),H2(P,C)},useOptimistic:function(P){return yn="useOptimistic",qn(),Il(P)},useHostTransitionStatus:xu,useMemoCache:Ta,useCacheRefresh:function(){return yn="useCacheRefresh",qn(),yp()}},Q5e={readContext:function(P){return Ps(P)},use:td,useCallback:function(P,C){return yn="useCallback",qn(),L2(P,C)},useContext:function(P){return yn="useContext",qn(),Ps(P)},useEffect:function(P,C){yn="useEffect",qn(),Xc(2048,G0,P,C)},useImperativeHandle:function(P,C,k){return yn="useImperativeHandle",qn(),rd(P,C,k)},useInsertionEffect:function(P,C){return yn="useInsertionEffect",qn(),Xc(4,li,P,C)},useLayoutEffect:function(P,C){return yn="useLayoutEffect",qn(),Xc(4,Ri,P,C)},useMemo:function(P,C){yn="useMemo",qn();var k=an.H;an.H=t6;try{return xp(P,C)}finally{an.H=k}},useReducer:function(P,C,k){yn="useReducer",qn();var W=an.H;an.H=t6;try{return Fd(P,C,k)}finally{an.H=W}},useRef:function(){return yn="useRef",qn(),Mi().memoizedState},useState:function(){yn="useState",qn();var P=an.H;an.H=t6;try{return Fd(ms)}finally{an.H=P}},useDebugValue:function(){yn="useDebugValue",qn()},useDeferredValue:function(P,C){return yn="useDeferredValue",qn(),fu(P,C)},useTransition:function(){return yn="useTransition",qn(),Zx()},useSyncExternalStore:function(P,C,k){return yn="useSyncExternalStore",qn(),A2(P,C,k)},useId:function(){return yn="useId",qn(),Mi().memoizedState},useFormState:function(P){return yn="useFormState",qn(),ff(),Pf(P)},useActionState:function(P){return yn="useActionState",qn(),Pf(P)},useOptimistic:function(P,C){return yn="useOptimistic",qn(),M_(P,C)},useHostTransitionStatus:xu,useMemoCache:Ta,useCacheRefresh:function(){return yn="useCacheRefresh",qn(),Mi().memoizedState}},_ft={readContext:function(P){return Ps(P)},use:td,useCallback:function(P,C){return yn="useCallback",qn(),L2(P,C)},useContext:function(P){return yn="useContext",qn(),Ps(P)},useEffect:function(P,C){yn="useEffect",qn(),Xc(2048,G0,P,C)},useImperativeHandle:function(P,C,k){return yn="useImperativeHandle",qn(),rd(P,C,k)},useInsertionEffect:function(P,C){return yn="useInsertionEffect",qn(),Xc(4,li,P,C)},useLayoutEffect:function(P,C){return yn="useLayoutEffect",qn(),Xc(4,Ri,P,C)},useMemo:function(P,C){yn="useMemo",qn();var k=an.H;an.H=Sq;try{return xp(P,C)}finally{an.H=k}},useReducer:function(P,C,k){yn="useReducer",qn();var W=an.H;an.H=Sq;try{return mp(P,C,k)}finally{an.H=W}},useRef:function(){return yn="useRef",qn(),Mi().memoizedState},useState:function(){yn="useState",qn();var P=an.H;an.H=Sq;try{return mp(ms)}finally{an.H=P}},useDebugValue:function(){yn="useDebugValue",qn()},useDeferredValue:function(P,C){return yn="useDeferredValue",qn(),gp(P,C)},useTransition:function(){return yn="useTransition",qn(),F2()},useSyncExternalStore:function(P,C,k){return yn="useSyncExternalStore",qn(),A2(P,C,k)},useId:function(){return yn="useId",qn(),Mi().memoizedState},useFormState:function(P){return yn="useFormState",qn(),ff(),vf(P)},useActionState:function(P){return yn="useActionState",qn(),vf(P)},useOptimistic:function(P,C){return yn="useOptimistic",qn(),R2(P,C)},useHostTransitionStatus:xu,useMemoCache:Ta,useCacheRefresh:function(){return yn="useCacheRefresh",qn(),Mi().memoizedState}},F3={readContext:function(P){return u(),Ps(P)},use:function(P){return l(),td(P)},useCallback:function(P,C){return yn="useCallback",l(),Xr(),Ti(P,C)},useContext:function(P){return yn="useContext",l(),Xr(),Ps(P)},useEffect:function(P,C){return yn="useEffect",l(),Xr(),Sf(P,C)},useImperativeHandle:function(P,C,k){return yn="useImperativeHandle",l(),Xr(),I2(P,C,k)},useInsertionEffect:function(P,C){yn="useInsertionEffect",l(),Xr(),zd(4,li,P,C)},useLayoutEffect:function(P,C){return yn="useLayoutEffect",l(),Xr(),Cm(P,C)},useMemo:function(P,C){yn="useMemo",l(),Xr();var k=an.H;an.H=F3;try{return pu(P,C)}finally{an.H=k}},useReducer:function(P,C,k){yn="useReducer",l(),Xr();var W=an.H;an.H=F3;try{return as(P,C,k)}finally{an.H=W}},useRef:function(P){return yn="useRef",l(),Xr(),Vu(P)},useState:function(P){yn="useState",l(),Xr();var C=an.H;an.H=F3;try{return vm(P)}finally{an.H=C}},useDebugValue:function(){yn="useDebugValue",l(),Xr()},useDeferredValue:function(P,C){return yn="useDeferredValue",l(),Xr(),Cf(P,C)},useTransition:function(){return yn="useTransition",l(),Xr(),T_()},useSyncExternalStore:function(P,C,k){return yn="useSyncExternalStore",l(),Xr(),Bd(P,C,k)},useId:function(){return yn="useId",l(),Xr(),gu()},useFormState:function(P,C){return yn="useFormState",l(),Xr(),H2(P,C)},useActionState:function(P,C){return yn="useActionState",l(),Xr(),H2(P,C)},useOptimistic:function(P){return yn="useOptimistic",l(),Xr(),Il(P)},useMemoCache:function(P){return l(),Ta(P)},useHostTransitionStatus:xu,useCacheRefresh:function(){return yn="useCacheRefresh",Xr(),yp()}},t6={readContext:function(P){return u(),Ps(P)},use:function(P){return l(),td(P)},useCallback:function(P,C){return yn="useCallback",l(),qn(),L2(P,C)},useContext:function(P){return yn="useContext",l(),qn(),Ps(P)},useEffect:function(P,C){yn="useEffect",l(),qn(),Xc(2048,G0,P,C)},useImperativeHandle:function(P,C,k){return yn="useImperativeHandle",l(),qn(),rd(P,C,k)},useInsertionEffect:function(P,C){return yn="useInsertionEffect",l(),qn(),Xc(4,li,P,C)},useLayoutEffect:function(P,C){return yn="useLayoutEffect",l(),qn(),Xc(4,Ri,P,C)},useMemo:function(P,C){yn="useMemo",l(),qn();var k=an.H;an.H=t6;try{return xp(P,C)}finally{an.H=k}},useReducer:function(P,C,k){yn="useReducer",l(),qn();var W=an.H;an.H=t6;try{return Fd(P,C,k)}finally{an.H=W}},useRef:function(){return yn="useRef",l(),qn(),Mi().memoizedState},useState:function(){yn="useState",l(),qn();var P=an.H;an.H=t6;try{return Fd(ms)}finally{an.H=P}},useDebugValue:function(){yn="useDebugValue",l(),qn()},useDeferredValue:function(P,C){return yn="useDeferredValue",l(),qn(),fu(P,C)},useTransition:function(){return yn="useTransition",l(),qn(),Zx()},useSyncExternalStore:function(P,C,k){return yn="useSyncExternalStore",l(),qn(),A2(P,C,k)},useId:function(){return yn="useId",l(),qn(),Mi().memoizedState},useFormState:function(P){return yn="useFormState",l(),qn(),Pf(P)},useActionState:function(P){return yn="useActionState",l(),qn(),Pf(P)},useOptimistic:function(P,C){return yn="useOptimistic",l(),qn(),M_(P,C)},useMemoCache:function(P){return l(),Ta(P)},useHostTransitionStatus:xu,useCacheRefresh:function(){return yn="useCacheRefresh",qn(),Mi().memoizedState}},Sq={readContext:function(P){return u(),Ps(P)},use:function(P){return l(),td(P)},useCallback:function(P,C){return yn="useCallback",l(),qn(),L2(P,C)},useContext:function(P){return yn="useContext",l(),qn(),Ps(P)},useEffect:function(P,C){yn="useEffect",l(),qn(),Xc(2048,G0,P,C)},useImperativeHandle:function(P,C,k){return yn="useImperativeHandle",l(),qn(),rd(P,C,k)},useInsertionEffect:function(P,C){return yn="useInsertionEffect",l(),qn(),Xc(4,li,P,C)},useLayoutEffect:function(P,C){return yn="useLayoutEffect",l(),qn(),Xc(4,Ri,P,C)},useMemo:function(P,C){yn="useMemo",l(),qn();var k=an.H;an.H=t6;try{return xp(P,C)}finally{an.H=k}},useReducer:function(P,C,k){yn="useReducer",l(),qn();var W=an.H;an.H=t6;try{return mp(P,C,k)}finally{an.H=W}},useRef:function(){return yn="useRef",l(),qn(),Mi().memoizedState},useState:function(){yn="useState",l(),qn();var P=an.H;an.H=t6;try{return mp(ms)}finally{an.H=P}},useDebugValue:function(){yn="useDebugValue",l(),qn()},useDeferredValue:function(P,C){return yn="useDeferredValue",l(),qn(),gp(P,C)},useTransition:function(){return yn="useTransition",l(),qn(),F2()},useSyncExternalStore:function(P,C,k){return yn="useSyncExternalStore",l(),qn(),A2(P,C,k)},useId:function(){return yn="useId",l(),qn(),Mi().memoizedState},useFormState:function(P){return yn="useFormState",l(),qn(),vf(P)},useActionState:function(P){return yn="useActionState",l(),qn(),vf(P)},useOptimistic:function(P,C){return yn="useOptimistic",l(),qn(),R2(P,C)},useMemoCache:function(P){return l(),Ta(P)},useHostTransitionStatus:xu,useCacheRefresh:function(){return yn="useCacheRefresh",qn(),Mi().memoizedState}};var dft={"react-stack-bottom-frame":function(P,C,k){var W=j0;j0=!0;try{return P(C,k)}finally{j0=W}}},Z5e=dft["react-stack-bottom-frame"].bind(dft),hft={"react-stack-bottom-frame":function(P){var C=j0;j0=!0;try{return P.render()}finally{j0=C}}},mft=hft["react-stack-bottom-frame"].bind(hft),pft={"react-stack-bottom-frame":function(P,C){try{C.componentDidMount()}catch(k){_o(P,P.return,k)}}},e4e=pft["react-stack-bottom-frame"].bind(pft),fft={"react-stack-bottom-frame":function(P,C,k,W,Z){try{C.componentDidUpdate(k,W,Z)}catch(le){_o(P,P.return,le)}}},xft=fft["react-stack-bottom-frame"].bind(fft),gft={"react-stack-bottom-frame":function(P,C){var k=C.stack;P.componentDidCatch(C.value,{componentStack:k!==null?k:""})}},_ro=gft["react-stack-bottom-frame"].bind(gft),yft={"react-stack-bottom-frame":function(P,C,k){try{k.componentWillUnmount()}catch(W){_o(P,C,W)}}},bft=yft["react-stack-bottom-frame"].bind(yft),Pft={"react-stack-bottom-frame":function(P){P.resourceKind!=null&&console.error("Expected only SimpleEffects when enableUseEffectCRUDOverload is disabled, got %s",P.resourceKind);var C=P.create;return P=P.inst,C=C(),P.destroy=C}},dro=Pft["react-stack-bottom-frame"].bind(Pft),vft={"react-stack-bottom-frame":function(P,C,k){try{k()}catch(W){_o(P,C,W)}}},hro=vft["react-stack-bottom-frame"].bind(vft),Sft={"react-stack-bottom-frame":function(P){var C=P._init;return C(P._payload)}},f7=Sft["react-stack-bottom-frame"].bind(Sft),xD=null,$I=0,Ns=null,t4e,Cft=t4e=!1,Mft={},Tft={},wft={};c=function(P,C,k){if(k!==null&&typeof k=="object"&&k._store&&(!k._store.validated&&k.key==null||k._store.validated===2)){if(typeof k._store!="object")throw Error("React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.");k._store.validated=1;var W=A(P),Z=W||"null";if(!Mft[Z]){Mft[Z]=!0,k=k._owner,P=P._debugOwner;var le="";P&&typeof P.tag=="number"&&(Z=A(P))&&(le=`
|
|
228
|
+
Learn more about this warning here: https://react.dev/link/legacy-context`,W)})}})},vg.discardPendingWarnings=function(){_7=[],d7=[],h7=[],m7=[],T=[],R=[],re=new Map};var ye=Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`."),Ke=Error("Suspense Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."),pt=Error("Suspense Exception: This is not a real error! It's an implementation detail of `useActionState` to interrupt the current render. You must either rethrow it immediately, or move the `useActionState` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary."),Qt={then:function(){console.error('Internal React error: A listener was unexpectedly attached to a "noop" thenable. This is a bug in React. Please file an issue.')}},Pn=null,oo=!1,to=0,mo=1,li=2,Ri=4,G0=8,xb=0,Sg=1,Rt=2,At=3,Xt=!1,On=!1,Bo=null,Gs=!1,qr=I(null),ki=I(0),yi,vl=new Set,i_=new Set,$y=new Set,yq=new Set,p7=0,Zi=null,Xl=null,qh=null,bq=!1,fD=!1,PC=!1,Pq=0,zI=0,gb=null,uro=0,_ro=25,yn=null,e4=null,yb=-1,VI=!1,vq={readContext:Ps,use:td,useCallback:Bs,useContext:Bs,useEffect:Bs,useImperativeHandle:Bs,useLayoutEffect:Bs,useInsertionEffect:Bs,useMemo:Bs,useReducer:Bs,useRef:Bs,useState:Bs,useDebugValue:Bs,useDeferredValue:Bs,useTransition:Bs,useSyncExternalStore:Bs,useId:Bs,useHostTransitionStatus:Bs,useFormState:Bs,useActionState:Bs,useOptimistic:Bs,useMemoCache:Bs,useCacheRefresh:Bs},K5e=null,uft=null,Q5e=null,_ft=null,F3=null,t6=null,Sq=null;K5e={readContext:function(P){return Ps(P)},use:td,useCallback:function(P,C){return yn="useCallback",Xr(),S_(C),Ti(P,C)},useContext:function(P){return yn="useContext",Xr(),Ps(P)},useEffect:function(P,C){return yn="useEffect",Xr(),S_(C),Sf(P,C)},useImperativeHandle:function(P,C,k){return yn="useImperativeHandle",Xr(),S_(k),I2(P,C,k)},useInsertionEffect:function(P,C){yn="useInsertionEffect",Xr(),S_(C),zd(4,li,P,C)},useLayoutEffect:function(P,C){return yn="useLayoutEffect",Xr(),S_(C),Cm(P,C)},useMemo:function(P,C){yn="useMemo",Xr(),S_(C);var k=an.H;an.H=F3;try{return pu(P,C)}finally{an.H=k}},useReducer:function(P,C,k){yn="useReducer",Xr();var W=an.H;an.H=F3;try{return as(P,C,k)}finally{an.H=W}},useRef:function(P){return yn="useRef",Xr(),Vu(P)},useState:function(P){yn="useState",Xr();var C=an.H;an.H=F3;try{return vm(P)}finally{an.H=C}},useDebugValue:function(){yn="useDebugValue",Xr()},useDeferredValue:function(P,C){return yn="useDeferredValue",Xr(),Cf(P,C)},useTransition:function(){return yn="useTransition",Xr(),T_()},useSyncExternalStore:function(P,C,k){return yn="useSyncExternalStore",Xr(),Bd(P,C,k)},useId:function(){return yn="useId",Xr(),gu()},useFormState:function(P,C){return yn="useFormState",Xr(),ff(),H2(P,C)},useActionState:function(P,C){return yn="useActionState",Xr(),H2(P,C)},useOptimistic:function(P){return yn="useOptimistic",Xr(),Il(P)},useHostTransitionStatus:xu,useMemoCache:Ta,useCacheRefresh:function(){return yn="useCacheRefresh",Xr(),yp()}},uft={readContext:function(P){return Ps(P)},use:td,useCallback:function(P,C){return yn="useCallback",qn(),Ti(P,C)},useContext:function(P){return yn="useContext",qn(),Ps(P)},useEffect:function(P,C){return yn="useEffect",qn(),Sf(P,C)},useImperativeHandle:function(P,C,k){return yn="useImperativeHandle",qn(),I2(P,C,k)},useInsertionEffect:function(P,C){yn="useInsertionEffect",qn(),zd(4,li,P,C)},useLayoutEffect:function(P,C){return yn="useLayoutEffect",qn(),Cm(P,C)},useMemo:function(P,C){yn="useMemo",qn();var k=an.H;an.H=F3;try{return pu(P,C)}finally{an.H=k}},useReducer:function(P,C,k){yn="useReducer",qn();var W=an.H;an.H=F3;try{return as(P,C,k)}finally{an.H=W}},useRef:function(P){return yn="useRef",qn(),Vu(P)},useState:function(P){yn="useState",qn();var C=an.H;an.H=F3;try{return vm(P)}finally{an.H=C}},useDebugValue:function(){yn="useDebugValue",qn()},useDeferredValue:function(P,C){return yn="useDeferredValue",qn(),Cf(P,C)},useTransition:function(){return yn="useTransition",qn(),T_()},useSyncExternalStore:function(P,C,k){return yn="useSyncExternalStore",qn(),Bd(P,C,k)},useId:function(){return yn="useId",qn(),gu()},useActionState:function(P,C){return yn="useActionState",qn(),H2(P,C)},useFormState:function(P,C){return yn="useFormState",qn(),ff(),H2(P,C)},useOptimistic:function(P){return yn="useOptimistic",qn(),Il(P)},useHostTransitionStatus:xu,useMemoCache:Ta,useCacheRefresh:function(){return yn="useCacheRefresh",qn(),yp()}},Q5e={readContext:function(P){return Ps(P)},use:td,useCallback:function(P,C){return yn="useCallback",qn(),L2(P,C)},useContext:function(P){return yn="useContext",qn(),Ps(P)},useEffect:function(P,C){yn="useEffect",qn(),Xc(2048,G0,P,C)},useImperativeHandle:function(P,C,k){return yn="useImperativeHandle",qn(),rd(P,C,k)},useInsertionEffect:function(P,C){return yn="useInsertionEffect",qn(),Xc(4,li,P,C)},useLayoutEffect:function(P,C){return yn="useLayoutEffect",qn(),Xc(4,Ri,P,C)},useMemo:function(P,C){yn="useMemo",qn();var k=an.H;an.H=t6;try{return xp(P,C)}finally{an.H=k}},useReducer:function(P,C,k){yn="useReducer",qn();var W=an.H;an.H=t6;try{return Fd(P,C,k)}finally{an.H=W}},useRef:function(){return yn="useRef",qn(),Mi().memoizedState},useState:function(){yn="useState",qn();var P=an.H;an.H=t6;try{return Fd(ms)}finally{an.H=P}},useDebugValue:function(){yn="useDebugValue",qn()},useDeferredValue:function(P,C){return yn="useDeferredValue",qn(),fu(P,C)},useTransition:function(){return yn="useTransition",qn(),Zx()},useSyncExternalStore:function(P,C,k){return yn="useSyncExternalStore",qn(),A2(P,C,k)},useId:function(){return yn="useId",qn(),Mi().memoizedState},useFormState:function(P){return yn="useFormState",qn(),ff(),Pf(P)},useActionState:function(P){return yn="useActionState",qn(),Pf(P)},useOptimistic:function(P,C){return yn="useOptimistic",qn(),M_(P,C)},useHostTransitionStatus:xu,useMemoCache:Ta,useCacheRefresh:function(){return yn="useCacheRefresh",qn(),Mi().memoizedState}},_ft={readContext:function(P){return Ps(P)},use:td,useCallback:function(P,C){return yn="useCallback",qn(),L2(P,C)},useContext:function(P){return yn="useContext",qn(),Ps(P)},useEffect:function(P,C){yn="useEffect",qn(),Xc(2048,G0,P,C)},useImperativeHandle:function(P,C,k){return yn="useImperativeHandle",qn(),rd(P,C,k)},useInsertionEffect:function(P,C){return yn="useInsertionEffect",qn(),Xc(4,li,P,C)},useLayoutEffect:function(P,C){return yn="useLayoutEffect",qn(),Xc(4,Ri,P,C)},useMemo:function(P,C){yn="useMemo",qn();var k=an.H;an.H=Sq;try{return xp(P,C)}finally{an.H=k}},useReducer:function(P,C,k){yn="useReducer",qn();var W=an.H;an.H=Sq;try{return mp(P,C,k)}finally{an.H=W}},useRef:function(){return yn="useRef",qn(),Mi().memoizedState},useState:function(){yn="useState",qn();var P=an.H;an.H=Sq;try{return mp(ms)}finally{an.H=P}},useDebugValue:function(){yn="useDebugValue",qn()},useDeferredValue:function(P,C){return yn="useDeferredValue",qn(),gp(P,C)},useTransition:function(){return yn="useTransition",qn(),F2()},useSyncExternalStore:function(P,C,k){return yn="useSyncExternalStore",qn(),A2(P,C,k)},useId:function(){return yn="useId",qn(),Mi().memoizedState},useFormState:function(P){return yn="useFormState",qn(),ff(),vf(P)},useActionState:function(P){return yn="useActionState",qn(),vf(P)},useOptimistic:function(P,C){return yn="useOptimistic",qn(),R2(P,C)},useHostTransitionStatus:xu,useMemoCache:Ta,useCacheRefresh:function(){return yn="useCacheRefresh",qn(),Mi().memoizedState}},F3={readContext:function(P){return u(),Ps(P)},use:function(P){return l(),td(P)},useCallback:function(P,C){return yn="useCallback",l(),Xr(),Ti(P,C)},useContext:function(P){return yn="useContext",l(),Xr(),Ps(P)},useEffect:function(P,C){return yn="useEffect",l(),Xr(),Sf(P,C)},useImperativeHandle:function(P,C,k){return yn="useImperativeHandle",l(),Xr(),I2(P,C,k)},useInsertionEffect:function(P,C){yn="useInsertionEffect",l(),Xr(),zd(4,li,P,C)},useLayoutEffect:function(P,C){return yn="useLayoutEffect",l(),Xr(),Cm(P,C)},useMemo:function(P,C){yn="useMemo",l(),Xr();var k=an.H;an.H=F3;try{return pu(P,C)}finally{an.H=k}},useReducer:function(P,C,k){yn="useReducer",l(),Xr();var W=an.H;an.H=F3;try{return as(P,C,k)}finally{an.H=W}},useRef:function(P){return yn="useRef",l(),Xr(),Vu(P)},useState:function(P){yn="useState",l(),Xr();var C=an.H;an.H=F3;try{return vm(P)}finally{an.H=C}},useDebugValue:function(){yn="useDebugValue",l(),Xr()},useDeferredValue:function(P,C){return yn="useDeferredValue",l(),Xr(),Cf(P,C)},useTransition:function(){return yn="useTransition",l(),Xr(),T_()},useSyncExternalStore:function(P,C,k){return yn="useSyncExternalStore",l(),Xr(),Bd(P,C,k)},useId:function(){return yn="useId",l(),Xr(),gu()},useFormState:function(P,C){return yn="useFormState",l(),Xr(),H2(P,C)},useActionState:function(P,C){return yn="useActionState",l(),Xr(),H2(P,C)},useOptimistic:function(P){return yn="useOptimistic",l(),Xr(),Il(P)},useMemoCache:function(P){return l(),Ta(P)},useHostTransitionStatus:xu,useCacheRefresh:function(){return yn="useCacheRefresh",Xr(),yp()}},t6={readContext:function(P){return u(),Ps(P)},use:function(P){return l(),td(P)},useCallback:function(P,C){return yn="useCallback",l(),qn(),L2(P,C)},useContext:function(P){return yn="useContext",l(),qn(),Ps(P)},useEffect:function(P,C){yn="useEffect",l(),qn(),Xc(2048,G0,P,C)},useImperativeHandle:function(P,C,k){return yn="useImperativeHandle",l(),qn(),rd(P,C,k)},useInsertionEffect:function(P,C){return yn="useInsertionEffect",l(),qn(),Xc(4,li,P,C)},useLayoutEffect:function(P,C){return yn="useLayoutEffect",l(),qn(),Xc(4,Ri,P,C)},useMemo:function(P,C){yn="useMemo",l(),qn();var k=an.H;an.H=t6;try{return xp(P,C)}finally{an.H=k}},useReducer:function(P,C,k){yn="useReducer",l(),qn();var W=an.H;an.H=t6;try{return Fd(P,C,k)}finally{an.H=W}},useRef:function(){return yn="useRef",l(),qn(),Mi().memoizedState},useState:function(){yn="useState",l(),qn();var P=an.H;an.H=t6;try{return Fd(ms)}finally{an.H=P}},useDebugValue:function(){yn="useDebugValue",l(),qn()},useDeferredValue:function(P,C){return yn="useDeferredValue",l(),qn(),fu(P,C)},useTransition:function(){return yn="useTransition",l(),qn(),Zx()},useSyncExternalStore:function(P,C,k){return yn="useSyncExternalStore",l(),qn(),A2(P,C,k)},useId:function(){return yn="useId",l(),qn(),Mi().memoizedState},useFormState:function(P){return yn="useFormState",l(),qn(),Pf(P)},useActionState:function(P){return yn="useActionState",l(),qn(),Pf(P)},useOptimistic:function(P,C){return yn="useOptimistic",l(),qn(),M_(P,C)},useMemoCache:function(P){return l(),Ta(P)},useHostTransitionStatus:xu,useCacheRefresh:function(){return yn="useCacheRefresh",qn(),Mi().memoizedState}},Sq={readContext:function(P){return u(),Ps(P)},use:function(P){return l(),td(P)},useCallback:function(P,C){return yn="useCallback",l(),qn(),L2(P,C)},useContext:function(P){return yn="useContext",l(),qn(),Ps(P)},useEffect:function(P,C){yn="useEffect",l(),qn(),Xc(2048,G0,P,C)},useImperativeHandle:function(P,C,k){return yn="useImperativeHandle",l(),qn(),rd(P,C,k)},useInsertionEffect:function(P,C){return yn="useInsertionEffect",l(),qn(),Xc(4,li,P,C)},useLayoutEffect:function(P,C){return yn="useLayoutEffect",l(),qn(),Xc(4,Ri,P,C)},useMemo:function(P,C){yn="useMemo",l(),qn();var k=an.H;an.H=t6;try{return xp(P,C)}finally{an.H=k}},useReducer:function(P,C,k){yn="useReducer",l(),qn();var W=an.H;an.H=t6;try{return mp(P,C,k)}finally{an.H=W}},useRef:function(){return yn="useRef",l(),qn(),Mi().memoizedState},useState:function(){yn="useState",l(),qn();var P=an.H;an.H=t6;try{return mp(ms)}finally{an.H=P}},useDebugValue:function(){yn="useDebugValue",l(),qn()},useDeferredValue:function(P,C){return yn="useDeferredValue",l(),qn(),gp(P,C)},useTransition:function(){return yn="useTransition",l(),qn(),F2()},useSyncExternalStore:function(P,C,k){return yn="useSyncExternalStore",l(),qn(),A2(P,C,k)},useId:function(){return yn="useId",l(),qn(),Mi().memoizedState},useFormState:function(P){return yn="useFormState",l(),qn(),vf(P)},useActionState:function(P){return yn="useActionState",l(),qn(),vf(P)},useOptimistic:function(P,C){return yn="useOptimistic",l(),qn(),R2(P,C)},useMemoCache:function(P){return l(),Ta(P)},useHostTransitionStatus:xu,useCacheRefresh:function(){return yn="useCacheRefresh",qn(),Mi().memoizedState}};var dft={"react-stack-bottom-frame":function(P,C,k){var W=j0;j0=!0;try{return P(C,k)}finally{j0=W}}},Z5e=dft["react-stack-bottom-frame"].bind(dft),hft={"react-stack-bottom-frame":function(P){var C=j0;j0=!0;try{return P.render()}finally{j0=C}}},mft=hft["react-stack-bottom-frame"].bind(hft),pft={"react-stack-bottom-frame":function(P,C){try{C.componentDidMount()}catch(k){_o(P,P.return,k)}}},e4e=pft["react-stack-bottom-frame"].bind(pft),fft={"react-stack-bottom-frame":function(P,C,k,W,Z){try{C.componentDidUpdate(k,W,Z)}catch(le){_o(P,P.return,le)}}},xft=fft["react-stack-bottom-frame"].bind(fft),gft={"react-stack-bottom-frame":function(P,C){var k=C.stack;P.componentDidCatch(C.value,{componentStack:k!==null?k:""})}},dro=gft["react-stack-bottom-frame"].bind(gft),yft={"react-stack-bottom-frame":function(P,C,k){try{k.componentWillUnmount()}catch(W){_o(P,C,W)}}},bft=yft["react-stack-bottom-frame"].bind(yft),Pft={"react-stack-bottom-frame":function(P){P.resourceKind!=null&&console.error("Expected only SimpleEffects when enableUseEffectCRUDOverload is disabled, got %s",P.resourceKind);var C=P.create;return P=P.inst,C=C(),P.destroy=C}},hro=Pft["react-stack-bottom-frame"].bind(Pft),vft={"react-stack-bottom-frame":function(P,C,k){try{k()}catch(W){_o(P,C,W)}}},mro=vft["react-stack-bottom-frame"].bind(vft),Sft={"react-stack-bottom-frame":function(P){var C=P._init;return C(P._payload)}},f7=Sft["react-stack-bottom-frame"].bind(Sft),xD=null,$I=0,Ns=null,t4e,Cft=t4e=!1,Mft={},Tft={},wft={};c=function(P,C,k){if(k!==null&&typeof k=="object"&&k._store&&(!k._store.validated&&k.key==null||k._store.validated===2)){if(typeof k._store!="object")throw Error("React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.");k._store.validated=1;var W=A(P),Z=W||"null";if(!Mft[Z]){Mft[Z]=!0,k=k._owner,P=P._debugOwner;var le="";P&&typeof P.tag=="number"&&(Z=A(P))&&(le=`
|
|
229
229
|
|
|
230
230
|
Check the render method of \``+Z+"`."),le||W&&(le=`
|
|
231
231
|
|
|
232
|
-
Check the top-level render call using <`+W+">.");var Le="";k!=null&&P!==k&&(W=null,typeof k.tag=="number"?W=A(k):typeof k.name=="string"&&(W=k.name),W&&(Le=" It was passed a child from "+W+".")),Zt(C,function(){console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',le,Le)})}}};var gD=Tf(!0),Eft=Tf(!1),t4=I(null),B3=null,yD=1,WI=2,Xm=I(0),Dft={},Aft=new Set,Rft=new Set,kft=new Set,Nft=new Set,Hft=new Set,Ift=new Set,Lft=new Set,Oft=new Set,Fft=new Set,Bft=new Set;Object.freeze(Dft);var n4e={enqueueSetState:function(P,C,k){P=P._reactInternals;var W=bu(P),Z=P_(W);Z.payload=C,k!=null&&(yu(k),Z.callback=k),C=Rc(P,Z,W),C!==null&&(Zs(C,P,W),Od(C,P,W)),Je(P,W)},enqueueReplaceState:function(P,C,k){P=P._reactInternals;var W=bu(P),Z=P_(W);Z.tag=Sg,Z.payload=C,k!=null&&(yu(k),Z.callback=k),C=Rc(P,Z,W),C!==null&&(Zs(C,P,W),Od(C,P,W)),Je(P,W)},enqueueForceUpdate:function(P,C){P=P._reactInternals;var k=bu(P),W=P_(k);W.tag=Rt,C!=null&&(yu(C),W.callback=C),C=Rc(P,W,k),C!==null&&(Zs(C,P,k),Od(C,P,k)),po!==null&&typeof po.markForceUpdateScheduled=="function"&&po.markForceUpdateScheduled(P,k)}},o4e=typeof reportError=="function"?reportError:function(P){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var C=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof P=="object"&&P!==null&&typeof P.message=="string"?String(P.message):String(P),error:P});if(!window.dispatchEvent(C))return}else if(typeof t=="object"&&typeof t.emit=="function"){t.emit("uncaughtException",P);return}console.error(P)},bD=null,r4e=null,zft=Error("This is not a real error. It's an implementation detail of React's selective hydration feature. If this leaks into userspace, it's a bug in React. Please file an issue."),Wp=!1,Vft={},$ft={},Wft={},Uft={},PD=!1,Xft={},i4e={},s4e={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},jft=!1,Gft=null;Gft=new Set;var bb=!1,rh=!1,a4e=!1,Yft=typeof WeakSet=="function"?WeakSet:Set,Up=null,vD=null,SD=null,Jh=null,Cg=!1,n6=null,UI=8192,mro={getCacheForType:function(P){var C=Ps(r_),k=C.data.get(P);return k===void 0&&(k=P(),C.data.set(P,k)),k},getOwner:function(){return t_}};if(typeof Symbol=="function"&&Symbol.for){var XI=Symbol.for;XI("selector.component"),XI("selector.has_pseudo_class"),XI("selector.role"),XI("selector.test_id"),XI("selector.text")}var pro=[],fro=typeof WeakMap=="function"?WeakMap:Map,Wy=0,px=2,o6=4,Pb=0,jI=1,CD=2,c4e=3,vC=4,Cq=6,qft=5,Fc=Wy,g0=null,Ys=null,oa=0,Mg=0,GI=1,SC=2,YI=3,Jft=4,l4e=5,MD=6,qI=7,u4e=8,CC=9,Qc=Mg,Uy=null,x7=!1,TD=!1,_4e=!1,z3=0,Pd=Pb,g7=0,y7=0,d4e=0,Xy=0,MC=0,JI=null,fx=null,Mq=!1,h4e=0,Kft=300,Tq=1/0,Qft=500,KI=null,b7=null,xro=0,gro=1,yro=2,TC=0,Zft=1,e1t=2,t1t=3,bro=4,m4e=5,Qf=0,P7=null,wD=null,v7=0,p4e=0,f4e=null,n1t=null,Pro=50,QI=0,x4e=null,g4e=!1,wq=!1,vro=50,wC=0,ZI=null,ED=!1,Eq=null,o1t=!1,r1t=new Set,Sro={},Dq=null,DD=null,y4e=!1,b4e=!1,Aq=!1,P4e=!1,EC=0,v4e={};(function(){for(var P=0;P<pC.length;P++){var C=pC[P],k=C.toLowerCase();C=C[0].toUpperCase()+C.slice(1),Iu(k,"on"+C)}Iu(qf,"onAnimationEnd"),Iu(r7,"onAnimationIteration"),Iu(N3,"onAnimationStart"),Iu("dblclick","onDoubleClick"),Iu("focusin","onFocus"),Iu("focusout","onBlur"),Iu(mC,"onTransitionRun"),Iu(xq,"onTransitionStart"),Iu(HI,"onTransitionCancel"),Iu(ub,"onTransitionEnd")})(),gt("onMouseEnter",["mouseout","mouseover"]),gt("onMouseLeave",["mouseout","mouseover"]),gt("onPointerEnter",["pointerout","pointerover"]),gt("onPointerLeave",["pointerout","pointerover"]),ct("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ct("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ct("onBeforeInput",["compositionend","keypress","textInput","paste"]),ct("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ct("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ct("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var eL="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),S4e=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(eL)),Rq="_reactListening"+Math.random().toString(36).slice(2),i1t=!1,s1t=!1,kq=!1,a1t=!1,Nq=!1,Hq=!1,c1t=!1,Iq={},Cro=/\r\n?/g,Mro=/\u0000|\uFFFD/g,DC="http://www.w3.org/1999/xlink",C4e="http://www.w3.org/XML/1998/namespace",Tro="javascript:throw new Error('React form unexpectedly submitted.')",wro="suppressHydrationWarning",Lq="$",Oq="/$",vb="$?",tL="$!",Ero=1,Dro=2,Aro=4,M4e="F!",l1t="F",u1t="complete",Rro="style",Sb=0,AD=1,Fq=2,T4e=null,w4e=null,_1t={dialog:!0,webview:!0},E4e=null,d1t=typeof setTimeout=="function"?setTimeout:void 0,kro=typeof clearTimeout=="function"?clearTimeout:void 0,AC=-1,h1t=typeof Promise=="function"?Promise:void 0,Nro=typeof queueMicrotask=="function"?queueMicrotask:typeof h1t<"u"?function(P){return h1t.resolve(null).then(P).catch(lg)}:d1t,D4e=null,RC=0,nL=1,m1t=2,p1t=3,n4=4,o4=new Map,f1t=new Set,Cb=Or.d;Or.d={f:function(){var P=Cb.f(),C=L1();return P||C},r:function(P){var C=Wt(P);C!==null&&C.tag===5&&C.type==="form"?Nh(C):Cb.r(P)},D:function(P){Cb.D(P),La("dns-prefetch",P,null)},C:function(P,C){Cb.C(P,C),La("preconnect",P,C)},L:function(P,C,k){Cb.L(P,C,k);var W=RD;if(W&&P&&C){var Z='link[rel="preload"][as="'+Vn(C)+'"]';C==="image"&&k&&k.imageSrcSet?(Z+='[imagesrcset="'+Vn(k.imageSrcSet)+'"]',typeof k.imageSizes=="string"&&(Z+='[imagesizes="'+Vn(k.imageSizes)+'"]')):Z+='[href="'+Vn(P)+'"]';var le=Z;switch(C){case"style":le=ac(P);break;case"script":le=Rp(P)}o4.has(le)||(P=Lr({rel:"preload",href:C==="image"&&k&&k.imageSrcSet?void 0:P,as:C},k),o4.set(le,P),W.querySelector(Z)!==null||C==="style"&&W.querySelector(Ku(le))||C==="script"&&W.querySelector(md(le))||(C=W.createElement("link"),Lc(C,"link",P),tt(C),W.head.appendChild(C)))}},m:function(P,C){Cb.m(P,C);var k=RD;if(k&&P){var W=C&&typeof C.as=="string"?C.as:"script",Z='link[rel="modulepreload"][as="'+Vn(W)+'"][href="'+Vn(P)+'"]',le=Z;switch(W){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":le=Rp(P)}if(!o4.has(le)&&(P=Lr({rel:"modulepreload",href:P},C),o4.set(le,P),k.querySelector(Z)===null)){switch(W){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(k.querySelector(md(le)))return}W=k.createElement("link"),Lc(W,"link",P),tt(W),k.head.appendChild(W)}}},X:function(P,C){Cb.X(P,C);var k=RD;if(k&&P){var W=ge(k).hoistableScripts,Z=Rp(P),le=W.get(Z);le||(le=k.querySelector(md(Z)),le||(P=Lr({src:P,async:!0},C),(C=o4.get(Z))&&Qu(P,C),le=k.createElement("script"),tt(le),Lc(le,"link",P),k.head.appendChild(le)),le={type:"script",instance:le,count:1,state:null},W.set(Z,le))}},S:function(P,C,k){Cb.S(P,C,k);var W=RD;if(W&&P){var Z=ge(W).hoistableStyles,le=ac(P);C=C||"default";var Le=Z.get(le);if(!Le){var qe={loading:RC,preload:null};if(Le=W.querySelector(Ku(le)))qe.loading=nL|n4;else{P=Lr({rel:"stylesheet",href:P,"data-precedence":C},k),(k=o4.get(le))&&bl(P,k);var dt=Le=W.createElement("link");tt(dt),Lc(dt,"link",P),dt._p=new Promise(function(yt,mn){dt.onload=yt,dt.onerror=mn}),dt.addEventListener("load",function(){qe.loading|=nL}),dt.addEventListener("error",function(){qe.loading|=m1t}),qe.loading|=n4,Su(Le,C,W)}Le={type:"stylesheet",instance:Le,count:1,state:qe},Z.set(le,Le)}}},M:function(P,C){Cb.M(P,C);var k=RD;if(k&&P){var W=ge(k).hoistableScripts,Z=Rp(P),le=W.get(Z);le||(le=k.querySelector(md(Z)),le||(P=Lr({src:P,async:!0,type:"module"},C),(C=o4.get(Z))&&Qu(P,C),le=k.createElement("script"),tt(le),Lc(le,"link",P),k.head.appendChild(le)),le={type:"script",instance:le,count:1,state:null},W.set(Z,le))}}};var RD=typeof document>"u"?null:document,Bq=null,oL=null,A4e=null,zq=null,kC=D3,rL={$$typeof:fs,Provider:null,Consumer:null,_currentValue:kC,_currentValue2:kC,_threadCount:0},x1t="%c%s%c ",g1t="background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px",y1t="",Vq=" ",Hro=Function.prototype.bind,b1t=!1,P1t=null,v1t=null,S1t=null,C1t=null,M1t=null,T1t=null,w1t=null,E1t=null,D1t=null;P1t=function(P,C,k,W){C=e(P,C),C!==null&&(k=n(C.memoizedState,k,0,W),C.memoizedState=k,C.baseState=k,P.memoizedProps=Lr({},P.memoizedProps),k=k0(P,2),k!==null&&Zs(k,P,2))},v1t=function(P,C,k){C=e(P,C),C!==null&&(k=i(C.memoizedState,k,0),C.memoizedState=k,C.baseState=k,P.memoizedProps=Lr({},P.memoizedProps),k=k0(P,2),k!==null&&Zs(k,P,2))},S1t=function(P,C,k,W){C=e(P,C),C!==null&&(k=o(C.memoizedState,k,W),C.memoizedState=k,C.baseState=k,P.memoizedProps=Lr({},P.memoizedProps),k=k0(P,2),k!==null&&Zs(k,P,2))},C1t=function(P,C,k){P.pendingProps=n(P.memoizedProps,C,0,k),P.alternate&&(P.alternate.pendingProps=P.pendingProps),C=k0(P,2),C!==null&&Zs(C,P,2)},M1t=function(P,C){P.pendingProps=i(P.memoizedProps,C,0),P.alternate&&(P.alternate.pendingProps=P.pendingProps),C=k0(P,2),C!==null&&Zs(C,P,2)},T1t=function(P,C,k){P.pendingProps=o(P.memoizedProps,C,k),P.alternate&&(P.alternate.pendingProps=P.pendingProps),C=k0(P,2),C!==null&&Zs(C,P,2)},w1t=function(P){var C=k0(P,2);C!==null&&Zs(C,P,2)},E1t=function(P){a=P},D1t=function(P){s=P};var $q=!0,Wq=null,R4e=!1,S7=null,C7=null,M7=null,iL=new Map,sL=new Map,T7=[],Iro="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" "),Uq=null;if(Wh.prototype.render=Np.prototype.render=function(P){var C=this._internalRoot;if(C===null)throw Error("Cannot update an unmounted root.");var k=arguments;typeof k[1]=="function"?console.error("does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."):f(k[1])?console.error("You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root."):typeof k[1]<"u"&&console.error("You passed a second argument to root.render(...) but it only accepts one argument."),k=P;var W=C.current,Z=bu(W);jt(W,Z,k,C,null,null)},Wh.prototype.unmount=Np.prototype.unmount=function(){var P=arguments;if(typeof P[0]=="function"&&console.error("does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."),P=this._internalRoot,P!==null){this._internalRoot=null;var C=P.containerInfo;(Fc&(px|o6))!==Wy&&console.error("Attempted to synchronously unmount a root while React was already rendering. React cannot finish unmounting the root until the current render has completed, which may lead to a race condition."),jt(P.current,2,null,P,null,null),L1(),C[Kc]=null}},Wh.prototype.unstable_scheduleHydration=function(P){if(P){var C=Lt();P={blockedOn:null,target:P,priority:C};for(var k=0;k<T7.length&&C!==0&&C<T7[k].priority;k++);T7.splice(k,0,P),k===0&&ur(P)}},(function(){var P=Qi.version;if(P!=="19.1.0")throw Error(`Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:
|
|
232
|
+
Check the top-level render call using <`+W+">.");var Le="";k!=null&&P!==k&&(W=null,typeof k.tag=="number"?W=A(k):typeof k.name=="string"&&(W=k.name),W&&(Le=" It was passed a child from "+W+".")),Zt(C,function(){console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',le,Le)})}}};var gD=Tf(!0),Eft=Tf(!1),t4=I(null),B3=null,yD=1,WI=2,Xm=I(0),Dft={},Aft=new Set,Rft=new Set,kft=new Set,Nft=new Set,Hft=new Set,Ift=new Set,Lft=new Set,Oft=new Set,Fft=new Set,Bft=new Set;Object.freeze(Dft);var n4e={enqueueSetState:function(P,C,k){P=P._reactInternals;var W=bu(P),Z=P_(W);Z.payload=C,k!=null&&(yu(k),Z.callback=k),C=Rc(P,Z,W),C!==null&&(Zs(C,P,W),Od(C,P,W)),Je(P,W)},enqueueReplaceState:function(P,C,k){P=P._reactInternals;var W=bu(P),Z=P_(W);Z.tag=Sg,Z.payload=C,k!=null&&(yu(k),Z.callback=k),C=Rc(P,Z,W),C!==null&&(Zs(C,P,W),Od(C,P,W)),Je(P,W)},enqueueForceUpdate:function(P,C){P=P._reactInternals;var k=bu(P),W=P_(k);W.tag=Rt,C!=null&&(yu(C),W.callback=C),C=Rc(P,W,k),C!==null&&(Zs(C,P,k),Od(C,P,k)),po!==null&&typeof po.markForceUpdateScheduled=="function"&&po.markForceUpdateScheduled(P,k)}},o4e=typeof reportError=="function"?reportError:function(P){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var C=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof P=="object"&&P!==null&&typeof P.message=="string"?String(P.message):String(P),error:P});if(!window.dispatchEvent(C))return}else if(typeof t=="object"&&typeof t.emit=="function"){t.emit("uncaughtException",P);return}console.error(P)},bD=null,r4e=null,zft=Error("This is not a real error. It's an implementation detail of React's selective hydration feature. If this leaks into userspace, it's a bug in React. Please file an issue."),Wp=!1,Vft={},$ft={},Wft={},Uft={},PD=!1,Xft={},i4e={},s4e={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},jft=!1,Gft=null;Gft=new Set;var bb=!1,rh=!1,a4e=!1,Yft=typeof WeakSet=="function"?WeakSet:Set,Up=null,vD=null,SD=null,Jh=null,Cg=!1,n6=null,UI=8192,pro={getCacheForType:function(P){var C=Ps(r_),k=C.data.get(P);return k===void 0&&(k=P(),C.data.set(P,k)),k},getOwner:function(){return t_}};if(typeof Symbol=="function"&&Symbol.for){var XI=Symbol.for;XI("selector.component"),XI("selector.has_pseudo_class"),XI("selector.role"),XI("selector.test_id"),XI("selector.text")}var fro=[],xro=typeof WeakMap=="function"?WeakMap:Map,Wy=0,px=2,o6=4,Pb=0,jI=1,CD=2,c4e=3,vC=4,Cq=6,qft=5,Fc=Wy,g0=null,Ys=null,oa=0,Mg=0,GI=1,SC=2,YI=3,Jft=4,l4e=5,MD=6,qI=7,u4e=8,CC=9,Qc=Mg,Uy=null,x7=!1,TD=!1,_4e=!1,z3=0,Pd=Pb,g7=0,y7=0,d4e=0,Xy=0,MC=0,JI=null,fx=null,Mq=!1,h4e=0,Kft=300,Tq=1/0,Qft=500,KI=null,b7=null,gro=0,yro=1,bro=2,TC=0,Zft=1,e1t=2,t1t=3,Pro=4,m4e=5,Qf=0,P7=null,wD=null,v7=0,p4e=0,f4e=null,n1t=null,vro=50,QI=0,x4e=null,g4e=!1,wq=!1,Sro=50,wC=0,ZI=null,ED=!1,Eq=null,o1t=!1,r1t=new Set,Cro={},Dq=null,DD=null,y4e=!1,b4e=!1,Aq=!1,P4e=!1,EC=0,v4e={};(function(){for(var P=0;P<pC.length;P++){var C=pC[P],k=C.toLowerCase();C=C[0].toUpperCase()+C.slice(1),Iu(k,"on"+C)}Iu(qf,"onAnimationEnd"),Iu(r7,"onAnimationIteration"),Iu(N3,"onAnimationStart"),Iu("dblclick","onDoubleClick"),Iu("focusin","onFocus"),Iu("focusout","onBlur"),Iu(mC,"onTransitionRun"),Iu(xq,"onTransitionStart"),Iu(HI,"onTransitionCancel"),Iu(ub,"onTransitionEnd")})(),gt("onMouseEnter",["mouseout","mouseover"]),gt("onMouseLeave",["mouseout","mouseover"]),gt("onPointerEnter",["pointerout","pointerover"]),gt("onPointerLeave",["pointerout","pointerover"]),ct("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ct("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ct("onBeforeInput",["compositionend","keypress","textInput","paste"]),ct("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ct("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ct("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var eL="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),S4e=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(eL)),Rq="_reactListening"+Math.random().toString(36).slice(2),i1t=!1,s1t=!1,kq=!1,a1t=!1,Nq=!1,Hq=!1,c1t=!1,Iq={},Mro=/\r\n?/g,Tro=/\u0000|\uFFFD/g,DC="http://www.w3.org/1999/xlink",C4e="http://www.w3.org/XML/1998/namespace",wro="javascript:throw new Error('React form unexpectedly submitted.')",Ero="suppressHydrationWarning",Lq="$",Oq="/$",vb="$?",tL="$!",Dro=1,Aro=2,Rro=4,M4e="F!",l1t="F",u1t="complete",kro="style",Sb=0,AD=1,Fq=2,T4e=null,w4e=null,_1t={dialog:!0,webview:!0},E4e=null,d1t=typeof setTimeout=="function"?setTimeout:void 0,Nro=typeof clearTimeout=="function"?clearTimeout:void 0,AC=-1,h1t=typeof Promise=="function"?Promise:void 0,Hro=typeof queueMicrotask=="function"?queueMicrotask:typeof h1t<"u"?function(P){return h1t.resolve(null).then(P).catch(lg)}:d1t,D4e=null,RC=0,nL=1,m1t=2,p1t=3,n4=4,o4=new Map,f1t=new Set,Cb=Or.d;Or.d={f:function(){var P=Cb.f(),C=L1();return P||C},r:function(P){var C=Wt(P);C!==null&&C.tag===5&&C.type==="form"?Nh(C):Cb.r(P)},D:function(P){Cb.D(P),La("dns-prefetch",P,null)},C:function(P,C){Cb.C(P,C),La("preconnect",P,C)},L:function(P,C,k){Cb.L(P,C,k);var W=RD;if(W&&P&&C){var Z='link[rel="preload"][as="'+Vn(C)+'"]';C==="image"&&k&&k.imageSrcSet?(Z+='[imagesrcset="'+Vn(k.imageSrcSet)+'"]',typeof k.imageSizes=="string"&&(Z+='[imagesizes="'+Vn(k.imageSizes)+'"]')):Z+='[href="'+Vn(P)+'"]';var le=Z;switch(C){case"style":le=ac(P);break;case"script":le=Rp(P)}o4.has(le)||(P=Lr({rel:"preload",href:C==="image"&&k&&k.imageSrcSet?void 0:P,as:C},k),o4.set(le,P),W.querySelector(Z)!==null||C==="style"&&W.querySelector(Ku(le))||C==="script"&&W.querySelector(md(le))||(C=W.createElement("link"),Lc(C,"link",P),tt(C),W.head.appendChild(C)))}},m:function(P,C){Cb.m(P,C);var k=RD;if(k&&P){var W=C&&typeof C.as=="string"?C.as:"script",Z='link[rel="modulepreload"][as="'+Vn(W)+'"][href="'+Vn(P)+'"]',le=Z;switch(W){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":le=Rp(P)}if(!o4.has(le)&&(P=Lr({rel:"modulepreload",href:P},C),o4.set(le,P),k.querySelector(Z)===null)){switch(W){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(k.querySelector(md(le)))return}W=k.createElement("link"),Lc(W,"link",P),tt(W),k.head.appendChild(W)}}},X:function(P,C){Cb.X(P,C);var k=RD;if(k&&P){var W=ge(k).hoistableScripts,Z=Rp(P),le=W.get(Z);le||(le=k.querySelector(md(Z)),le||(P=Lr({src:P,async:!0},C),(C=o4.get(Z))&&Qu(P,C),le=k.createElement("script"),tt(le),Lc(le,"link",P),k.head.appendChild(le)),le={type:"script",instance:le,count:1,state:null},W.set(Z,le))}},S:function(P,C,k){Cb.S(P,C,k);var W=RD;if(W&&P){var Z=ge(W).hoistableStyles,le=ac(P);C=C||"default";var Le=Z.get(le);if(!Le){var qe={loading:RC,preload:null};if(Le=W.querySelector(Ku(le)))qe.loading=nL|n4;else{P=Lr({rel:"stylesheet",href:P,"data-precedence":C},k),(k=o4.get(le))&&bl(P,k);var dt=Le=W.createElement("link");tt(dt),Lc(dt,"link",P),dt._p=new Promise(function(yt,mn){dt.onload=yt,dt.onerror=mn}),dt.addEventListener("load",function(){qe.loading|=nL}),dt.addEventListener("error",function(){qe.loading|=m1t}),qe.loading|=n4,Su(Le,C,W)}Le={type:"stylesheet",instance:Le,count:1,state:qe},Z.set(le,Le)}}},M:function(P,C){Cb.M(P,C);var k=RD;if(k&&P){var W=ge(k).hoistableScripts,Z=Rp(P),le=W.get(Z);le||(le=k.querySelector(md(Z)),le||(P=Lr({src:P,async:!0,type:"module"},C),(C=o4.get(Z))&&Qu(P,C),le=k.createElement("script"),tt(le),Lc(le,"link",P),k.head.appendChild(le)),le={type:"script",instance:le,count:1,state:null},W.set(Z,le))}}};var RD=typeof document>"u"?null:document,Bq=null,oL=null,A4e=null,zq=null,kC=D3,rL={$$typeof:fs,Provider:null,Consumer:null,_currentValue:kC,_currentValue2:kC,_threadCount:0},x1t="%c%s%c ",g1t="background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px",y1t="",Vq=" ",Iro=Function.prototype.bind,b1t=!1,P1t=null,v1t=null,S1t=null,C1t=null,M1t=null,T1t=null,w1t=null,E1t=null,D1t=null;P1t=function(P,C,k,W){C=e(P,C),C!==null&&(k=n(C.memoizedState,k,0,W),C.memoizedState=k,C.baseState=k,P.memoizedProps=Lr({},P.memoizedProps),k=k0(P,2),k!==null&&Zs(k,P,2))},v1t=function(P,C,k){C=e(P,C),C!==null&&(k=i(C.memoizedState,k,0),C.memoizedState=k,C.baseState=k,P.memoizedProps=Lr({},P.memoizedProps),k=k0(P,2),k!==null&&Zs(k,P,2))},S1t=function(P,C,k,W){C=e(P,C),C!==null&&(k=o(C.memoizedState,k,W),C.memoizedState=k,C.baseState=k,P.memoizedProps=Lr({},P.memoizedProps),k=k0(P,2),k!==null&&Zs(k,P,2))},C1t=function(P,C,k){P.pendingProps=n(P.memoizedProps,C,0,k),P.alternate&&(P.alternate.pendingProps=P.pendingProps),C=k0(P,2),C!==null&&Zs(C,P,2)},M1t=function(P,C){P.pendingProps=i(P.memoizedProps,C,0),P.alternate&&(P.alternate.pendingProps=P.pendingProps),C=k0(P,2),C!==null&&Zs(C,P,2)},T1t=function(P,C,k){P.pendingProps=o(P.memoizedProps,C,k),P.alternate&&(P.alternate.pendingProps=P.pendingProps),C=k0(P,2),C!==null&&Zs(C,P,2)},w1t=function(P){var C=k0(P,2);C!==null&&Zs(C,P,2)},E1t=function(P){a=P},D1t=function(P){s=P};var $q=!0,Wq=null,R4e=!1,S7=null,C7=null,M7=null,iL=new Map,sL=new Map,T7=[],Lro="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" "),Uq=null;if(Wh.prototype.render=Np.prototype.render=function(P){var C=this._internalRoot;if(C===null)throw Error("Cannot update an unmounted root.");var k=arguments;typeof k[1]=="function"?console.error("does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."):f(k[1])?console.error("You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root."):typeof k[1]<"u"&&console.error("You passed a second argument to root.render(...) but it only accepts one argument."),k=P;var W=C.current,Z=bu(W);jt(W,Z,k,C,null,null)},Wh.prototype.unmount=Np.prototype.unmount=function(){var P=arguments;if(typeof P[0]=="function"&&console.error("does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."),P=this._internalRoot,P!==null){this._internalRoot=null;var C=P.containerInfo;(Fc&(px|o6))!==Wy&&console.error("Attempted to synchronously unmount a root while React was already rendering. React cannot finish unmounting the root until the current render has completed, which may lead to a race condition."),jt(P.current,2,null,P,null,null),L1(),C[Kc]=null}},Wh.prototype.unstable_scheduleHydration=function(P){if(P){var C=Lt();P={blockedOn:null,target:P,priority:C};for(var k=0;k<T7.length&&C!==0&&C<T7[k].priority;k++);T7.splice(k,0,P),k===0&&ur(P)}},(function(){var P=Qi.version;if(P!=="19.1.0")throw Error(`Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:
|
|
233
233
|
- react: `+(P+`
|
|
234
234
|
- react-dom: 19.1.0
|
|
235
235
|
Learn more: https://react.dev/warnings/version-mismatch`))})(),typeof Map=="function"&&Map.prototype!=null&&typeof Map.prototype.forEach=="function"&&typeof Set=="function"&&Set.prototype!=null&&typeof Set.prototype.clear=="function"&&typeof Set.prototype.forEach=="function"||console.error("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://react.dev/link/react-polyfills"),Or.findDOMNode=function(P){var C=P._reactInternals;if(C===void 0)throw typeof P.render=="function"?Error("Unable to find node on an unmounted component."):(P=Object.keys(P).join(","),Error("Argument appears to not be a ReactComponent. Keys: "+P));return P=v(C),P=P!==null?S(P):null,P=P===null?null:P.stateNode,P},!(function(){var P={bundleType:1,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:an,reconcilerVersion:"19.1.0"};return P.overrideHookState=P1t,P.overrideHookStateDeletePath=v1t,P.overrideHookStateRenamePath=S1t,P.overrideProps=C1t,P.overridePropsDeletePath=M1t,P.overridePropsRenamePath=T1t,P.scheduleUpdate=w1t,P.setErrorHandler=E1t,P.setSuspenseHandler=D1t,P.scheduleRefresh=p,P.scheduleRoot=h,P.setRefreshHandler=x,P.getCurrentFiber=go,P.getLaneLabelMap=mi,P.injectProfilingHooks=De,be(P)})()&&St&&window.top===window.self&&(-1<navigator.userAgent.indexOf("Chrome")&&navigator.userAgent.indexOf("Edge")===-1||-1<navigator.userAgent.indexOf("Firefox"))){var A1t=window.location.protocol;/^(https?|file):$/.test(A1t)&&console.info("%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools"+(A1t==="file:"?`
|
|
@@ -254,10 +254,10 @@ You might need to use a local HTTP server (instead of file://): https://react.de
|
|
|
254
254
|
`+c+` |
|
|
255
255
|
`+i.line+" | "+l+`
|
|
256
256
|
`+c+" | "+MK("",r.column-1," ")+MK("",_,"^")}else e+=`
|
|
257
|
-
at `+s}return e},gO.buildMessage=function(t,e){var n={literal:function(l){return'"'+r(l.text)+'"'},class:function(l){var u=l.parts.map(function(_){return Array.isArray(_)?i(_[0])+"-"+i(_[1]):i(_)});return"["+(l.inverted?"^":"")+u.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(l){return l.description}};function o(l){return l.charCodeAt(0).toString(16).toUpperCase()}function r(l){return l.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(u){return"\\x0"+o(u)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(u){return"\\x"+o(u)})}function i(l){return l.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(u){return"\\x0"+o(u)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(u){return"\\x"+o(u)})}function s(l){return n[l.type](l)}function a(l){var u=l.map(s),_,d;if(u.sort(),u.length>0){for(_=1,d=1;_<u.length;_++)u[_-1]!==u[_]&&(u[d]=u[_],d++);u.length=d}switch(u.length){case 1:return u[0];case 2:return u[0]+" or "+u[1];default:return u.slice(0,-1).join(", ")+", or "+u[u.length-1]}}function c(l){return l?'"'+r(l)+'"':"end of input"}return"Expected "+a(t)+" but "+c(e)+" found."};function TK(t){if(t.length===0)return{minX:0,maxX:0,minY:0,maxY:0};let e=1/0,n=-1/0,o=1/0,r=-1/0,i=s=>{e=Math.min(e,s.x),n=Math.max(n,s.x),o=Math.min(o,s.y),r=Math.max(r,s.y)};return t.forEach(s=>{switch(s.type){case"path":s.points.forEach(i);break;case"text":i({x:s.x,y:s.y});break;case"circle":{let{x:a,y:c,radius:l}=s;i({x:a-l,y:c-l}),i({x:a+l,y:c+l});break}case"box":{let{x:a,y:c,width:l,height:u}=s,_=l/2,d=u/2;i({x:a-_,y:c-d}),i({x:a+_,y:c+d});break}}}),{minX:e,maxX:n,minY:o,maxY:r}}var D7t=(t,e="right")=>{switch(e){case"down":switch(t){case"middle_top":return"middle_right";case"middle_bottom":return"middle_left";case"middle_left":return"middle_bottom";case"middle_right":return"middle_top"}break;case"up":switch(t){case"middle_top":return"middle_left";case"middle_bottom":return"middle_right";case"middle_left":return"middle_top";case"middle_right":return"middle_bottom"}break;case"left":switch(t){case"middle_top":return"middle_bottom";case"middle_bottom":return"middle_top";case"middle_left":return"middle_right";case"middle_right":return"middle_left"}break;case"right":return t}return t},yO=(t,e)=>{let{primitives:n,center:o,ports:r,size:i}=t,s=xO({a:1,b:0,c:0,d:-1,e:0,f:2*o.y}),a=n.map(l=>{switch(l={...l},l.type){case"path":return{...l,points:l.points.map(m=>Dg(s,m))};case"text":let u=Dg(s,{x:l.x,y:l.y}),_={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{...l,x:u.x,y:u.y,anchor:_[l.anchor]};case"circle":case"box":let d=Dg(s,{x:l.x,y:l.y});return{...l,x:d.x,y:d.y}}}),c=r.map(l=>({...l,...Dg(s,l)}));return{primitives:a,center:o,ports:c,size:i,...e}},cA=(t,e)=>{let{primitives:n,center:o,ports:r,size:i}=t,s=xO({a:-1,b:0,c:0,d:1,e:0,f:2*o.x}),a=n.map(l=>{switch(l={...l},l.type){case"path":return{...l,points:l.points.map(m=>Dg(s,m))};case"text":let u=Dg(s,{x:l.x,y:l.y}),_={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{...l,x:u.x,y:u.y,anchor:_[l.anchor]};case"circle":case"box":let d=Dg(s,{x:l.x,y:l.y});return{...l,x:d.x,y:d.y}}}),c=r.map(l=>({...l,...Dg(s,l)}));return{primitives:a,center:o,ports:c,size:i,...e}},wK=(t,e)=>{let{newOrientation:n,overrides:o}=e,r={up:Math.PI/2,right:0,down:-Math.PI/2,left:-Math.PI},i=w7t(n?r[n]:Math.PI/2,t.center.x,t.center.y),{primitives:s,center:a,size:c,ports:l}=t,u=s.map(m=>{switch(m={...m},m.type){case"path":return{...m,points:m.points.map(f=>Dg(i,f))};case"text":let h=Dg(i,{x:m.x,y:m.y});return m.anchor=D7t(m.anchor,n??"right"),{...m,x:h.x,y:h.y};case"circle":let p=Dg(i,{x:m.x,y:m.y});return{...m,x:p.x,y:p.y};case"box":let x=Dg(i,{x:m.x,y:m.y});return{...m,x:x.x,y:x.y,width:m.height,height:m.width}}}),_=l.map(m=>({...m,...Dg(i,m)})),d=TK(u);return{primitives:u,center:a,ports:_,size:{width:d.maxX-d.minX,height:d.maxY-d.minY},...o}},ro=(t,e="down",n={})=>wK(t,{newOrientation:e,overrides:n}),A7t=class{symbol;constructor(e){this.symbol=JSON.parse(JSON.stringify(e)),this.symbol.size=this.computeSize()}changeTextAnchor(e,n,o){return this.symbol={...this.symbol,primitives:this.symbol.primitives.map(r=>r.type==="text"&&r.text===e?{...r,anchor:n,...o?{x:r.x+o.x,y:r.y+o.y}:{}}:r)},this}labelPort(e,n){return this.symbol={...this.symbol,ports:this.symbol.ports.map(o=>o.labels.includes(e)?{...o,labels:n}:o)},this}rotateRightFacingSymbol(e){return this.symbol=wK(this.symbol,{newOrientation:e}),this}computeSize(){let e=TK(this.symbol.primitives);return{width:e.maxX-e.minX,height:e.maxY-e.minY}}build(){return{...this.symbol,size:this.computeSize()}}},cn=t=>{let e=t.primitives??[...Object.values(t.paths??{}),...Object.values(t.texts??{}),...Object.values(t.circles??{}),...Object.values(t.rects??{})],n=t.ports??Object.entries(t.refblocks).flatMap(([r,i])=>[{...i,labels:[r]}]),o=t.center??{x:t.bounds.centerX,y:t.bounds.centerY};return n.length===2&&(o={x:(n[0].x+n[1].x)/2,y:(n[0].y+n[1].y)/2}),new A7t({...t,primitives:e,ports:n,center:o})},KC={paths:{path11:{type:"path",points:[{x:-.54,y:.03},{x:-.3,y:.04}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.29,y:.04},{x:.54,y:.04}],color:"primary",fill:!1},"path11-5-5":{type:"path",points:[{x:.1,y:.13},{x:0,y:-.06},{x:-.11,y:.13}],color:"primary",fill:!1},path17:{type:"path",points:[{x:0,y:-.13},{x:.07,y:-.11}],color:"primary",fill:!1},path18:{type:"path",points:[{x:.07,y:-.11},{x:.14,y:-.13}],color:"primary",fill:!1},path19:{type:"path",points:[{x:-.15,y:-.13},{x:-.07,y:-.11}],color:"primary",fill:!1},path20:{type:"path",points:[{x:-.07,y:-.11},{x:0,y:-.13}],color:"primary",fill:!1}},refblocks:{left1:{x:-.54,y:.03},right1:{x:.54,y:.04}},bounds:{width:1.14,height:.79,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:.04,radius:.29,color:"primary",fill:!1}}},{paths:R7t,bounds:bO,refblocks:Sve,circles:k7t}=KC,N7t=cn({primitives:[...Object.values(R7t),...Object.values(k7t),{type:"text",text:"{REF}",x:-.15,y:.3894553499999995},{type:"text",text:"{VAL}",x:.15,y:.3894553499999995}],ports:[{...Sve.left1,labels:["1"]},{...Sve.right1,labels:["2"]}],size:{width:bO.width,height:bO.height},center:{x:bO.centerX,y:bO.centerY}}).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:H7t,bounds:PO,refblocks:Cve,circles:I7t}=KC,L7t=cn({primitives:[...Object.values(H7t),...Object.values(I7t),{type:"text",text:"{REF}",x:-0,y:.4094553499999995},{type:"text",text:"{VAL}",x:0,y:-.4094553499999995}],ports:[{...Cve.left1,labels:["1"]},{...Cve.right1,labels:["2"]}],size:{width:PO.width,height:PO.height},center:{x:PO.centerX,y:PO.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:O7t,bounds:vO,refblocks:Mve,circles:F7t}=KC,B7t=cn({primitives:[...Object.values(O7t),...Object.values(F7t),{type:"text",text:"{REF}",x:-0,y:-.3094553499999995},{type:"text",text:"{VAL}",x:0,y:.4094553499999995}],ports:[{...Mve.left1,labels:["1"]},{...Mve.right1,labels:["2"]}],size:{width:vO.width,height:vO.height},center:{x:vO.centerX,y:vO.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:z7t,bounds:SO,refblocks:Tve,circles:V7t}=KC,$7t=cn({primitives:[...Object.values(z7t),...Object.values(V7t),{type:"text",text:"{REF}",x:-0,y:.4094553499999995},{type:"text",text:"{VAL}",x:0,y:-.4094553499999995}],ports:[{...Tve.left1,labels:["1"]},{...Tve.right1,labels:["2"]}],size:{width:SO.width,height:SO.height},center:{x:SO.centerX,y:SO.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:W7t,bounds:CO,refblocks:wve,circles:U7t}=KC,X7t=cn({primitives:[...Object.values(W7t),...Object.values(U7t),{type:"text",text:"{REF}",x:.15,y:-.2894553499999995},{type:"text",text:"{VAL}",x:-.15,y:-.2894553499999995}],ports:[{...wve.left1,labels:["1"]},{...wve.right1,labels:["2"]}],size:{width:CO.width,height:CO.height},center:{x:CO.centerX,y:CO.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:j7t,bounds:MO,refblocks:Eve,circles:G7t}=KC,Y7t=cn({primitives:[...Object.values(j7t),...Object.values(G7t),{type:"text",text:"{REF}",x:.15,y:-.2894553499999995},{type:"text",text:"{VAL}",x:-.15,y:-.2894553499999995}],ports:[{...Eve.left1,labels:["1"]},{...Eve.right1,labels:["2"]}],size:{width:MO.width,height:MO.height},center:{x:MO.centerX,y:MO.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),QC={paths:{path40:{type:"path",points:[{x:.14,y:.04},{x:-.12,y:-.09}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.12,y:.18},{x:.14,y:.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.12,y:-.09},{x:-.12,y:.18}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.14,y:.18},{x:.14,y:-.09}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.12,y:.04},{x:-.52,y:.04}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.52,y:.04},{x:.15,y:.04}],color:"primary",fill:!1},"path43-8":{type:"path",points:[{x:.14,y:.18},{x:.08,y:.2}],color:"primary",fill:!1},"path43-8-3":{type:"path",points:[{x:.21,y:-.11},{x:.15,y:-.09}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.01,y:.27},bottom1:{type:"text",text:"{VAL}",x:0,y:-.27}},refblocks:{left1:{x:-.52,y:.04},right1:{x:.52,y:.04}},bounds:{minX:-.55,maxX:.55,minY:-.27,maxY:.27,width:1.09,height:.55,centerX:0,centerY:0},circles:{}},{paths:q7t,texts:Oro,bounds:TO,refblocks:Dve,circles:J7t}=QC,K7t=cn({primitives:[...Object.values(q7t),...Object.values(J7t),{type:"text",text:"{REF}",x:-.15,y:.3294553499999995},{type:"text",text:"{VAL}",x:.15,y:.3294553499999995}],ports:[{...Dve.left1,labels:["1"]},{...Dve.right1,labels:["2"]}],size:{width:TO.width,height:TO.height},center:{x:TO.centerX,y:TO.centerY}}).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),Q7t=cn(QC).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1","neg"]).labelPort("right1",["2","pos"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:Z7t,texts:Fro,bounds:wO,refblocks:Ave,circles:eSt}=QC,tSt=cn({primitives:[...Object.values(Z7t),...Object.values(eSt),{type:"text",text:"{REF}",x:-0,y:-.2294553499999995},{type:"text",text:"{VAL}",x:0,y:.3294553499999995}],ports:[{...Ave.left1,labels:["1"]},{...Ave.right1,labels:["2"]}],size:{width:wO.width,height:wO.height},center:{x:wO.centerX,y:wO.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),nSt=cn(QC).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1","neg"]).labelPort("right1",["2","pos"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:oSt,texts:Bro,bounds:EO,refblocks:Rve,circles:rSt}=QC,iSt=cn({primitives:[...Object.values(oSt),...Object.values(rSt),{type:"text",text:"{REF}",x:.15,y:-.2294553499999995},{type:"text",text:"{VAL}",x:-.15,y:-.2294553499999995}],ports:[{...Rve.left1,labels:["1"]},{...Rve.right1,labels:["2"]}],size:{width:EO.width,height:EO.height},center:{x:EO.centerX,y:EO.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:sSt,texts:zro,bounds:DO,refblocks:kve,circles:aSt}=QC,cSt=cn({primitives:[...Object.values(sSt),...Object.values(aSt),{type:"text",text:"{REF}",x:.15,y:-.2294553499999995},{type:"text",text:"{VAL}",x:-.15,y:-.2294553499999995}],ports:[{...kve.left1,labels:["1"]},{...kve.right1,labels:["2"]}],size:{width:DO.width,height:DO.height},center:{x:DO.centerX,y:DO.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),EK={paths:{path40:{type:"path",points:[{x:.14,y:.04},{x:-.12,y:-.09}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.12,y:.18},{x:.14,y:.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.12,y:-.09},{x:-.12,y:.18}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.14,y:.18},{x:.14,y:-.09}],color:"primary",fill:!1},path44:{type:"path",points:[{x:.14,y:.04},{x:-.52,y:.04}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.52,y:.04},{x:.15,y:.04}],color:"primary",fill:!1},"path43-8":{type:"path",points:[{x:.18,y:.18},{x:.11,y:.18}],color:"primary",fill:!1},"path43-8-8":{type:"path",points:[{x:.18,y:-.09},{x:.11,y:-.09}],color:"primary",fill:!1}},refblocks:{left1:{x:-.52,y:.04},right1:{x:.52,y:.04}},bounds:{width:1.09,height:.55,centerX:0,centerY:0},circles:{}},{paths:lSt,bounds:AO,refblocks:Nve,circles:uSt}=EK,_St=cn({primitives:[...Object.values(lSt),...Object.values(uSt),{type:"text",text:"{REF}",x:-.16,y:.2294553499999995},{type:"text",text:"{VAL}",x:.16,y:.2294553499999995}],ports:[{...Nve.left1,labels:["1"]},{...Nve.right1,labels:["2"]}],size:{width:AO.width,height:AO.height},center:{x:AO.centerX,y:AO.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").build(),{paths:dSt,bounds:RO,refblocks:Hve,circles:hSt}=EK,Ive=cn({primitives:[...Object.values(dSt),...Object.values(hSt),{type:"text",text:"{REF}",x:-1118e-7,y:-.18},{type:"text",text:"{VAL}",x:1118e-7,y:.2738453}],ports:[{...Hve.left1,labels:["1"]},{...Hve.right1,labels:["2"]}],size:{width:RO.width,height:RO.height},center:{x:RO.centerX,y:RO.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("left").labelPort("left1",["2"]).labelPort("right1",["1"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:mSt,bounds:kO,refblocks:Lve,circles:pSt}=EK,fSt=cn({primitives:[...Object.values(mSt),...Object.values(pSt),{type:"text",text:"{REF}",x:-.0050250999999996715,y:.27384529999999985,anchor:"middle_left"},{type:"text",text:"{VAL}",x:-.00011179999999999524,y:-.27384530000000007,anchor:"middle_left"}],ports:[{...Lve.left1,labels:["1"]},{...Lve.right1,labels:["2"]}],size:{width:kO.width,height:kO.height},center:{x:kO.centerX,y:kO.centerY}}).changeTextAnchor("{VAL}","middle_top").labelPort("right1",["2"]).labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_bottom").build(),DK=ro(Ive,"down"),AK=DK.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),RK=DK.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");AK.anchor="middle_left",RK.anchor="middle_left",AK.x=.25,AK.y+=.21,RK.y-=.21,RK.x=.25;var xSt=DK;function za(t){let e=t.size;if(!e){let n=TK(t.primitives);e={width:n.maxX-n.minX,height:n.maxY-n.minY}}return{...t,size:e}}var gSt={paths:{path43:{type:"path",points:[{x:-.06,y:.19},{x:-.06,y:-.12}],color:"primary",fill:!1},"path43-6":{type:"path",points:[{x:.02,y:.13},{x:.02,y:-.06}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.06,y:.03},{x:-.45,y:.03}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.45,y:.03},{x:.03,y:.03}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.03,y:.27},bottom1:{type:"text",text:"{VAL}",x:-.03,y:-.28}},refblocks:{left1:{x:-.45,y:.03},right1:{x:.45,y:.03}},bounds:{width:.95,height:.29,centerX:0,centerY:.06},circles:{}},{paths:ySt,texts:Ove,bounds:NO,refblocks:Fve,circles:bSt}=gSt,Bve=za({primitives:[...Object.values(ySt),...Object.values(bSt),{...Ove.top1,anchor:"middle_bottom"},{...Ove.bottom1,anchor:"middle_top"}],ports:[{...Fve.left1,labels:["1"]},{...Fve.right1,labels:["2"]}],size:{width:NO.width,height:NO.height},center:{x:NO.centerX,y:NO.centerY}}),PSt=wK(Bve,{newOrientation:"up"}),HO={paths:{path1:{type:"path",points:[{x:-.53,y:.05},{x:-.25,y:.05}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.28,y:.05},{x:.57,y:.05}],color:"primary",fill:!1},path3:{type:"path",points:[{x:.02,y:.18},{x:.28,y:.18},{x:.28,y:-.09},{x:-.25,y:-.09},{x:-.25,y:.18},{x:.02,y:.18}],color:"primary",fill:!1}},refblocks:{left1:{x:-.53,y:.05},right1:{x:.57,y:.05}},bounds:{centerX:0,centerY:0},circles:{}},{paths:vSt,bounds:zve,refblocks:Vve,circles:SSt}=HO,CSt=cn({primitives:[...Object.values(vSt),...Object.values(SSt),{type:"text",text:"{REF}",x:-.16,y:.2294553499999995},{type:"text",text:"{VAL}",x:.16,y:.2294553499999995}],ports:[{...Vve.left1,labels:["1"]},{...Vve.right1,labels:["2"]}],center:{x:zve.centerX,y:zve.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").build(),{paths:MSt,bounds:$ve,refblocks:Wve,circles:TSt}=HO,wSt=cn({primitives:[...Object.values(MSt),...Object.values(TSt),{type:"text",text:"{REF}",x:0,y:-.1994553499999995},{type:"text",text:"{VAL}",x:0,y:.2694553499999995}],ports:[{...Wve.left1,labels:["1"]},{...Wve.right1,labels:["2"]}],center:{x:$ve.centerX,y:$ve.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:ESt,bounds:Uve,refblocks:Xve,circles:DSt}=HO,ASt=cn({primitives:[...Object.values(ESt),...Object.values(DSt),{type:"text",text:"{REF}",x:0,y:.2294553499999995},{type:"text",text:"{VAL}",x:0,y:-.1594553499999995}],ports:[{...Xve.left1,labels:["1"]},{...Xve.right1,labels:["2"]}],center:{x:Uve.centerX,y:Uve.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),IO={paths:{path2:{type:"path",points:[{x:.15,y:-.01},{x:.55,y:-.01}],color:"primary",fill:!0},"path2-5":{type:"path",points:[{x:-.15,y:.06},{x:.14,y:.06}],color:"primary",fill:!0},"path2-5-1":{type:"path",points:[{x:.14,y:.06},{x:.14,y:-.08}],color:"primary",fill:!0},"path2-5-1-6":{type:"path",points:[{x:-.16,y:.06},{x:-.16,y:-.08}],color:"primary",fill:!0},"path2-5-4":{type:"path",points:[{x:-.15,y:-.08},{x:.14,y:-.08}],color:"primary",fill:!0},"path2-9":{type:"path",points:[{x:-.55,y:-.01},{x:-.17,y:-.01}],color:"primary",fill:!0}},refblocks:{left1:{x:-.55,y:-.01},right1:{x:.55,y:-.01}},bounds:{width:1.16,height:.35,centerX:0,centerY:0},circles:{}},{paths:RSt,bounds:LO,refblocks:jve,circles:kSt}=IO,NSt=cn({primitives:[...Object.values(RSt),...Object.values(kSt),{type:"text",text:"{REF}",x:-.2,y:.1404553499999995},{type:"text",text:"{VAL}",x:.2,y:.1494553499999995}],ports:[{...jve.left1,labels:["1"]},{...jve.right1,labels:["2"]}],size:{width:LO.width,height:LO.height},center:{x:LO.centerX,y:LO.centerY}}).rotateRightFacingSymbol("down").labelPort("left",["1"]).labelPort("right",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:HSt,bounds:OO,refblocks:Gve,circles:ISt}=IO,LSt=cn({primitives:[...Object.values(HSt),...Object.values(ISt),{type:"text",text:"{REF}",x:0,y:-.2294553499999995},{type:"text",text:"{VAL}",x:0,y:.1704553499999995}],ports:[{...Gve.left1,labels:["1"]},{...Gve.right1,labels:["2"]}],size:{width:OO.width,height:OO.height},center:{x:OO.centerX,y:OO.centerY}}).rotateRightFacingSymbol("left").labelPort("left",["1"]).labelPort("right",["2"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),{paths:OSt,bounds:FO,refblocks:Yve,circles:FSt}=IO,BSt=cn({primitives:[...Object.values(OSt),...Object.values(FSt),{type:"text",text:"{REF}",x:0,y:.2294553499999995},{type:"text",text:"{VAL}",x:0,y:-.1704553499999995}],ports:[{...Yve.left1,labels:["1"]},{...Yve.right1,labels:["2"]}],size:{width:FO.width,height:FO.height},center:{x:FO.centerX,y:FO.centerY}}).rotateRightFacingSymbol("right").labelPort("left",["1"]).labelPort("right",["2"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),{paths:zSt,bounds:BO,refblocks:qve,circles:VSt}=IO,$St=cn({primitives:[...Object.values(zSt),...Object.values(VSt),{type:"text",text:"{REF}",x:.2,y:-.1404553499999995},{type:"text",text:"{VAL}",x:-.2,y:-.1494553499999995}],ports:[{...qve.left1,labels:["1"]},{...qve.right1,labels:["2"]}],size:{width:BO.width,height:BO.height},center:{x:BO.centerX,y:BO.centerY}}).rotateRightFacingSymbol("up").labelPort("left",["1"]).labelPort("right",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:WSt,bounds:Jve,refblocks:Kve,circles:USt}=HO,XSt=cn({primitives:[...Object.values(WSt),...Object.values(USt),{type:"text",text:"{REF}",x:.16,y:-.2294553499999995},{type:"text",text:"{VAL}",x:-.16,y:-.2294553499999995}],ports:[{...Kve.left1,labels:["1"]},{...Kve.right1,labels:["2"]}],center:{x:Jve.centerX,y:Jve.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").build(),kK={paths:{"horizontal-bar":{type:"path",points:[{x:-.4,y:0},{x:.4,y:0}],color:"primary",fill:!1},"middle-dash-1":{type:"path",points:[{x:0,y:.2},{x:0,y:.07}],color:"primary",fill:!1},"middle-dash-2":{type:"path",points:[{x:0,y:.01},{x:0,y:-.12}],color:"primary",fill:!1},"middle-dash-3":{type:"path",points:[{x:0,y:-.18},{x:0,y:-.31}],color:"primary",fill:!1},"left-vertical":{type:"path",points:[{x:-.25,y:0},{x:-.25,y:-.2}],color:"primary",fill:!1},"right-vertical":{type:"path",points:[{x:.25,y:0},{x:.25,y:-.2}],color:"primary",fill:!1},"left-ground":{type:"path",points:[{x:-.3,y:-.2},{x:-.25,y:-.3},{x:-.2,y:-.2},{x:-.3,y:-.2}],color:"primary",fill:!1},"right-ground":{type:"path",points:[{x:.2,y:-.2},{x:.25,y:-.3},{x:.3,y:-.2},{x:.2,y:-.2}],color:"primary",fill:!1}},refblocks:{left1:{x:-.4,y:0},right1:{x:.4,y:0}},bounds:{centerX:0,centerY:-.02},circles:{}},{paths:jSt,bounds:Qve,refblocks:Zve,circles:GSt}=kK,YSt=cn({primitives:[...Object.values(jSt),...Object.values(GSt),{type:"text",text:"{REF}",x:0,y:.2594553499999995}],ports:[{...Zve.left1,labels:["1"]},{...Zve.right1,labels:["2"]}],center:{x:Qve.centerX,y:Qve.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").build(),{paths:qSt,bounds:e7e,refblocks:t7e,circles:JSt}=kK,n7e=cn({primitives:[...Object.values(qSt),...Object.values(JSt),{type:"text",text:"{REF}",x:0,y:.2594553499999995}],ports:[{...t7e.left1,labels:["1"]},{...t7e.right1,labels:["2"]}],center:{x:e7e.centerX,y:e7e.centerY}}).rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),KSt=cA(n7e),{paths:QSt,bounds:o7e,refblocks:r7e,circles:ZSt}=kK,e8t=cn({primitives:[...Object.values(QSt),...Object.values(ZSt),{type:"text",text:"{REF}",x:0,y:.2594553499999995}],ports:[{...r7e.left1,labels:["1"]},{...r7e.right1,labels:["2"]}],center:{x:o7e.centerX,y:o7e.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_right").build(),zO={paths:{path27:{type:"path",points:[{x:.55,y:.02},{x:.07,y:.02}],color:"primary",fill:!1},path28:{type:"path",points:[{x:-.09,y:.02},{x:-.55,y:.02}],color:"primary",fill:!1},path29:{type:"path",points:[{x:.07,y:.28},{x:.07,y:-.25}],color:"primary",fill:!1},path30:{type:"path",points:[{x:-.09,y:.28},{x:-.09,y:-.25}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.01,y:.42},bottom1:{type:"text",text:"{VAL}",x:0,y:-.42}},refblocks:{left1:{x:-.55,y:.02},right1:{x:.55,y:.02}},bounds:{minX:-.58,maxX:.58,minY:-.42,maxY:.42,width:1.16,height:.84,centerX:0,centerY:0},circles:{}},{paths:t8t,texts:Vro,bounds:VO,refblocks:i7e,circles:n8t}=zO,o8t=cn({primitives:[...Object.values(t8t),...Object.values(n8t),{type:"text",text:"{REF}",x:-.2,y:.115},{type:"text",text:"{VAL}",x:.2,y:.115}],ports:[{...i7e.left1,labels:["1"]},{...i7e.right1,labels:["2"]}],size:{width:VO.width,height:VO.height},center:{x:VO.centerX,y:VO.centerY}}).changeTextAnchor("{VAL}","top_left").rotateRightFacingSymbol("down").labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{REF}","bottom_left").build(),r8t=cn(zO).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["2","neg"]).labelPort("right1",["1","pos"]).changeTextAnchor("{REF}","middle_bottom").build(),$O={paths:{"path27-5":{type:"path",points:[{x:.45,y:.02},{x:0,y:.02}],color:"primary",fill:!1},"path28-5":{type:"path",points:[{x:-.09,y:.02},{x:-.54,y:.02}],color:"primary",fill:!1},"path30-7":{type:"path",points:[{x:0,y:.28},{x:0,y:-.25}],color:"primary",fill:!1},path8704:{type:"path",points:[{x:-.14,y:-.24},{x:-.14,y:-.24},{x:-.14,y:-.24},{x:-.14,y:-.24},{x:-.14,y:-.24},{x:-.14,y:-.24},{x:-.14,y:-.24},{x:-.14,y:-.24},{x:-.14,y:-.24},{x:-.14,y:-.23},{x:-.14,y:-.23},{x:-.14,y:-.23},{x:-.14,y:-.23},{x:-.13,y:-.23},{x:-.13,y:-.23},{x:-.13,y:-.23},{x:-.13,y:-.23},{x:-.13,y:-.22},{x:-.13,y:-.22},{x:-.13,y:-.22},{x:-.13,y:-.22},{x:-.13,y:-.22},{x:-.13,y:-.22},{x:-.13,y:-.22},{x:-.13,y:-.22},{x:-.13,y:-.21},{x:-.13,y:-.21},{x:-.13,y:-.21},{x:-.12,y:-.21},{x:-.12,y:-.21},{x:-.12,y:-.21},{x:-.12,y:-.21},{x:-.12,y:-.21},{x:-.12,y:-.2},{x:-.12,y:-.2},{x:-.12,y:-.2},{x:-.12,y:-.2},{x:-.12,y:-.2},{x:-.12,y:-.2},{x:-.12,y:-.2},{x:-.12,y:-.2},{x:-.12,y:-.19},{x:-.12,y:-.19},{x:-.12,y:-.19},{x:-.12,y:-.19},{x:-.11,y:-.19},{x:-.11,y:-.19},{x:-.11,y:-.19},{x:-.11,y:-.18},{x:-.11,y:-.18},{x:-.11,y:-.18},{x:-.11,y:-.18},{x:-.11,y:-.18},{x:-.11,y:-.18},{x:-.11,y:-.18},{x:-.11,y:-.18},{x:-.11,y:-.17},{x:-.11,y:-.17},{x:-.11,y:-.17},{x:-.11,y:-.17},{x:-.11,y:-.17},{x:-.11,y:-.17},{x:-.11,y:-.17},{x:-.11,y:-.17},{x:-.1,y:-.16},{x:-.1,y:-.16},{x:-.1,y:-.16},{x:-.1,y:-.16},{x:-.1,y:-.16},{x:-.1,y:-.16},{x:-.1,y:-.16},{x:-.1,y:-.16},{x:-.1,y:-.15},{x:-.1,y:-.15},{x:-.1,y:-.15},{x:-.1,y:-.15},{x:-.1,y:-.15},{x:-.1,y:-.15},{x:-.1,y:-.15},{x:-.1,y:-.14},{x:-.1,y:-.14},{x:-.1,y:-.14},{x:-.1,y:-.14},{x:-.1,y:-.14},{x:-.1,y:-.14},{x:-.1,y:-.14},{x:-.09,y:-.14},{x:-.09,y:-.13},{x:-.09,y:-.13},{x:-.09,y:-.13},{x:-.09,y:-.13},{x:-.09,y:-.13},{x:-.09,y:-.13},{x:-.09,y:-.13},{x:-.09,y:-.13},{x:-.09,y:-.12},{x:-.09,y:-.12},{x:-.09,y:-.12},{x:-.09,y:-.12},{x:-.09,y:-.12},{x:-.09,y:-.12},{x:-.09,y:-.12},{x:-.09,y:-.12},{x:-.09,y:-.11},{x:-.09,y:-.11},{x:-.09,y:-.11},{x:-.09,y:-.11},{x:-.09,y:-.11},{x:-.09,y:-.11},{x:-.09,y:-.1},{x:-.09,y:-.1},{x:-.09,y:-.1},{x:-.09,y:-.1},{x:-.09,y:-.1},{x:-.09,y:-.1},{x:-.08,y:-.09},{x:-.08,y:-.09},{x:-.08,y:-.09},{x:-.08,y:-.09},{x:-.08,y:-.09},{x:-.08,y:-.09},{x:-.08,y:-.08},{x:-.08,y:-.08},{x:-.08,y:-.08},{x:-.08,y:-.08},{x:-.08,y:-.08},{x:-.08,y:-.08},{x:-.08,y:-.07},{x:-.08,y:-.07},{x:-.08,y:-.07},{x:-.08,y:-.07},{x:-.08,y:-.07},{x:-.08,y:-.07},{x:-.08,y:-.06},{x:-.08,y:-.06},{x:-.08,y:-.06},{x:-.08,y:-.06},{x:-.08,y:-.06},{x:-.08,y:-.05},{x:-.08,y:-.05},{x:-.08,y:-.05},{x:-.08,y:-.05},{x:-.08,y:-.05},{x:-.08,y:-.05},{x:-.08,y:-.04},{x:-.08,y:-.04},{x:-.08,y:-.04},{x:-.08,y:-.04},{x:-.08,y:-.04},{x:-.08,y:-.04},{x:-.08,y:-.03},{x:-.08,y:-.03},{x:-.08,y:-.03},{x:-.08,y:-.03},{x:-.08,y:-.03},{x:-.08,y:-.03},{x:-.08,y:-.02},{x:-.08,y:-.02},{x:-.08,y:-.02},{x:-.08,y:-.02},{x:-.08,y:-.02},{x:-.08,y:-.02},{x:-.08,y:-.01},{x:-.08,y:-.01},{x:-.08,y:-.01},{x:-.08,y:-.01},{x:-.08,y:-.01},{x:-.08,y:0},{x:-.08,y:0},{x:-.08,y:0},{x:-.08,y:0},{x:-.08,y:0},{x:-.08,y:0},{x:-.08,y:.01},{x:-.07,y:.01},{x:-.07,y:.01},{x:-.07,y:.01},{x:-.07,y:.01},{x:-.07,y:.01},{x:-.08,y:.02},{x:-.08,y:.02},{x:-.08,y:.02},{x:-.08,y:.02},{x:-.08,y:.02},{x:-.08,y:.02},{x:-.08,y:.03},{x:-.08,y:.03},{x:-.08,y:.03},{x:-.08,y:.03},{x:-.08,y:.03},{x:-.08,y:.03},{x:-.08,y:.04},{x:-.08,y:.04},{x:-.08,y:.04},{x:-.08,y:.04},{x:-.08,y:.04},{x:-.08,y:.05},{x:-.08,y:.05},{x:-.08,y:.05},{x:-.08,y:.05},{x:-.08,y:.05},{x:-.08,y:.05},{x:-.08,y:.06},{x:-.08,y:.06},{x:-.08,y:.06},{x:-.08,y:.06},{x:-.08,y:.06},{x:-.08,y:.06},{x:-.08,y:.06},{x:-.08,y:.06},{x:-.08,y:.07},{x:-.08,y:.07},{x:-.08,y:.07},{x:-.08,y:.07},{x:-.08,y:.07},{x:-.08,y:.07},{x:-.08,y:.07},{x:-.08,y:.08},{x:-.08,y:.08},{x:-.08,y:.08},{x:-.08,y:.08},{x:-.08,y:.08},{x:-.08,y:.08},{x:-.08,y:.09},{x:-.08,y:.09},{x:-.08,y:.09},{x:-.08,y:.09},{x:-.08,y:.09},{x:-.08,y:.09},{x:-.08,y:.09},{x:-.08,y:.1},{x:-.08,y:.1},{x:-.08,y:.1},{x:-.08,y:.1},{x:-.08,y:.1},{x:-.08,y:.1},{x:-.08,y:.1},{x:-.08,y:.11},{x:-.08,y:.11},{x:-.08,y:.11},{x:-.08,y:.11},{x:-.08,y:.11},{x:-.08,y:.11},{x:-.08,y:.11},{x:-.08,y:.12},{x:-.08,y:.12},{x:-.08,y:.12},{x:-.08,y:.12},{x:-.09,y:.12},{x:-.09,y:.12},{x:-.09,y:.12},{x:-.09,y:.13},{x:-.09,y:.13},{x:-.09,y:.13},{x:-.09,y:.13},{x:-.09,y:.13},{x:-.09,y:.13},{x:-.09,y:.14},{x:-.09,y:.14},{x:-.09,y:.14},{x:-.09,y:.14},{x:-.09,y:.14},{x:-.09,y:.14},{x:-.09,y:.14},{x:-.09,y:.15},{x:-.09,y:.15},{x:-.09,y:.15},{x:-.09,y:.15},{x:-.09,y:.15},{x:-.09,y:.15},{x:-.09,y:.15},{x:-.09,y:.16},{x:-.09,y:.16},{x:-.09,y:.16},{x:-.09,y:.16},{x:-.09,y:.16},{x:-.09,y:.16},{x:-.09,y:.16},{x:-.09,y:.17},{x:-.09,y:.17},{x:-.1,y:.17},{x:-.1,y:.17},{x:-.1,y:.17},{x:-.1,y:.17},{x:-.1,y:.17},{x:-.1,y:.18},{x:-.1,y:.18},{x:-.1,y:.18},{x:-.1,y:.18},{x:-.1,y:.18},{x:-.1,y:.18},{x:-.1,y:.18},{x:-.1,y:.19},{x:-.1,y:.19},{x:-.1,y:.19},{x:-.1,y:.19},{x:-.1,y:.19},{x:-.1,y:.19},{x:-.1,y:.19},{x:-.1,y:.2},{x:-.1,y:.2},{x:-.1,y:.2},{x:-.1,y:.2},{x:-.1,y:.2},{x:-.1,y:.2},{x:-.11,y:.2},{x:-.11,y:.2},{x:-.11,y:.2},{x:-.11,y:.21},{x:-.11,y:.21},{x:-.11,y:.21},{x:-.11,y:.21},{x:-.11,y:.21},{x:-.11,y:.21},{x:-.11,y:.21},{x:-.11,y:.21},{x:-.11,y:.21},{x:-.11,y:.21},{x:-.11,y:.21},{x:-.11,y:.21},{x:-.11,y:.21},{x:-.11,y:.22},{x:-.11,y:.22},{x:-.11,y:.22},{x:-.11,y:.22},{x:-.11,y:.22},{x:-.11,y:.22},{x:-.11,y:.22},{x:-.11,y:.22},{x:-.11,y:.22},{x:-.11,y:.22},{x:-.11,y:.22},{x:-.11,y:.22},{x:-.11,y:.23},{x:-.11,y:.23},{x:-.11,y:.23},{x:-.11,y:.23},{x:-.12,y:.23},{x:-.12,y:.23},{x:-.12,y:.23},{x:-.12,y:.23},{x:-.12,y:.23},{x:-.12,y:.23},{x:-.12,y:.23},{x:-.12,y:.23},{x:-.12,y:.24},{x:-.12,y:.24},{x:-.12,y:.24},{x:-.12,y:.24},{x:-.12,y:.24},{x:-.12,y:.24},{x:-.12,y:.24},{x:-.12,y:.24},{x:-.12,y:.24},{x:-.12,y:.24},{x:-.12,y:.24},{x:-.12,y:.24},{x:-.12,y:.25},{x:-.12,y:.25},{x:-.12,y:.25},{x:-.12,y:.25},{x:-.12,y:.25},{x:-.12,y:.25},{x:-.13,y:.25},{x:-.13,y:.25},{x:-.13,y:.25},{x:-.13,y:.25},{x:-.13,y:.25},{x:-.13,y:.25},{x:-.13,y:.25},{x:-.13,y:.26},{x:-.13,y:.26},{x:-.13,y:.26},{x:-.13,y:.26},{x:-.13,y:.26},{x:-.13,y:.26},{x:-.13,y:.26},{x:-.13,y:.26},{x:-.13,y:.26},{x:-.13,y:.26},{x:-.13,y:.26},{x:-.13,y:.26},{x:-.13,y:.26},{x:-.13,y:.27},{x:-.13,y:.27},{x:-.13,y:.27},{x:-.13,y:.27},{x:-.14,y:.27},{x:-.14,y:.27},{x:-.14,y:.27},{x:-.14,y:.27},{x:-.14,y:.27},{x:-.14,y:.27},{x:-.14,y:.27},{x:-.14,y:.27},{x:-.14,y:.27},{x:-.14,y:.28},{x:-.14,y:.28},{x:-.14,y:.28},{x:-.14,y:.28},{x:-.14,y:.28},{x:-.14,y:.28},{x:-.14,y:.28},{x:-.14,y:.28},{x:-.14,y:.28}],color:"primary",fill:!1},"rect1577-4":{type:"path",points:[{x:.26,y:.25},{x:.12,y:.25},{x:.12,y:.25},{x:.26,y:.25}],color:"primary",fill:!0},"rect1577-4-7":{type:"path",points:[{x:.2,y:.32},{x:.2,y:.18},{x:.19,y:.18},{x:.19,y:.32}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.01,y:.42},bottom1:{type:"text",text:"{VAL}",x:0,y:-.42}},refblocks:{left1:{x:-.54,y:.02},right1:{x:.45,y:.02}},bounds:{minX:-.58,maxX:.58,minY:-.42,maxY:.42,width:1.16,height:.84,centerX:0,centerY:0},circles:{}},{paths:i8t,texts:$ro,bounds:WO,refblocks:s7e,circles:s8t}=$O,a8t=cn({primitives:[...Object.values(i8t),...Object.values(s8t),{type:"text",text:"{REF}",x:.1,y:-.2094553499999995},{type:"text",text:"{VAL}",x:-.2,y:-.2094553499999995}],ports:[{...s7e.left1,labels:["2","neg"]},{...s7e.right1,labels:["1","pos"]}],size:{width:WO.width,height:WO.height},center:{x:WO.centerX,y:WO.centerY}}).changeTextAnchor("{VAL}","top_left").rotateRightFacingSymbol("up").changeTextAnchor("{REF}","bottom_left").build(),c8t=cn($O).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["2","neg"]).labelPort("right1",["1","pos"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:l8t,texts:Wro,bounds:UO,refblocks:a7e,circles:u8t}=$O,_8t=cn({primitives:[...Object.values(l8t),...Object.values(u8t),{type:"text",text:"{REF}",x:0,y:-.4094553499999995},{type:"text",text:"{VAL}",x:-0,y:.4094553499999995}],ports:[{...a7e.left1,labels:["2","neg"]},{...a7e.right1,labels:["1","pos"]}],size:{width:UO.width,height:UO.height},center:{x:UO.centerX,y:UO.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("left").changeTextAnchor("{REF}","middle_bottom").build(),{paths:d8t,texts:Uro,bounds:XO,refblocks:c7e,circles:h8t}=$O,m8t=cn({primitives:[...Object.values(d8t),...Object.values(h8t),{type:"text",text:"{REF}",x:-.2,y:.2094553499999995},{type:"text",text:"{VAL}",x:.3,y:.2094553499999995}],ports:[{...c7e.left1,labels:["2","neg"]},{...c7e.right1,labels:["1","pos"]}],size:{width:XO.width,height:XO.height},center:{x:XO.centerX,y:XO.centerY}}).changeTextAnchor("{VAL}","top_left").rotateRightFacingSymbol("down").changeTextAnchor("{REF}","bottom_left").build(),p8t=cn(zO).rotateRightFacingSymbol("right").changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:f8t,texts:Xro,bounds:jO,refblocks:l7e,circles:x8t}=zO,g8t=cn({primitives:[...Object.values(f8t),...Object.values(x8t),{type:"text",text:"{REF}",x:.2,y:-.095},{type:"text",text:"{VAL}",x:-.2,y:-.095}],ports:[{...l7e.left1,labels:["1"]},{...l7e.right1,labels:["2"]}],size:{width:jO.width,height:jO.height},center:{x:jO.centerX,y:jO.centerY}}).changeTextAnchor("{VAL}","top_left").rotateRightFacingSymbol("up").labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{REF}","bottom_left").build(),ZC={paths:{path11:{type:"path",points:[{x:-.54,y:.03},{x:-.3,y:.03}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.29,y:.03},{x:.54,y:.03}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.29,y:.29},{x:.29,y:-.23}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.02,y:.37},bottom1:{type:"text",text:"{VAL}",x:-.01,y:-.37}},refblocks:{left1:{x:-.54,y:.03},right1:{x:.54,y:.03}},bounds:{minX:-.57,maxX:.57,minY:-.37,maxY:.37,width:1.14,height:.74,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:.04,radius:.29,color:"primary",fill:!1}}},{paths:y8t,texts:jro,bounds:GO,refblocks:u7e,circles:b8t}=ZC,P8t=cn({primitives:[...Object.values(y8t),...Object.values(b8t),{type:"text",text:"{REF}",x:-.15,y:.3894553499999995},{type:"text",text:"{VAL}",x:.15,y:.3894553499999995}],ports:[{...u7e.left1,labels:["1"]},{...u7e.right1,labels:["2"]}],size:{width:GO.width,height:GO.height},center:{x:GO.centerX,y:GO.centerY}}).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),v8t=cn(ZC).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:S8t,texts:Gro,bounds:YO,refblocks:_7e,circles:C8t}=ZC,M8t=cn({primitives:[...Object.values(S8t),...Object.values(C8t),{type:"text",text:"{REF}",x:-0,y:-.2894553499999995},{type:"text",text:"{VAL}",x:0,y:.3894553499999995}],ports:[{..._7e.left1,labels:["1"]},{..._7e.right1,labels:["2"]}],size:{width:YO.width,height:YO.height},center:{x:YO.centerX,y:YO.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),T8t=cn(ZC).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1","neg"]).labelPort("right1",["2","pos"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:w8t,texts:Yro,bounds:qO,refblocks:d7e,circles:E8t}=ZC,D8t=cn({primitives:[...Object.values(w8t),...Object.values(E8t),{type:"text",text:"{REF}",x:.15,y:-.2894553499999995},{type:"text",text:"{VAL}",x:-.15,y:-.2894553499999995}],ports:[{...d7e.left1,labels:["1"]},{...d7e.right1,labels:["2"]}],size:{width:qO.width,height:qO.height},center:{x:qO.centerX,y:qO.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:A8t,texts:qro,bounds:JO,refblocks:h7e,circles:R8t}=ZC,k8t=cn({primitives:[...Object.values(A8t),...Object.values(R8t),{type:"text",text:"{REF}",x:.15,y:-.2894553499999995},{type:"text",text:"{VAL}",x:-.15,y:-.2894553499999995}],ports:[{...h7e.left1,labels:["1"]},{...h7e.right1,labels:["2"]}],size:{width:JO.width,height:JO.height},center:{x:JO.centerX,y:JO.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),KO={paths:{path27:{type:"path",points:[{x:.54,y:-.01},{x:.13,y:-.01}],color:"primary",fill:!1},path29:{type:"path",points:[{x:.13,y:.25},{x:.13,y:-.27}],color:"primary",fill:!1},"path29-2":{type:"path",points:[{x:.07,y:.25},{x:.07,y:-.28}],color:"primary",fill:!1},path30:{type:"path",points:[{x:-.14,y:.25},{x:-.14,y:-.27}],color:"primary",fill:!1},"path29-5":{type:"path",points:[{x:-.08,y:.26},{x:-.08,y:-.27}],color:"primary",fill:!1},"path29-2-7":{type:"path",points:[{x:.07,y:.26},{x:-.08,y:.26}],color:"primary",fill:!1},"path29-2-7-6":{type:"path",points:[{x:.07,y:-.28},{x:-.08,y:-.28}],color:"primary",fill:!1},path43:{type:"path",points:[{x:-.21,y:.32},{x:.2,y:.32}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:0,y:.71},{x:0,y:.33},{x:0,y:.32}],color:"primary",fill:!1},"path43-8":{type:"path",points:[{x:-.21,y:.32},{x:-.21,y:.25}],color:"primary",fill:!1},"path43-8-8":{type:"path",points:[{x:.2,y:.32},{x:.2,y:.25}],color:"primary",fill:!1},"path43-9":{type:"path",points:[{x:.19,y:-.35},{x:-.22,y:-.35}],color:"primary",fill:!1},"path44-0-5":{type:"path",points:[{x:-.02,y:-.71},{x:-.02,y:-.36},{x:-.02,y:-.35}],color:"primary",fill:!1},"path43-8-1":{type:"path",points:[{x:.19,y:-.35},{x:.19,y:-.28}],color:"primary",fill:!1},"path43-8-8-9":{type:"path",points:[{x:-.22,y:-.35},{x:-.22,y:-.28}],color:"primary",fill:!1},path28:{type:"path",points:[{x:-.14,y:-.01},{x:-.54,y:-.01}],color:"primary",fill:!1}},texts:{left1:{type:"text",text:"{REF}",x:.53,y:.28},right1:{type:"text",text:"{VAL}",x:.54,y:-.28}},refblocks:{top1:{x:0,y:.71},bottom1:{x:-.02,y:-.71},left1:{x:-.54,y:-.01},right1:{x:.54,y:-.01}},bounds:{minX:-.57,maxX:.57,minY:-.74,maxY:.74,width:1.14,height:1.48,centerX:0,centerY:0},circles:{}},{paths:N8t,texts:Jro,bounds:QO,refblocks:ZO,circles:H8t}=KO,I8t=cn({primitives:[...Object.values(N8t),...Object.values(H8t),{type:"text",text:"{REF}",x:-.4,y:.4094554499999995},{type:"text",text:"{VAL}",x:.4,y:.4094553499999995}],ports:[{...ZO.left1,labels:["1"]},{...ZO.right1,labels:["3"]},{...ZO.bottom1,labels:["2"]},{...ZO.top1,labels:["4"]}],size:{width:QO.width,height:QO.height},center:{x:QO.centerX,y:QO.centerY}}).rotateRightFacingSymbol("down").changeTextAnchor("{REF}","bottom_left").changeTextAnchor("{VAL}","top_left").build(),L8t=cn(KO).labelPort("top1",["2","gnd1"]).labelPort("bottom1",["4","gnd2"]).labelPort("left1",["3"]).labelPort("right1",["1"]).changeTextAnchor("{REF}","bottom_left").changeTextAnchor("{VAL}","top_left").build(),O8t=cn(KO).labelPort("top1",["4","gnd1"]).labelPort("bottom1",["2","gnd2"]).labelPort("left1",["1"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","bottom_left").changeTextAnchor("{VAL}","top_left").build(),{paths:F8t,texts:Kro,bounds:eF,refblocks:tF,circles:B8t}=KO,z8t=cn({primitives:[...Object.values(F8t),...Object.values(B8t),{type:"text",text:"{VAL}",x:-.4,y:-.4094554499999995},{type:"text",text:"{REF}",x:.4,y:-.4094553499999995}],ports:[{...tF.left1,labels:["1"]},{...tF.right1,labels:["3"]},{...tF.bottom1,labels:["2"]},{...tF.top1,labels:["4"]}],size:{width:eF.width,height:eF.height},center:{x:eF.centerX,y:eF.centerY}}).rotateRightFacingSymbol("up").changeTextAnchor("{REF}","bottom_left").changeTextAnchor("{VAL}","top_left").build(),nF={paths:{path27:{type:"path",points:[{x:.55,y:-.01},{x:.13,y:-.01}],color:"primary",fill:!1},path28:{type:"path",points:[{x:-.14,y:-.01},{x:-.55,y:-.01}],color:"primary",fill:!1},path29:{type:"path",points:[{x:.13,y:-.28},{x:.13,y:.25}],color:"primary",fill:!1},"path29-2":{type:"path",points:[{x:.07,y:-.28},{x:.07,y:.25}],color:"primary",fill:!1},path30:{type:"path",points:[{x:-.14,y:-.28},{x:-.14,y:.25}],color:"primary",fill:!1},"path29-5":{type:"path",points:[{x:-.08,y:-.28},{x:-.08,y:.25}],color:"primary",fill:!1},"path29-2-7":{type:"path",points:[{x:.07,y:-.28},{x:-.08,y:-.28}],color:"primary",fill:!1},"path29-2-7-6":{type:"path",points:[{x:.07,y:.26},{x:-.08,y:.26}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{VAL}",x:-.01,y:-.42},bottom1:{type:"text",text:"{REF}",x:0,y:.43}},refblocks:{left1:{x:-.55,y:-.01},right1:{x:.55,y:-.01}},bounds:{minX:-.58,maxX:.58,minY:-.52,maxY:.43,width:1.16,height:1,centerX:0,centerY:-.04},circles:{}},{paths:V8t,texts:Qro,bounds:oF,refblocks:m7e,circles:$8t}=nF,W8t=cn({primitives:[...Object.values(V8t),...Object.values($8t),{type:"text",text:"{REF}",x:-.3,y:.3094553499999995},{type:"text",text:"{VAL}",x:.3,y:.3094553499999995}],ports:[{...m7e.left1,labels:["1"]},{...m7e.right1,labels:["2"]}],size:{width:oF.width,height:oF.height},center:{x:oF.centerX,y:oF.centerY}}).changeTextAnchor("{VAL}","top_left").rotateRightFacingSymbol("down").labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{REF}","bottom_left").build(),U8t=cn(nF).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["2","neg"]).labelPort("right1",["1","pos"]).changeTextAnchor("{REF}","middle_bottom").build(),X8t=cn(nF).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:j8t,texts:Zro,bounds:rF,refblocks:p7e,circles:G8t}=nF,Y8t=cn({primitives:[...Object.values(j8t),...Object.values(G8t),{type:"text",text:"{REF}",x:.3,y:-.3094553499999995},{type:"text",text:"{VAL}",x:-.3,y:-.3094553499999995}],ports:[{...p7e.left1,labels:["1"]},{...p7e.right1,labels:["2"]}],size:{width:rF.width,height:rF.height},center:{x:rF.centerX,y:rF.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("up").labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{REF}","bottom_left").build(),eM={paths:{path11:{type:"path",points:[{x:1.99,y:-1.64},{x:2.1,y:-1.64}],color:"primary",fill:!1},"path40-0":{type:"path",points:[{x:2.1,y:-1.48},{x:2.1,y:-1.8}],color:"primary",fill:!1},"path40-0-5":{type:"path",points:[{x:2.22,y:-1.5},{x:2.11,y:-1.58}],color:"primary",fill:!1},"path40-0-5-0":{type:"path",points:[{x:2.23,y:-1.78},{x:2.11,y:-1.7}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:2.23,y:-1.49},{x:2.23,y:-1.14}],color:"primary",fill:!1},"path12-1-5-3":{type:"path",points:[{x:2.23,y:-1.97},{x:2.23,y:-1.79}],color:"primary",fill:!1},"arrow-2":{type:"path",points:[{x:2.17,y:-1.7},{x:2.13,y:-1.76},{x:2.19,y:-1.76},{x:2.17,y:-1.7}],color:"primary",fill:!0},path1:{type:"path",points:[{x:1.6,y:-1.5},{x:1.86,y:-1.5}],color:"primary",fill:!1},path2:{type:"path",points:[{x:1.87,y:-1.34},{x:1.87,y:-1.66}],color:"primary",fill:!1},path3:{type:"path",points:[{x:1.99,y:-1.36},{x:1.87,y:-1.44}],color:"primary",fill:!1},path4:{type:"path",points:[{x:1.99,y:-1.64},{x:1.88,y:-1.56}],color:"primary",fill:!1},"arrow-1":{type:"path",points:[{x:1.94,y:-1.56},{x:1.89,y:-1.62},{x:1.96,y:-1.62},{x:1.94,y:-1.56}],color:"primary",fill:!0},path9:{type:"path",points:[{x:1.99,y:-1.35},{x:2.23,y:-1.36}],color:"primary",fill:!1}},texts:{bottom1:{type:"text",text:"{VAL}",x:1.88,y:-1.94},right1:{type:"text",text:"{REF}",x:1.88,y:-1.14}},refblocks:{right1:{x:2.23,y:-1.97},right2:{x:1.6,y:-1.5},right3:{x:2.23,y:-1.14}},bounds:{minX:1.58,maxX:2.35,minY:-1.98,maxY:-1.12,width:.77,height:.86,centerX:1.96,centerY:-1.55},circles:{"path1-0":{type:"circle",x:2.05,y:-1.54,radius:.3,color:"primary",fill:!1}}},q8t=cn(eM).rotateRightFacingSymbol("down").labelPort("right2",["1"]).labelPort("right1",["2"]).labelPort("right3",["3"]).changeTextAnchor("{VAL}","middle_left",{x:.8,y:-.15}).changeTextAnchor("{REF}","middle_left",{x:0,y:.15}).build(),J8t=cn(eM).rotateRightFacingSymbol("right").labelPort("right2",["1"]).labelPort("right1",["2"]).labelPort("right3",["3"]).changeTextAnchor("{VAL}","middle_right").changeTextAnchor("{REF}","middle_right").build(),K8t=cn(eM).rotateRightFacingSymbol("left").labelPort("right2",["1"]).labelPort("right1",["2"]).labelPort("right3",["3"]).changeTextAnchor("{VAL}","middle_left",{x:0,y:-.8}).changeTextAnchor("{REF}","middle_left",{x:0,y:.8}).build(),Q8t=cn(eM).rotateRightFacingSymbol("right").labelPort("right2",["1"]).labelPort("right1",["2"]).labelPort("right3",["3"]).changeTextAnchor("{VAL}","middle_right").changeTextAnchor("{REF}","middle_right").build(),Z8t=cn(eM).rotateRightFacingSymbol("up").labelPort("right2",["1"]).labelPort("right1",["2"]).labelPort("right3",["3"]).changeTextAnchor("{VAL}","middle_left",{x:0,y:-.15}).changeTextAnchor("{REF}","middle_left",{x:.8,y:.15}).build(),eCt=cn(eM).rotateRightFacingSymbol("up").labelPort("right2",["1"]).labelPort("right1",["2"]).labelPort("right3",["3"]).changeTextAnchor("{VAL}","middle_left",{x:0,y:-.15}).changeTextAnchor("{REF}","middle_left",{x:.8,y:.15}).build(),tCt={paths:{path11:{type:"path",points:[{x:-.54,y:0},{x:-.3,y:0}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.29,y:0},{x:.54,y:0}],color:"primary",fill:!1},path2:{type:"path",points:[{x:-.12,y:.09},{x:.12,y:.09}],color:"primary",fill:!1}},texts:{left1:{type:"text",text:"A",x:0,y:-.1}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:0}},bounds:{width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:0,radius:.29,color:"primary",fill:!1}}},{paths:nCt,texts:oCt,bounds:iF,refblocks:f7e,circles:rCt}=tCt,NK=za({primitives:[...Object.values(nCt),...Object.values(rCt),{type:"text",text:"{REF}",x:0,y:-.3594553499999995,anchor:"middle_top"},{type:"text",text:"{VAL}",x:0,y:.35,anchor:"middle_bottom"},{...oCt.left1,x:0,y:.01,anchor:"center",fontSize:.3}],ports:[{...f7e.left1,labels:["1"]},{...f7e.right1,labels:["2"]}],size:{width:iF.width,height:iF.height},center:{x:iF.centerX,y:iF.centerY}});function iCt(t){return typeof t=="object"&&t!==null&&t.type==="path"&&Array.isArray(t.points)&&typeof t.color=="string"}function sCt(t){return typeof t=="object"&&t!==null&&t.type==="text"&&typeof t.text=="string"&&typeof t.x=="number"&&typeof t.y=="number"&&typeof t.anchor=="string"}var{6:HK,2:IK,...aCt}=NK.primitives;iCt(IK)&&IK.points.map(t=>{t.y+=.05}),sCt(HK)&&(HK.y+=.025);function cCt(t){return typeof t=="object"}var x7e=ro({...NK,primitives:Object.values(aCt).filter(cCt)}),lCt={...x7e,primitives:[...x7e.primitives,HK,IK]},tM={paths:{path11:{type:"path",points:[{x:-.54,y:.03},{x:-.3,y:.04}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.29,y:.04},{x:.54,y:.04}],color:"primary",fill:!1},"path11-5-5":{type:"path",points:[{x:.1,y:.13},{x:0,y:-.06},{x:-.11,y:.13}],color:"primary",fill:!1},path2:{type:"path",points:[{x:-.12,y:-.14},{x:.12,y:-.14}],color:"primary",fill:!1}},refblocks:{left1:{x:-.54,y:.03},right1:{x:.54,y:.04}},bounds:{width:1.14,height:.79,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:.04,radius:.29,color:"primary",fill:!1}}},{paths:uCt,bounds:sF,refblocks:g7e,circles:_Ct}=tM,dCt=cn({primitives:[...Object.values(uCt),...Object.values(_Ct),{type:"text",text:"{REF}",x:-.15,y:.3894553499999995},{type:"text",text:"{VAL}",x:.15,y:.3894553499999995}],ports:[{...g7e.left1,labels:["1"]},{...g7e.right1,labels:["2"]}],size:{width:sF.width,height:sF.height},center:{x:sF.centerX,y:sF.centerY}}).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:hCt,bounds:aF,refblocks:y7e,circles:mCt}=tM,pCt=cn({primitives:[...Object.values(hCt),...Object.values(mCt),{type:"text",text:"{REF}",x:-0,y:.3894553499999995},{type:"text",text:"{VAL}",x:0,y:-.3294553499999995}],ports:[{...y7e.left1,labels:["1"]},{...y7e.right1,labels:["2"]}],size:{width:aF.width,height:aF.height},center:{x:aF.centerX,y:aF.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:fCt,bounds:cF,refblocks:b7e,circles:xCt}=tM,gCt=cn({primitives:[...Object.values(fCt),...Object.values(xCt),{type:"text",text:"{REF}",x:-0,y:-.3294553499999995},{type:"text",text:"{VAL}",x:0,y:.4294553499999995}],ports:[{...b7e.left1,labels:["1"]},{...b7e.right1,labels:["2"]}],size:{width:cF.width,height:cF.height},center:{x:cF.centerX,y:cF.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:yCt,bounds:lF,refblocks:P7e,circles:bCt}=tM,PCt=cn({primitives:[...Object.values(yCt),...Object.values(bCt),{type:"text",text:"{REF}",x:-0,y:.3894553499999995},{type:"text",text:"{VAL}",x:0,y:-.3294553499999995}],ports:[{...P7e.left1,labels:["1"]},{...P7e.right1,labels:["2"]}],size:{width:lF.width,height:lF.height},center:{x:lF.centerX,y:lF.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:vCt,bounds:uF,refblocks:v7e,circles:SCt}=tM,CCt=cn({primitives:[...Object.values(vCt),...Object.values(SCt),{type:"text",text:"{REF}",x:.15,y:-.2894553499999995},{type:"text",text:"{VAL}",x:-.15,y:-.2894553499999995}],ports:[{...v7e.left1,labels:["1"]},{...v7e.right1,labels:["2"]}],size:{width:uF.width,height:uF.height},center:{x:uF.centerX,y:uF.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:MCt,bounds:_F,refblocks:S7e,circles:TCt}=tM,wCt=cn({primitives:[...Object.values(MCt),...Object.values(TCt),{type:"text",text:"{REF}",x:.15,y:-.2894553499999995},{type:"text",text:"{VAL}",x:-.15,y:-.2894553499999995}],ports:[{...S7e.left1,labels:["1"]},{...S7e.right1,labels:["2"]}],size:{width:_F.width,height:_F.height},center:{x:_F.centerX,y:_F.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),nM={paths:{path11:{type:"path",points:[{x:-.54,y:.04},{x:-.11,y:.04}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.1,y:.04},{x:.54,y:.04}],color:"primary",fill:!1},"path11-0":{type:"path",points:[{x:-.09,y:-.15},{x:-.09,y:.26}],color:"primary",fill:!1},"path11-0-3":{type:"path",points:[{x:.09,y:-.15},{x:.09,y:.26}],color:"primary",fill:!1},"path11-0-9":{type:"path",points:[{x:-.08,y:.06},{x:-.08,y:-.15},{x:.09,y:-.05},{x:-.08,y:.06}],color:"primary",fill:!0},"path11-0-9-0":{type:"path",points:[{x:.08,y:.26},{x:.08,y:.05},{x:-.09,y:.15},{x:.07,y:.26}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.03,y:.42},bottom1:{type:"text",text:"{VAL}",x:-.03,y:-.42}},refblocks:{left1:{x:-.54,y:.04},right1:{x:.54,y:.04}},bounds:{minX:-.57,maxX:.57,minY:-.42,maxY:.42,width:1.14,height:.83,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:.05,radius:.29,color:"primary",fill:!1}}},ECt=cn(nM).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left",{x:-.03,y:.2}).changeTextAnchor("{VAL}","middle_left",{x:.8,y:-.2}).build(),DCt=cn(nM).rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom",{x:0,y:.1}).changeTextAnchor("{VAL}","middle_top").build(),ACt=cn(nM).rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom",{x:0,y:.8}).changeTextAnchor("{VAL}","middle_top",{x:0,y:-.9}).build(),RCt=cn(nM).rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom",{x:0,y:.1}).changeTextAnchor("{VAL}","middle_top").build(),kCt=cn(nM).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left",{x:.7,y:.2}).changeTextAnchor("{VAL}","middle_left",{x:-.13,y:-.2}).build(),NCt=cn(nM).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left",{x:.7,y:.2}).changeTextAnchor("{VAL}","middle_left",{x:-.13,y:-.2}).build(),dF={paths:{triangle:{type:"path",points:[{x:-.06,y:-.09},{x:-.06,y:.09},{x:.06,y:0},{x:-.06,y:-.09}],color:"primary",fill:!1},stem:{type:"path",points:[{x:-.11,y:0},{x:-.06,y:0}],color:"primary",fill:!1}},refblocks:{left1:{x:-.11,y:0}},bounds:{centerX:0,centerY:0}},{paths:HCt,bounds:C7e,refblocks:ICt}=dF,LCt=cn({primitives:[...Object.values(HCt),{type:"text",text:"{REF}",x:-.13,y:-0}],ports:[{...ICt.left1,labels:["1"]}],center:{x:C7e.centerX,y:C7e.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_top").build(),{paths:OCt,bounds:M7e,refblocks:FCt}=dF,BCt=cn({primitives:[...Object.values(OCt),{type:"text",text:"{REF}",x:-.13,y:0}],ports:[{...FCt.left1,labels:["1"]}],center:{x:M7e.centerX,y:M7e.centerY}}).rotateRightFacingSymbol("right").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_right").build(),{paths:zCt,bounds:T7e,refblocks:VCt}=dF,$Ct=cn({primitives:[...Object.values(zCt),{type:"text",text:"{REF}",x:-.13,y:-0}],ports:[{...VCt.left1,labels:["1"]}],center:{x:T7e.centerX,y:T7e.centerY}}).rotateRightFacingSymbol("left").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_left").build(),{paths:WCt,bounds:w7e,refblocks:UCt}=dF,XCt=cn({primitives:[...Object.values(WCt),{type:"text",text:"{REF}",x:-.13,y:0}],ports:[{...UCt.left1,labels:["1"]}],center:{x:w7e.centerX,y:w7e.centerY}}).rotateRightFacingSymbol("down").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_bottom").build(),jCt={paths:{path40:{type:"path",points:[{x:.14,y:.04},{x:-.12,y:-.09}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.12,y:.18},{x:.14,y:.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.12,y:-.09},{x:-.12,y:.18}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.14,y:.18},{x:.14,y:-.09}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.12,y:.04},{x:-.52,y:.04}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.52,y:.04},{x:.15,y:.04}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.01,y:.27},bottom1:{type:"text",text:"{VAL}",x:0,y:-.27}},refblocks:{left1:{x:-.52,y:.04},right1:{x:.52,y:.04}},bounds:{minX:-.55,maxX:.55,minY:-.27,maxY:.27,width:1.09,height:.55,centerX:0,centerY:0},circles:{}},hF=cn(jCt).labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),GCt=ro(hF,"down"),YCt=ro(hF,"left"),qCt=ro(hF,"up"),JCt={paths:{path1:{type:"path",points:[{x:-.37,y:.22},{x:-.13,y:.22}],color:"primary",fill:!1},"path-1-2":{type:"path",points:[{x:-.07,y:.22},{x:.11,y:.16}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.1,y:.13},{x:.37,y:.13}],color:"primary",fill:!1},path3:{type:"path",points:[{x:.12,y:.36},{x:.37,y:.36}],color:"primary",fill:!1},path4:{type:"path",points:[{x:-.37,y:-.18},{x:-.13,y:-.18}],color:"primary",fill:!1},"path4-5":{type:"path",points:[{x:-.07,y:-.19},{x:.1,y:-.24}],color:"primary",fill:!1},path5:{type:"path",points:[{x:.1,y:-.27},{x:.37,y:-.27}],color:"primary",fill:!1},path6:{type:"path",points:[{x:.12,y:-.04},{x:.37,y:-.04}],color:"primary",fill:!1},"path1-4-join":{type:"path",points:[{x:0,y:-.2},{x:0,y:.19}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.56},bottom1:{type:"text",text:"{VAL}",x:0,y:-.42}},refblocks:{left1:{x:-.37,y:.22},left2:{x:-.37,y:-.18},right1:{x:.37,y:.36},right2:{x:.37,y:.13},right3:{x:.37,y:-.04},right5:{x:.37,y:-.27}},bounds:{minX:-.4,maxX:.4,minY:-.47,maxY:.56,width:1,height:1.04,centerX:0,centerY:.05},circles:{"circle-2":{type:"circle",x:.08,y:.13,radius:.02,color:"primary",fill:!1},"circle-5":{type:"circle",x:.08,y:-.27,radius:.02,color:"primary",fill:!1},"circle-3":{type:"circle",x:.08,y:.37,radius:.02,color:"primary",fill:!1},"circle-6":{type:"circle",x:.08,y:-.04,radius:.02,color:"primary",fill:!1},"circle-1":{type:"circle",x:-.1,y:.22,radius:.02,color:"primary",fill:!1},"circle-4":{type:"circle",x:-.1,y:-.18,radius:.02,color:"primary",fill:!1}}},mF=cn(JCt).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(),LK=ro(mF,"down"),OK=LK.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),FK=LK.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");OK.anchor="middle_bottom",FK.anchor="middle_top",OK.x=0,OK.y+=.537,FK.y-=.5375,FK.x=0;var KCt=LK,BK=ro(mF,"left"),zK=BK.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),VK=BK.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");zK.anchor="middle_bottom",VK.anchor="middle_top",zK.x=0,zK.y+=1,VK.y-=1,VK.x=0;var QCt=BK,$K=ro(mF,"up"),WK=$K.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),UK=$K.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");WK.anchor="middle_bottom",UK.anchor="middle_top",WK.x=0,WK.y+=.537,UK.y-=.5375,UK.x=0;var ZCt=$K,eMt={paths:{path1:{type:"path",points:[{x:-.37,y:.22},{x:-.13,y:.22}],color:"primary",fill:!1},"path-1-3":{type:"path",points:[{x:-.07,y:.23},{x:.11,y:.33}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.1,y:.13},{x:.37,y:.13}],color:"primary",fill:!1},path3:{type:"path",points:[{x:.12,y:.36},{x:.37,y:.36}],color:"primary",fill:!1},path4:{type:"path",points:[{x:-.37,y:-.18},{x:-.13,y:-.18}],color:"primary",fill:!1},"path4-6":{type:"path",points:[{x:-.07,y:-.18},{x:.11,y:-.07}],color:"primary",fill:!1},path5:{type:"path",points:[{x:.1,y:-.27},{x:.37,y:-.27}],color:"primary",fill:!1},path6:{type:"path",points:[{x:.12,y:-.04},{x:.37,y:-.04}],color:"primary",fill:!1},"path1-4-join":{type:"path",points:[{x:0,y:-.12},{x:0,y:.27}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.61},bottom1:{type:"text",text:"{VAL}",x:0,y:-.52}},refblocks:{left1:{x:-.37,y:.22},left2:{x:-.37,y:-.18},right1:{x:.37,y:.36},right2:{x:.37,y:.13},right3:{x:.37,y:-.04},right5:{x:.37,y:-.27}},bounds:{minX:-.4,maxX:.4,minY:-.47,maxY:.56,width:1,height:1.04,centerX:0,centerY:.05},circles:{"circle-2":{type:"circle",x:.08,y:.13,radius:.02,color:"primary",fill:!1},"circle-5":{type:"circle",x:.08,y:-.27,radius:.02,color:"primary",fill:!1},"circle-3":{type:"circle",x:.08,y:.37,radius:.02,color:"primary",fill:!1},"circle-6":{type:"circle",x:.08,y:-.04,radius:.02,color:"primary",fill:!1},"circle-1":{type:"circle",x:-.1,y:.22,radius:.02,color:"primary",fill:!1},"circle-4":{type:"circle",x:-.1,y:-.18,radius:.02,color:"primary",fill:!1}}},pF=cn(eMt).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(),XK=ro(pF,"down"),jK=XK.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),GK=XK.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");jK.anchor="middle_bottom",GK.anchor="middle_top",jK.x=0,jK.y+=.565,GK.y-=.555,GK.x=0;var tMt=XK,YK=ro(pF,"left"),qK=YK.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),JK=YK.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");qK.anchor="middle_bottom",JK.anchor="middle_top",qK.x=0,qK.y+=1.09,JK.y-=1.09,JK.x=0;var nMt=YK,KK=ro(pF,"up"),QK=KK.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),ZK=KK.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");QK.anchor="middle_bottom",ZK.anchor="middle_top",QK.x=0,QK.y+=.565,ZK.y-=.555,ZK.x=0;var oMt=KK,rMt={paths:{path11:{type:"path",points:[{x:-.38,y:.06},{x:-.14,y:.06}],color:"primary",fill:!1},"path11-0":{type:"path",points:[{x:-.09,y:.07},{x:.11,y:.11}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.13,y:.06},{x:.38,y:.06}],color:"primary",fill:!1},"path11-5":{type:"path",points:[{x:-.38,y:-.17},{x:-.14,y:-.17}],color:"primary",fill:!1},"path11-0-3":{type:"path",points:[{x:-.09,y:-.17},{x:.11,y:-.12}],color:"primary",fill:!1},"path12-0":{type:"path",points:[{x:.13,y:-.17},{x:.38,y:-.17}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.31},bottom1:{type:"text",text:"{VAL}",x:0,y:-.31}},refblocks:{left1:{x:-.38,y:-.17},left3:{x:-.38,y:.06},right1:{x:.38,y:-.17},right3:{x:.38,y:.06}},bounds:{minX:-.4,maxX:.4,minY:-.4,maxY:.4,width:.81,height:.79,centerX:0,centerY:0},circles:{"circle-4":{type:"circle",x:.1,y:.06,radius:.02,color:"primary",fill:!1},"circle-2":{type:"circle",x:.1,y:-.17,radius:.02,color:"primary",fill:!1},"circle-3":{type:"circle",x:-.11,y:.06,radius:.02,color:"primary",fill:!1},"circle-1":{type:"circle",x:-.11,y:-.17,radius:.02,color:"primary",fill:!1}}},fF=cn(rMt).labelPort("left1",["1"]).labelPort("right1",["2"]).labelPort("right3",["4"]).labelPort("left3",["3"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),eQ=ro(fF,"down"),tQ=eQ.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),nQ=eQ.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");tQ.anchor="middle_bottom",nQ.anchor="middle_top",tQ.x=.4,tQ.y+=.265,nQ.y-=.265,nQ.x=.4;var iMt=eQ,oQ=ro(fF,"left"),rQ=oQ.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),iQ=oQ.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");rQ.anchor="middle_bottom",iQ.anchor="middle_top",rQ.x=0,rQ.y+=.67,iQ.y-=.67,iQ.x=0;var sMt=oQ,sQ=ro(fF,"up"),aQ=sQ.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),cQ=sQ.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");aQ.anchor="middle_bottom",cQ.anchor="middle_top",aQ.x=.46,aQ.y+=.265,cQ.y-=.265,cQ.x=.46;var aMt=sQ,cMt={paths:{path11:{type:"path",points:[{x:-.38,y:.06},{x:-.14,y:.06}],color:"primary",fill:!1},"path11-0":{type:"path",points:[{x:-.09,y:.07},{x:.1,y:.2}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.13,y:.06},{x:.38,y:.06}],color:"primary",fill:!1},"path11-5":{type:"path",points:[{x:-.38,y:-.17},{x:-.14,y:-.17}],color:"primary",fill:!1},"path11-0-3":{type:"path",points:[{x:-.09,y:-.16},{x:.1,y:-.03}],color:"primary",fill:!1},"path12-0":{type:"path",points:[{x:.13,y:-.17},{x:.38,y:-.17}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.42},bottom1:{type:"text",text:"{VAL}",x:0,y:-.42}},refblocks:{left1:{x:-.38,y:-.17},left3:{x:-.38,y:.06},right1:{x:.38,y:-.17},right3:{x:.38,y:.06}},bounds:{minX:-.4,maxX:.4,minY:-.4,maxY:.4,width:.81,height:.79,centerX:0,centerY:0},circles:{"circle-4":{type:"circle",x:.1,y:.06,radius:.02,color:"primary",fill:!1},"circle-2":{type:"circle",x:.1,y:-.17,radius:.02,color:"primary",fill:!1},"circle-3":{type:"circle",x:-.11,y:.06,radius:.02,color:"primary",fill:!1},"circle-1":{type:"circle",x:-.11,y:-.17,radius:.02,color:"primary",fill:!1}}},xF=cn(cMt).labelPort("left1",["1"]).labelPort("right1",["2"]).labelPort("right3",["4"]).labelPort("left3",["3"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),lQ=ro(xF,"down"),uQ=lQ.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),_Q=lQ.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");uQ.anchor="middle_bottom",_Q.anchor="middle_top",uQ.x=.4,uQ.y+=.295,_Q.y-=.295,_Q.x=.42;var lMt=lQ,dQ=ro(xF,"left"),hQ=dQ.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),mQ=dQ.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");hQ.anchor="middle_bottom",mQ.anchor="middle_top",hQ.x=0,hQ.y+=.795,mQ.y-=.795,mQ.x=0;var uMt=dQ,pQ=ro(xF,"up"),fQ=pQ.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),xQ=pQ.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");fQ.anchor="middle_bottom",xQ.anchor="middle_top",fQ.x=.46,fQ.y+=.315,xQ.y-=.315,xQ.x=.46;var _Mt=pQ,E7e={paths:{path5:{type:"path",points:[{x:-.44,y:0},{x:-.16,y:0}],color:"primary",fill:!1},path6:{type:"path",points:[{x:.17,y:0},{x:.44,y:.01}],color:"primary",fill:!1},path9:{type:"path",points:[{x:-.25,y:-.16},{x:.02,y:.3},{x:.25,y:.17},{x:-.02,y:-.29},{x:-.25,y:-.16}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.37},bottom1:{type:"text",text:"{VAL}",x:0,y:-.37}},refblocks:{left1:{x:-.44,y:0},right1:{x:.44,y:.01}},bounds:{minX:-.57,maxX:.57,minY:-.25,maxY:.25,width:1.13,height:.5,centerX:0,centerY:0},circles:{}},{paths:dMt,texts:eio,bounds:gF,refblocks:D7e,circles:hMt}=E7e,A7e=cn({primitives:[...Object.values(dMt),...Object.values(hMt),{type:"text",text:"{REF}",x:.18,y:-.3204553499999995},{type:"text",text:"{VAL}",x:-.25,y:-.3294553499999995}],ports:[{...D7e.left1,labels:["1"]},{...D7e.right1,labels:["2"]}],size:{width:gF.width,height:gF.height},center:{x:gF.centerX,y:gF.centerY}}).rotateRightFacingSymbol("up").labelPort("left",["1"]).labelPort("right",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),gQ=yO(A7e),yQ=gQ.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),bQ=gQ.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");yQ.anchor="middle_left",bQ.anchor="middle_left",yQ.y+=.4,yQ.x=.32,bQ.y-=.45,bQ.x=.32;var mMt=gQ,R7e=cn(E7e).labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),pMt=cA(R7e),oM={paths:{path11:{type:"path",points:[{x:-.56,y:.04},{x:-.22,y:.04}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.14,y:.05},{x:.48,y:.05}],color:"primary",fill:!1},"path12-6":{type:"path",points:[{x:.14,y:-.15},{x:.14,y:.25}],color:"primary",fill:!1},"path11-0-9":{type:"path",points:[{x:-.22,y:.25},{x:-.21,y:-.15},{x:.14,y:.05},{x:-.22,y:.25}],color:"primary",fill:!0}},refblocks:{left1:{x:-.56,y:.04},right1:{x:.48,y:.05}},bounds:{width:1.18,height:.76,centerX:0,centerY:0},circles:{}},{paths:fMt,bounds:yF,refblocks:k7e,circles:xMt}=oM,gMt=cn({primitives:[...Object.values(fMt),...Object.values(xMt),{type:"text",text:"{REF}",x:-.15,y:.3294553499999995},{type:"text",text:"{VAL}",x:.15,y:.3294553499999995}],ports:[{...k7e.left1,labels:["1"]},{...k7e.right1,labels:["2"]}],size:{width:yF.width,height:yF.height},center:{x:yF.centerX,y:yF.centerY}}).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:yMt,bounds:bF,refblocks:N7e,circles:bMt}=oM,PMt=cn({primitives:[...Object.values(yMt),...Object.values(bMt),{type:"text",text:"{REF}",x:-0,y:.4094553499999995},{type:"text",text:"{VAL}",x:0,y:-.4094553499999995}],ports:[{...N7e.left1,labels:["1"]},{...N7e.right1,labels:["2"]}],size:{width:bF.width,height:bF.height},center:{x:bF.centerX,y:bF.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:vMt,bounds:PF,refblocks:H7e,circles:SMt}=oM,CMt=cn({primitives:[...Object.values(vMt),...Object.values(SMt),{type:"text",text:"{REF}",x:-0,y:-.3094553499999995},{type:"text",text:"{VAL}",x:0,y:.4094553499999995}],ports:[{...H7e.left1,labels:["1"]},{...H7e.right1,labels:["2"]}],size:{width:PF.width,height:PF.height},center:{x:PF.centerX,y:PF.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:MMt,bounds:vF,refblocks:I7e,circles:TMt}=oM,wMt=cn({primitives:[...Object.values(MMt),...Object.values(TMt),{type:"text",text:"{REF}",x:-0,y:.4094553499999995},{type:"text",text:"{VAL}",x:0,y:-.4094553499999995}],ports:[{...I7e.left1,labels:["1"]},{...I7e.right1,labels:["2"]}],size:{width:vF.width,height:vF.height},center:{x:vF.centerX,y:vF.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:EMt,bounds:SF,refblocks:L7e,circles:DMt}=oM,AMt=cn({primitives:[...Object.values(EMt),...Object.values(DMt),{type:"text",text:"{REF}",x:.15,y:-.2894553499999995},{type:"text",text:"{VAL}",x:-.15,y:-.2894553499999995}],ports:[{...L7e.left1,labels:["1"]},{...L7e.right1,labels:["2"]}],size:{width:SF.width,height:SF.height},center:{x:SF.centerX,y:SF.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:RMt,bounds:CF,refblocks:O7e,circles:kMt}=oM,NMt=cn({primitives:[...Object.values(RMt),...Object.values(kMt),{type:"text",text:"{REF}",x:.15,y:-.2894553499999995},{type:"text",text:"{VAL}",x:-.15,y:-.2894553499999995}],ports:[{...O7e.left1,labels:["1"]},{...O7e.right1,labels:["2"]}],size:{width:CF.width,height:CF.height},center:{x:CF.centerX,y:CF.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),HMt={paths:{path11:{type:"path",points:[{x:-.54,y:0},{x:-.3,y:0}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.29,y:0},{x:.54,y:0}],color:"primary",fill:!1}},texts:{left1:{type:"text",text:"Hz",x:0,y:-.04}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:0}},bounds:{width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:"circle",x:-.01,y:-.01,radius:.29,color:"primary",fill:!1}}},{paths:IMt,texts:LMt,bounds:MF,refblocks:F7e,circles:OMt}=HMt,PQ=za({primitives:[...Object.values(IMt),...Object.values(OMt),{type:"text",text:"{REF}",x:0,y:-.3594553499999995,anchor:"middle_top"},{type:"text",text:"{VAL}",x:0,y:.35,anchor:"middle_bottom"},{...LMt.left1,x:0,y:.01,anchor:"center",fontSize:.2}],ports:[{...F7e.left1,labels:["1"]},{...F7e.right1,labels:["2"]}],size:{width:MF.width,height:MF.height},center:{x:MF.centerX,y:MF.centerY}}),{5:FMt,...BMt}=PQ.primitives;function zMt(t){return typeof t=="object"}var B7e=ro({...PQ,primitives:Object.values(BMt).filter(zMt)}),VMt={...B7e,primitives:[...B7e.primitives,FMt]},$Mt={paths:{path10:{type:"path",points:[{x:-.53,y:.04},{x:.53,y:.04}],color:"primary",fill:!1},path14:{type:"path",points:[{x:0,y:.17},{x:.27,y:.17},{x:.27,y:-.1},{x:-.26,y:-.1},{x:-.26,y:.17},{x:0,y:.17}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.01,y:.24}},refblocks:{left1:{x:-.53,y:.04},right1:{x:.53,y:.04}},bounds:{width:1.13,height:.47,centerX:0,centerY:0}},{paths:WMt,texts:UMt,bounds:TF,refblocks:z7e}=$Mt,V7e=za({primitives:[...Object.values(WMt),{...UMt.top1,anchor:"middle_bottom"},{type:"text",text:"{VAL}",x:0,y:-.2,anchor:"middle_top"}],ports:[{...z7e.left1,labels:["1"]},{...z7e.right1,labels:["2"]}],size:{width:TF.width,height:TF.height},center:{x:TF.centerX,y:TF.centerY}}),XMt=ro(V7e),rM={paths:{path1:{type:"path",points:[{x:-.29,y:.01},{x:.04,y:0}],color:"primary",fill:!0},path2:{type:"path",points:[{x:.04,y:-.22},{x:.04,y:.22}],color:"primary",fill:!0},path3:{type:"path",points:[{x:.12,y:-.17},{x:.12,y:.17}],color:"primary",fill:!0},path4:{type:"path",points:[{x:.19,y:-.06},{x:.19,y:.06}],color:"primary",fill:!0}},texts:{right1:{type:"text",text:"{REF}",x:.31,y:-.02}},refblocks:{left1:{x:-.29,y:.01}},bounds:{minX:-.31,maxX:.31,minY:-.22,maxY:.22,width:.62,height:.45,centerX:0,centerY:0},circles:{}},jMt=cn(rM).rotateRightFacingSymbol("down").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_top").build(),GMt=cn(rM).rotateRightFacingSymbol("right").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_left").build(),YMt=cn(rM).rotateRightFacingSymbol("left").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_right").build(),qMt=cn(rM).rotateRightFacingSymbol("right").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_left").build(),JMt=cn(rM).rotateRightFacingSymbol("up").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_bottom").build(),KMt=cn(rM).rotateRightFacingSymbol("up").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_bottom").build(),vQ={paths:{path11:{type:"path",points:[{x:-.52,y:.03},{x:-.18,y:.04}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.19,y:.04},{x:.52,y:.04}],color:"primary",fill:!1},"path11-0-9":{type:"path",points:[{x:-.31,y:.2},{x:-.31,y:-.11},{x:-.01,y:.04},{x:-.3,y:.2}],color:"primary",fill:!0},"path11-0-9-5":{type:"path",points:[{x:.33,y:.2},{x:.33,y:-.1},{x:.04,y:.04},{x:.33,y:.2}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:.04,y:.32},bottom1:{type:"text",text:"{VAL}",x:.04,y:-.32}},refblocks:{left1:{x:-.52,y:.03},right1:{x:.52,y:.04}},bounds:{minX:-.55,maxX:.55,minY:-.32,maxY:.32,width:1.09,height:.63,centerX:0,centerY:0},circles:{}},{paths:tio,texts:nio,bounds:oio,refblocks:rio,circles:iio}=vQ,QMt=cn(vQ).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),ZMt=cn(vQ).rotateRightFacingSymbol("down").changeTextAnchor("{VAL}","middle_right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").build(),eTt={paths:{path45:{type:"path",points:[{x:.14,y:0},{x:-.13,y:-.14}],color:"primary",fill:!1},"path1-8":{type:"path",points:[{x:.13,y:0},{x:.3,y:0}],color:"primary",fill:!1},path46:{type:"path",points:[{x:-.13,y:.13},{x:.14,y:0}],color:"primary",fill:!1},path47:{type:"path",points:[{x:-.13,y:-.14},{x:-.13,y:.13}],color:"primary",fill:!1},path48:{type:"path",points:[{x:.14,y:.13},{x:.14,y:-.14}],color:"primary",fill:!1},path49:{type:"path",points:[{x:-.13,y:0},{x:-.3,y:0}],color:"primary",fill:!1},path25:{type:"path",points:[{x:.16,y:.29},{x:.25,y:.3},{x:.22,y:.21}],color:"primary",fill:!0},path78:{type:"path",points:[{x:.08,y:.17},{x:.09,y:.17},{x:.21,y:.27},{x:.21,y:.27}],color:"primary",fill:!1},"path25-0":{type:"path",points:[{x:-.02,y:.31},{x:.08,y:.32},{x:.04,y:.23}],color:"primary",fill:!0},"path78-6":{type:"path",points:[{x:-.1,y:.19},{x:-.09,y:.2},{x:.04,y:.29},{x:.04,y:.29}],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:.13},{x:-.54,y:.13}],color:"primary",fill:!1},"path48-2":{type:"path",points:[{x:-.3,y:-.13},{x:-.54,y:-.13}],color:"primary",fill:!1},"path48-3":{type:"path",points:[{x:.3,y:-.13},{x:.54,y:-.13}],color:"primary",fill:!1},"path48-4":{type:"path",points:[{x:.3,y:.13},{x:.54,y:.13}],color:"primary",fill:!1}},texts:{bottom1:{type:"text",text:"{VAL}",x:0,y:-.43},right1:{type:"text",text:"{REF}",x:0,y:.43}},refblocks:{left1:{x:-.54,y:.13},left2:{x:-.54,y:-.13},right1:{x:.54,y:-.13},right2:{x:.54,y:.13}},bounds:{minX:-.56,maxX:.56,minY:-.32,maxY:.32,width:1.13,height:.65,centerX:0,centerY:0},circles:{}},wF=cn(eTt).labelPort("left1",["1","DIN"]).labelPort("left2",["2","POWER"]).labelPort("right1",["3","GND"]).labelPort("right2",["4","DOUT"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),tTt=ro(wF,"down"),nTt=cA(wF),SQ=ro(wF,"up"),CQ=SQ.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),MQ=SQ.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");CQ.anchor="middle_left",MQ.anchor="middle_left",CQ.y+=.21,CQ.x=.44,MQ.y-=.21,MQ.x=.44;var oTt=SQ,rTt={paths:{path11:{type:"path",points:[{x:-.4,y:0},{x:-.01,y:0}],color:"primary",fill:!1},path40:{type:"path",points:[{x:.07,y:.19},{x:.07,y:-.18}],color:"primary",fill:!1},path42:{type:"path",points:[{x:.01,y:-.12},{x:.01,y:.14}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.28,y:-.25},{x:.28,y:-.56}],color:"primary",fill:!1},"path12-1":{type:"path",points:[{x:.28,y:.56},{x:.28,y:.27}],color:"primary",fill:!1},path15:{type:"path",points:[{x:.17,y:-.22},{x:.28,y:-.23},{x:.23,y:-.14}],color:"primary",fill:!0},path17:{type:"path",points:[{x:.08,y:-.09},{x:.23,y:-.2}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.07,y:.11},{x:.28,y:.26}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.01,y:.36},bottom1:{type:"text",text:"{VAL}",x:.02,y:-.42}},refblocks:{top1:{x:.28,y:.56},bottom1:{x:.28,y:-.56},left1:{x:-.4,y:0}},bounds:{minX:-.43,maxX:.43,minY:-.58,maxY:.58,width:.85,height:1.17,centerX:0,centerY:0},circles:{path1:{type:"circle",x:.14,y:.01,radius:.29,color:"primary",fill:!1}}},$7e=cn(rTt).changeTextAnchor("{VAL}","middle_right").labelPort("left1",["3"]).labelPort("top1",["2"]).labelPort("bottom1",["1"]).changeTextAnchor("{REF}","middle_right").build(),TQ=ro($7e),wQ=TQ.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),W7e=TQ.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");wQ.anchor="middle_left",W7e.anchor="middle_right",wQ.x=.45,wQ.y+=.065,W7e.y+=.065;var iTt=TQ,sTt={paths:{"path12-1-8-6-9":{type:"path",points:[{x:.02,y:-.02},{x:.02,y:-.1}],color:"primary",fill:!1},"path12-1-5-6":{type:"path",points:[{x:-.47,y:-.19},{x:-.17,y:-.19}],color:"primary",fill:!1},"path12-1-5-6-8":{type:"path",points:[{x:.02,y:.17},{x:.02,y:.11}],color:"primary",fill:!1},"path12-1-8-0":{type:"path",points:[{x:-.15,y:-.03},{x:.2,y:-.19}],color:"primary",fill:!1},"path12-1-0":{type:"path",points:[{x:.2,y:-.19},{x:.47,y:-.19}],color:"primary",fill:!1},"path12-1-8-6-9-4":{type:"path",points:[{x:.02,y:.12},{x:.02,y:.02}],color:"primary",fill:!1},"path12-1-8-6-9-4-3":{type:"path",points:[{x:.08,y:.11},{x:.08,y:.05}],color:"primary",fill:!1},"path12-1-8-6-9-4-3-1":{type:"path",points:[{x:-.04,y:.11},{x:-.04,y:.05}],color:"primary",fill:!1},"path12-1-8-6-9-4-4":{type:"path",points:[{x:.08,y:.11},{x:-.04,y:.11}],color:"primary",fill:!1},"path14-5":{type:"path",points:[{x:-.01,y:.28},{x:.01,y:.25},{x:.04,y:.23},{x:.06,y:.2}],color:"primary",fill:!0},"path14-5-3":{type:"path",points:[{x:-.01,y:.2},{x:.01,y:.23},{x:.04,y:.25},{x:.06,y:.28}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:.01,y:.38},bottom1:{type:"text",text:"{VAL}",x:.06,y:-.38}},refblocks:{left1:{x:-.47,y:-.19},right1:{x:.47,y:-.19}},bounds:{minX:-.5,maxX:.5,minY:-.38,maxY:.38,width:1,height:.76,centerX:0,centerY:0},circles:{path9:{type:"circle",x:.02,y:.24,radius:.06,color:"primary",fill:!1}}},U7e=cn(sTt).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),X7e=ro(U7e),j7e=X7e.primitives.filter(t=>t.type==="text"),EQ=j7e.find(t=>t.text==="{VAL}");EQ.x=-.35,EQ.y=0,EQ.anchor="middle_right";var DQ=j7e.find(t=>t.text==="{REF}");DQ.y=0,DQ.x=.35,DQ.anchor="middle_left";var aTt=X7e,cTt={paths:{path8698:{type:"path",points:[{x:-.2,y:-.02},{x:-.2,y:-.02},{x:-.21,y:-.01},{x:-.21,y:-.01},{x:-.21,y:0},{x:-.21,y:0},{x:-.21,y:0},{x:-.22,y:.01},{x:-.22,y:.01},{x:-.22,y:.02},{x:-.22,y:.02},{x:-.23,y:.03},{x:-.23,y:.03},{x:-.23,y:.03},{x:-.23,y:.04},{x:-.24,y:.04},{x:-.24,y:.04},{x:-.24,y:.05},{x:-.24,y:.05},{x:-.25,y:.05},{x:-.25,y:.06},{x:-.25,y:.06},{x:-.25,y:.06},{x:-.26,y:.06},{x:-.26,y:.06},{x:-.26,y:.07},{x:-.26,y:.07},{x:-.27,y:.07},{x:-.27,y:.07},{x:-.27,y:.07},{x:-.27,y:.07},{x:-.28,y:.07},{x:-.28,y:.07},{x:-.28,y:.07},{x:-.28,y:.07},{x:-.29,y:.07},{x:-.29,y:.08},{x:-.29,y:.08},{x:-.29,y:.08},{x:-.3,y:.08},{x:-.3,y:.08},{x:-.3,y:.08},{x:-.3,y:.08},{x:-.31,y:.08},{x:-.31,y:.08},{x:-.31,y:.07},{x:-.31,y:.07},{x:-.32,y:.07},{x:-.32,y:.07},{x:-.32,y:.07},{x:-.32,y:.07},{x:-.33,y:.07},{x:-.33,y:.07},{x:-.33,y:.07},{x:-.33,y:.07},{x:-.34,y:.07},{x:-.34,y:.06},{x:-.34,y:.06},{x:-.34,y:.06},{x:-.35,y:.06},{x:-.35,y:.06},{x:-.35,y:.05},{x:-.35,y:.05},{x:-.36,y:.05},{x:-.36,y:.04},{x:-.36,y:.04},{x:-.36,y:.04},{x:-.37,y:.03},{x:-.37,y:.03},{x:-.37,y:.03},{x:-.37,y:.02},{x:-.38,y:.02},{x:-.38,y:.01},{x:-.38,y:.01},{x:-.38,y:0},{x:-.39,y:0},{x:-.39,y:0},{x:-.39,y:-.01},{x:-.39,y:-.01},{x:-.4,y:-.02},{x:-.4,y:-.02}],color:"primary",fill:!1},path8700:{type:"path",points:[{x:0,y:-.02},{x:0,y:-.02},{x:-.01,y:-.01},{x:-.01,y:-.01},{x:-.01,y:0},{x:-.01,y:0},{x:-.02,y:0},{x:-.02,y:.01},{x:-.02,y:.01},{x:-.02,y:.02},{x:-.03,y:.02},{x:-.03,y:.03},{x:-.03,y:.03},{x:-.03,y:.03},{x:-.04,y:.04},{x:-.04,y:.04},{x:-.04,y:.04},{x:-.04,y:.05},{x:-.05,y:.05},{x:-.05,y:.05},{x:-.05,y:.06},{x:-.05,y:.06},{x:-.06,y:.06},{x:-.06,y:.06},{x:-.06,y:.06},{x:-.06,y:.07},{x:-.07,y:.07},{x:-.07,y:.07},{x:-.07,y:.07},{x:-.07,y:.07},{x:-.08,y:.07},{x:-.08,y:.07},{x:-.08,y:.07},{x:-.08,y:.07},{x:-.09,y:.07},{x:-.09,y:.07},{x:-.09,y:.08},{x:-.09,y:.08},{x:-.1,y:.08},{x:-.1,y:.08},{x:-.1,y:.08},{x:-.1,y:.08},{x:-.11,y:.08},{x:-.11,y:.08},{x:-.11,y:.08},{x:-.11,y:.07},{x:-.12,y:.07},{x:-.12,y:.07},{x:-.12,y:.07},{x:-.12,y:.07},{x:-.13,y:.07},{x:-.13,y:.07},{x:-.13,y:.07},{x:-.13,y:.07},{x:-.14,y:.07},{x:-.14,y:.07},{x:-.14,y:.06},{x:-.14,y:.06},{x:-.15,y:.06},{x:-.15,y:.06},{x:-.15,y:.06},{x:-.15,y:.05},{x:-.16,y:.05},{x:-.16,y:.05},{x:-.16,y:.04},{x:-.16,y:.04},{x:-.17,y:.04},{x:-.17,y:.03},{x:-.17,y:.03},{x:-.17,y:.03},{x:-.18,y:.02},{x:-.18,y:.02},{x:-.18,y:.01},{x:-.18,y:.01},{x:-.19,y:0},{x:-.19,y:0},{x:-.19,y:0},{x:-.19,y:-.01},{x:-.2,y:-.01},{x:-.2,y:-.02},{x:-.2,y:-.02}],color:"primary",fill:!1},path8702:{type:"path",points:[{x:.2,y:-.02},{x:.2,y:-.02},{x:.19,y:-.01},{x:.19,y:-.01},{x:.19,y:0},{x:.19,y:0},{x:.18,y:0},{x:.18,y:.01},{x:.18,y:.01},{x:.18,y:.02},{x:.17,y:.02},{x:.17,y:.03},{x:.17,y:.03},{x:.17,y:.03},{x:.16,y:.04},{x:.16,y:.04},{x:.16,y:.04},{x:.16,y:.05},{x:.15,y:.05},{x:.15,y:.05},{x:.15,y:.06},{x:.15,y:.06},{x:.14,y:.06},{x:.14,y:.06},{x:.14,y:.06},{x:.14,y:.07},{x:.13,y:.07},{x:.13,y:.07},{x:.13,y:.07},{x:.13,y:.07},{x:.12,y:.07},{x:.12,y:.07},{x:.12,y:.07},{x:.12,y:.07},{x:.11,y:.07},{x:.11,y:.07},{x:.11,y:.08},{x:.11,y:.08},{x:.1,y:.08},{x:.1,y:.08},{x:.1,y:.08},{x:.1,y:.08},{x:.09,y:.08},{x:.09,y:.08},{x:.09,y:.08},{x:.09,y:.07},{x:.08,y:.07},{x:.08,y:.07},{x:.08,y:.07},{x:.08,y:.07},{x:.07,y:.07},{x:.07,y:.07},{x:.07,y:.07},{x:.07,y:.07},{x:.06,y:.07},{x:.06,y:.07},{x:.06,y:.06},{x:.06,y:.06},{x:.05,y:.06},{x:.05,y:.06},{x:.05,y:.06},{x:.05,y:.05},{x:.04,y:.05},{x:.04,y:.05},{x:.04,y:.04},{x:.04,y:.04},{x:.03,y:.04},{x:.03,y:.03},{x:.03,y:.03},{x:.03,y:.03},{x:.02,y:.02},{x:.02,y:.02},{x:.02,y:.01},{x:.02,y:.01},{x:.01,y:0},{x:.01,y:0},{x:.01,y:0},{x:.01,y:-.01},{x:0,y:-.01},{x:0,y:-.02},{x:0,y:-.02}],color:"primary",fill:!1},path8704:{type:"path",points:[{x:.4,y:-.02},{x:.39,y:-.02},{x:.39,y:-.01},{x:.39,y:-.01},{x:.39,y:0},{x:.39,y:0},{x:.38,y:0},{x:.38,y:.01},{x:.38,y:.01},{x:.38,y:.02},{x:.37,y:.02},{x:.37,y:.03},{x:.37,y:.03},{x:.37,y:.03},{x:.36,y:.04},{x:.36,y:.04},{x:.36,y:.04},{x:.36,y:.05},{x:.35,y:.05},{x:.35,y:.05},{x:.35,y:.06},{x:.35,y:.06},{x:.34,y:.06},{x:.34,y:.06},{x:.34,y:.06},{x:.34,y:.07},{x:.33,y:.07},{x:.33,y:.07},{x:.33,y:.07},{x:.33,y:.07},{x:.32,y:.07},{x:.32,y:.07},{x:.32,y:.07},{x:.32,y:.07},{x:.31,y:.07},{x:.31,y:.07},{x:.31,y:.08},{x:.31,y:.08},{x:.3,y:.08},{x:.3,y:.08},{x:.3,y:.08},{x:.3,y:.08},{x:.29,y:.08},{x:.29,y:.08},{x:.29,y:.08},{x:.29,y:.07},{x:.28,y:.07},{x:.28,y:.07},{x:.28,y:.07},{x:.28,y:.07},{x:.27,y:.07},{x:.27,y:.07},{x:.27,y:.07},{x:.27,y:.07},{x:.26,y:.07},{x:.26,y:.07},{x:.26,y:.06},{x:.26,y:.06},{x:.25,y:.06},{x:.25,y:.06},{x:.25,y:.06},{x:.25,y:.05},{x:.24,y:.05},{x:.24,y:.05},{x:.24,y:.04},{x:.24,y:.04},{x:.23,y:.04},{x:.23,y:.03},{x:.23,y:.03},{x:.23,y:.03},{x:.22,y:.02},{x:.22,y:.02},{x:.22,y:.01},{x:.22,y:.01},{x:.21,y:0},{x:.21,y:0},{x:.21,y:0},{x:.21,y:-.01},{x:.2,y:-.01},{x:.2,y:-.02},{x:.2,y:-.02}],color:"primary",fill:!1},path8706:{type:"path",points:[{x:-.4,y:-.02},{x:-.55,y:-.02}],color:"primary",fill:!1},"path8706-5":{type:"path",points:[{x:.55,y:-.03},{x:.4,y:-.03}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.23},bottom1:{type:"text",text:"{VAL}",x:0,y:-.23}},refblocks:{left1:{x:-.55,y:-.02},right1:{x:.55,y:-.03}},bounds:{width:1.16,height:.46,centerX:0,centerY:0},circles:{}},{paths:lTt,texts:G7e,bounds:EF,refblocks:Y7e,circles:uTt}=cTt,AQ=za({primitives:[...Object.values(lTt),...Object.values(uTt),{...G7e.top1,anchor:"middle_bottom"},{...G7e.bottom1,anchor:"middle_top"}],ports:[{...Y7e.left1,labels:["1"]},{...Y7e.right1,labels:["2"]}],size:{width:EF.width,height:EF.height},center:{x:EF.centerX,y:EF.centerY}}),q7e=ro(AQ,"up"),_Tt=yO(q7e),dTt=cA(AQ),J7e={paths:{path11:{type:"path",points:[{x:-.54,y:-.06},{x:-.15,y:-.06}],color:"primary",fill:!1},path40:{type:"path",points:[{x:.13,y:-.05},{x:-.13,y:-.18}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.13,y:.08},{x:.13,y:-.05}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.13,y:-.18},{x:-.13,y:.08}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.13,y:.08},{x:.13,y:-.18}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.14,y:-.05},{x:.54,y:-.06}],color:"primary",fill:!1},"path25-0-9-8":{type:"path",points:[{x:-.03,y:.39},{x:-.05,y:.47},{x:-.08,y:.39}],color:"primary",fill:!0},"path78-6-5-5":{type:"path",points:[{x:-.05,y:.27},{x:-.05,y:.29},{x:-.05,y:.41},{x:-.05,y:.42}],color:"primary",fill:!1},"path25-0-9-8-2":{type:"path",points:[{x:.07,y:.39},{x:.04,y:.47},{x:.02,y:.39}],color:"primary",fill:!0},"path78-6-5-5-7":{type:"path",points:[{x:.04,y:.27},{x:.04,y:.29},{x:.04,y:.41},{x:.04,y:.42}],color:"primary",fill:!1},"path43-1":{type:"path",points:[{x:.03,y:.06},{x:.03,y:-.16}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:.38,y:.38},bottom1:{type:"text",text:"{VAL}",x:.38,y:-.47}},refblocks:{left1:{x:-.54,y:-.06},right1:{x:.54,y:-.06}},bounds:{minX:-.57,maxX:.57,minY:-.47,maxY:.47,width:1.14,height:.93,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:-.05,radius:.29,color:"primary",fill:!1}}};J7e.bounds.width+=.2;var DF=cn(J7e).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),RQ=ro(DF,"down"),kQ=RQ.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),NQ=RQ.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");kQ.anchor="middle_left",NQ.anchor="middle_left",kQ.y+=.9,kQ.x=.3,NQ.y-=.1,NQ.x=.3;var hTt=RQ,HQ=ro(DF,"left"),IQ=HQ.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),LQ=HQ.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");IQ.anchor="middle_left",LQ.anchor="middle_left",IQ.y+=.71,IQ.x=.44,LQ.y-=.71,LQ.x=.44;var mTt=HQ,OQ=ro(DF,"up"),FQ=OQ.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),BQ=OQ.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");FQ.anchor="middle_left",BQ.anchor="middle_left",FQ.y+=.1,FQ.x=.3,BQ.y-=.71,BQ.x=.3;var pTt=OQ,fTt={paths:{path45:{type:"path",points:[{x:.14,y:0},{x:-.13,y:-.14}],color:"primary",fill:!1},"path1-8":{type:"path",points:[{x:.13,y:0},{x:.54,y:0}],color:"primary",fill:!1},path46:{type:"path",points:[{x:-.13,y:.13},{x:.14,y:0}],color:"primary",fill:!1},path47:{type:"path",points:[{x:-.13,y:-.14},{x:-.13,y:.13}],color:"primary",fill:!1},path48:{type:"path",points:[{x:.14,y:.13},{x:.14,y:-.14}],color:"primary",fill:!1},path49:{type:"path",points:[{x:-.13,y:0},{x:-.54,y:0}],color:"primary",fill:!1},path25:{type:"path",points:[{x:.16,y:.29},{x:.25,y:.3},{x:.22,y:.21}],color:"primary",fill:!0},path78:{type:"path",points:[{x:.08,y:.17},{x:.09,y:.17},{x:.21,y:.27},{x:.21,y:.27}],color:"primary",fill:!1},"path25-0":{type:"path",points:[{x:-.02,y:.31},{x:.08,y:.32},{x:.04,y:.23}],color:"primary",fill:!0},"path78-6":{type:"path",points:[{x:-.1,y:.19},{x:-.09,y:.2},{x:.04,y:.29},{x:.04,y:.29}],color:"primary",fill:!1}},texts:{bottom1:{type:"text",text:"{VAL}",x:0,y:-.21},right1:{type:"text",text:"{REF}",x:0,y:.41}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:0}},bounds:{width:1.13,height:.65,centerX:0,centerY:0},circles:{}},{paths:xTt,texts:K7e,bounds:AF,refblocks:Q7e,circles:gTt}=fTt,zQ=za({primitives:[...Object.values(xTt),...Object.values(gTt),{...K7e.bottom1,anchor:"middle_top"},{...K7e.right1,anchor:"middle_bottom"}],ports:[{...Q7e.left1,labels:["1"]},{...Q7e.right1,labels:["2"]}],size:{width:AF.width,height:AF.height},center:{x:AF.centerX,y:AF.centerY}}),VQ=ro(zQ,"up"),$Q=VQ.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),WQ=VQ.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");$Q.anchor="middle_left",WQ.anchor="middle_left",$Q.y+=.21,$Q.x=.21,WQ.y-=.21,WQ.x=.21;var Z7e=VQ,UQ=yO(Z7e),XQ=UQ.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),jQ=UQ.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");XQ.anchor="middle_left",jQ.anchor="middle_left",XQ.y+=.4,XQ.x=.2,jQ.y-=.41,jQ.x=.2;var yTt=UQ,bTt=cA(zQ),PTt={paths:{path11:{type:"path",points:[{x:-.52,y:-.01},{x:-.18,y:-.01}],color:"primary",fill:!1},"path11-2":{type:"path",points:[{x:-.17,y:-.11},{x:-.17,y:.08}],color:"primary",fill:!1},"path11-5":{type:"path",points:[{x:-.17,y:-.12},{x:.16,y:-.12}],color:"primary",fill:!1},"path11-5-5":{type:"path",points:[{x:-.17,y:.08},{x:.16,y:.08}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.17,y:-.01},{x:.52,y:-.01}],color:"primary",fill:!1},"path11-2-1":{type:"path",points:[{x:.16,y:-.12},{x:.16,y:.08}],color:"primary",fill:!1},"path25-0-9":{type:"path",points:[{x:-.4,y:-.21},{x:-.33,y:-.18},{x:-.34,y:-.27}],color:"primary",fill:!0},"path78-6-5":{type:"path",points:[{x:-.45,y:-.34},{x:-.44,y:-.32},{x:-.35,y:-.22},{x:-.35,y:-.22}],color:"primary",fill:!1},"path25-0-9-0":{type:"path",points:[{x:-.3,y:-.34},{x:-.22,y:-.31},{x:-.24,y:-.4}],color:"primary",fill:!0},"path78-6-5-9":{type:"path",points:[{x:-.35,y:-.46},{x:-.34,y:-.45},{x:-.25,y:-.35},{x:-.25,y:-.35}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.17,y:-.41},bottom1:{type:"text",text:"{VAL}",x:-.01,y:.46}},refblocks:{left1:{x:-.52,y:-.01},right1:{x:.52,y:-.01}},bounds:{width:1.1,height:.62,centerX:0,centerY:-.02},circles:{path1:{type:"circle",x:0,y:-.02,radius:.28,color:"primary",fill:!1}}},{paths:vTt,texts:eSe,bounds:RF,refblocks:tSe,circles:STt}=PTt,nSe=za({primitives:[...Object.values(vTt),...Object.values(STt),{...eSe.top1,anchor:"middle_left",x:0},{...eSe.bottom1,anchor:"middle_left",x:0}],ports:[{...tSe.left1,labels:["1"]},{...tSe.right1,labels:["2"]}],size:{width:RF.width,height:RF.height},center:{x:RF.centerX,y:RF.centerY}}),oSe=ro(nSe),rSe=oSe.primitives.filter(t=>t.type==="text"),GQ=rSe.find(t=>t.text==="{VAL}");GQ.x=-.35,GQ.y=0,GQ.anchor="middle_right";var YQ=rSe.find(t=>t.text==="{REF}");YQ.y=0,YQ.x=.35,YQ.anchor="middle_left";var CTt=oSe,MTt={paths:{path208:{type:"path",points:[{x:.38,y:.13},{x:.52,y:-.13}],color:"primary",fill:!1},path209:{type:"path",points:[{x:.25,y:-.13},{x:.38,y:.13}],color:"primary",fill:!1},path210:{type:"path",points:[{x:.52,y:-.13},{x:.25,y:-.13}],color:"primary",fill:!1},path211:{type:"path",points:[{x:.25,y:.13},{x:.52,y:.13}],color:"primary",fill:!1},path212:{type:"path",points:[{x:.12,y:-.4},{x:.38,y:-.4}],color:"primary",fill:!1},path213:{type:"path",points:[{x:.38,y:.4},{x:.12,y:.4}],color:"primary",fill:!1},path214:{type:"path",points:[{x:.12,y:.54},{x:.12,y:.18}],color:"primary",fill:!1},path215:{type:"path",points:[{x:.12,y:-.54},{x:.12,y:0}],color:"primary",fill:!1},path216:{type:"path",points:[{x:.38,y:-.4},{x:.38,y:.4}],color:"primary",fill:!1},path217:{type:"path",points:[{x:-.14,y:.26},{x:-.14,y:-.27}],color:"primary",fill:!1},path218:{type:"path",points:[{x:-.22,y:-.27},{x:-.22,y:.26}],color:"primary",fill:!1},path219:{type:"path",points:[{x:-.54,y:-.27},{x:-.22,y:-.27}],color:"primary",fill:!1},path220:{type:"path",points:[{x:-.14,y:-.19},{x:.12,y:-.19}],color:"primary",fill:!1},path221:{type:"path",points:[{x:-.14,y:.18},{x:.12,y:.18}],color:"primary",fill:!1},path222:{type:"path",points:[{x:-.07,y:0},{x:.12,y:0}],color:"primary",fill:!1}},texts:{right1:{type:"text",text:"{VAL}",x:.57,y:.02},right2:{type:"text",text:"{REF}",x:.57,y:.21}},refblocks:{top1:{x:.12,y:.54},bottom1:{x:.12,y:-.54},left1:{x:-.54,y:-.27}},bounds:{width:1.14,height:1.14,centerX:0,centerY:0}},{paths:TTt,texts:iSe,bounds:kF,refblocks:qQ}=MTt,sSe=za({primitives:[...Object.values(TTt),{...iSe.right1,anchor:"middle_left"},{...iSe.right2,anchor:"middle_left"}],ports:[{...qQ.top1,labels:["1"]},{...qQ.bottom1,labels:["2"]},{...qQ.left1,labels:["3"]}],size:{width:kF.width+.4,height:kF.height},center:{x:kF.centerX+.2,y:kF.centerY}}),JQ=ro(sSe),aSe=JQ.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),KQ=JQ.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");aSe.anchor="middle_top",KQ.anchor="middle_top",aSe.x=KQ.x,KQ.y+=.15;var wTt=JQ,ETt={paths:{"path12-1-8-6-9":{type:"path",points:[{x:.01,y:.07},{x:.01,y:-.01}],color:"primary",fill:!1},"path12-1-5-6":{type:"path",points:[{x:-.47,y:-.09},{x:-.17,y:-.09}],color:"primary",fill:!1},"path12-1-8-0":{type:"path",points:[{x:-.16,y:-.01},{x:.17,y:-.01}],color:"primary",fill:!1},"path12-1-0":{type:"path",points:[{x:.2,y:-.09},{x:.47,y:-.09}],color:"primary",fill:!1},path2:{type:"path",points:[{x:-.1,y:.06},{x:-.1,y:.06},{x:-.1,y:.07},{x:-.1,y:.07},{x:-.1,y:.07},{x:-.1,y:.08},{x:-.1,y:.08},{x:-.1,y:.08},{x:-.1,y:.09},{x:-.09,y:.09},{x:-.09,y:.09},{x:-.09,y:.1},{x:-.09,y:.1},{x:-.09,y:.1},{x:-.09,y:.1},{x:-.09,y:.11},{x:-.09,y:.11},{x:-.08,y:.11},{x:-.08,y:.12},{x:-.08,y:.12},{x:-.08,y:.12},{x:-.08,y:.12},{x:-.07,y:.13},{x:-.07,y:.13},{x:-.07,y:.13},{x:-.07,y:.13},{x:-.06,y:.14},{x:-.06,y:.14},{x:-.06,y:.14},{x:-.06,y:.14},{x:-.05,y:.14},{x:-.05,y:.15},{x:-.05,y:.15},{x:-.04,y:.15},{x:-.04,y:.15},{x:-.04,y:.15},{x:-.04,y:.15},{x:-.03,y:.16},{x:-.03,y:.16},{x:-.03,y:.16},{x:-.02,y:.16},{x:-.02,y:.16},{x:-.02,y:.16},{x:-.01,y:.16},{x:-.01,y:.16},{x:0,y:.16},{x:0,y:.16},{x:0,y:.16},{x:.01,y:.16},{x:.01,y:.16},{x:.01,y:.16},{x:.02,y:.16},{x:.02,y:.16},{x:.02,y:.16},{x:.03,y:.16},{x:.03,y:.16},{x:.03,y:.16},{x:.04,y:.16},{x:.04,y:.16},{x:.04,y:.16},{x:.05,y:.15},{x:.05,y:.15},{x:.05,y:.15},{x:.06,y:.15},{x:.06,y:.15},{x:.06,y:.15},{x:.06,y:.14},{x:.07,y:.14},{x:.07,y:.14},{x:.07,y:.14},{x:.08,y:.14},{x:.08,y:.13},{x:.08,y:.13},{x:.08,y:.13},{x:.09,y:.13},{x:.09,y:.12},{x:.09,y:.12},{x:.09,y:.12},{x:.09,y:.12},{x:.1,y:.11},{x:.1,y:.11},{x:.1,y:.1},{x:.1,y:.1},{x:.11,y:.09},{x:.11,y:.09},{x:.11,y:.09},{x:.11,y:.08},{x:.11,y:.08},{x:.11,y:.08},{x:.11,y:.07},{x:.11,y:.07},{x:.11,y:.07},{x:.11,y:.06},{x:.11,y:.06},{x:.1,y:.06},{x:.1,y:.06},{x:.09,y:.06},{x:.09,y:.06},{x:.08,y:.06},{x:.07,y:.06},{x:.07,y:.06},{x:.06,y:.06},{x:.05,y:.06},{x:.05,y:.06},{x:.04,y:.06},{x:.03,y:.06},{x:.03,y:.06},{x:.02,y:.06},{x:.01,y:.06},{x:.01,y:.06},{x:0,y:.06},{x:-.01,y:.06},{x:-.01,y:.06},{x:-.02,y:.06},{x:-.03,y:.06},{x:-.03,y:.06},{x:-.04,y:.06},{x:-.05,y:.06},{x:-.05,y:.06},{x:-.06,y:.06},{x:-.07,y:.06},{x:-.07,y:.06},{x:-.08,y:.06},{x:-.09,y:.06},{x:-.09,y:.06}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:.01,y:.27},bottom1:{type:"text",text:"{VAL}",x:-.16,y:-.27}},refblocks:{left1:{x:-.47,y:-.09},right1:{x:.47,y:-.09}},bounds:{width:1,height:.53,centerX:0,centerY:0},circles:{}},{paths:DTt,texts:cSe,bounds:NF,refblocks:lSe,circles:ATt}=ETt,uSe=za({primitives:[...Object.values(DTt),...Object.values(ATt),{...cSe.top1,anchor:"middle_bottom",x:0},{...cSe.bottom1,anchor:"middle_top",x:0}],ports:[{...lSe.left1,labels:["1"]},{...lSe.right1,labels:["2"]}],size:{width:NF.width,height:NF.height},center:{x:NF.centerX+.006,y:NF.centerY+.06}}),QQ=ro(uSe),lA=QQ.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),HF=QQ.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");lA.anchor="middle_left",HF.anchor="middle_right",lA.x=lA.x-.03,lA.y=lA.y,HF.x=HF.x,HF.y=0;var RTt=QQ,kTt={paths:{path11:{type:"path",points:[{x:-.42,y:-.1},{x:.05,y:-.11}],color:"primary",fill:!1},path40:{type:"path",points:[{x:.09,y:.19},{x:.09,y:-.18}],color:"primary",fill:!1},"path12-1":{type:"path",points:[{x:.3,y:.55},{x:.3,y:.11}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:.31,y:-.55},{x:.31,y:-.01}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.09,y:.11},{x:.31,y:.11}],color:"primary",fill:!1},"path2-5":{type:"path",points:[{x:.09,y:-.1},{x:.31,y:-.1}],color:"primary",fill:!1},path15:{type:"path",points:[{x:.27,y:-.04},{x:.27,y:.03},{x:.2,y:0},{x:.27,y:-.04}],color:"primary",fill:!0},"path2-0":{type:"path",points:[{x:.09,y:0},{x:.31,y:-.01}],color:"primary",fill:!1},"path12-1-0":{type:"path",points:[{x:.05,y:.17},{x:.05,y:-.11}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.13,y:.36},bottom1:{type:"text",text:"{VAL}",x:.06,y:-.42}},refblocks:{top1:{x:.3,y:.55},bottom1:{x:.31,y:-.55},left1:{x:-.42,y:-.1}},bounds:{width:.89,height:1.16,centerX:0,centerY:0},circles:{path1:{type:"circle",x:.16,y:0,radius:.29,color:"primary",fill:!1}}},{paths:NTt,texts:_Se,bounds:IF,refblocks:ZQ,circles:HTt}=kTt,dSe=za({primitives:[...Object.values(NTt),...Object.values(HTt),{..._Se.top1,anchor:"middle_right",x:0},{..._Se.bottom1,anchor:"middle_right",x:0}],ports:[{...ZQ.top1,labels:["1","drain"]},{...ZQ.bottom1,labels:["2","source"]},{...ZQ.left1,labels:["3","gate"]}],size:{width:IF.width,height:IF.height},center:{x:IF.centerX,y:IF.centerY}}),hSe=ro(dSe),mSe=hSe.primitives.filter(t=>t.type==="text"),eZ=mSe.find(t=>t.text==="{VAL}");eZ.x=-.35,eZ.y=0,eZ.anchor="middle_right";var tZ=mSe.find(t=>t.text==="{REF}");tZ.y=0,tZ.x=.35,tZ.anchor="middle_left";var ITt=hSe,LTt={paths:{path11:{type:"path",points:[{x:-.42,y:-.1},{x:.05,y:-.11}],color:"primary",fill:!1},"path12-1":{type:"path",points:[{x:.3,y:.55},{x:.3,y:.11}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:.31,y:-.55},{x:.31,y:-.01}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.09,y:.11},{x:.31,y:.11}],color:"primary",fill:!1},"path2-8-3-7":{type:"path",points:[{x:.09,y:.15},{x:.09,y:.07}],color:"primary",fill:!1},"path2-5":{type:"path",points:[{x:.09,y:-.1},{x:.31,y:-.1}],color:"primary",fill:!1},"path2-8-3":{type:"path",points:[{x:.09,y:-.08},{x:.09,y:-.15}],color:"primary",fill:!1},"path2-8-3-2":{type:"path",points:[{x:.09,y:.03},{x:.09,y:-.04}],color:"primary",fill:!1},path15:{type:"path",points:[{x:.27,y:-.04},{x:.27,y:.03},{x:.2,y:0},{x:.27,y:-.04}],color:"primary",fill:!0},"path2-0":{type:"path",points:[{x:.09,y:0},{x:.31,y:-.01}],color:"primary",fill:!1},"path12-1-0":{type:"path",points:[{x:.05,y:.11},{x:.05,y:-.11}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.13,y:.36},bottom1:{type:"text",text:"{VAL}",x:.06,y:-.42}},refblocks:{top1:{x:.3,y:.55},bottom1:{x:.31,y:-.55},left1:{x:-.42,y:-.1}},bounds:{width:.89,height:1.16,centerX:0,centerY:0},circles:{path1:{type:"circle",x:.16,y:0,radius:.29,color:"primary",fill:!1}}},{paths:OTt,texts:pSe,bounds:LF,refblocks:nZ,circles:FTt}=LTt,fSe=za({primitives:[...Object.values(OTt),...Object.values(FTt),{...pSe.top1,anchor:"middle_right",x:0},{...pSe.bottom1,anchor:"middle_right",x:0}],ports:[{...nZ.top1,labels:["1","drain"]},{...nZ.bottom1,labels:["2","source"]},{...nZ.left1,labels:["3","gate"]}],size:{width:LF.width,height:LF.height},center:{x:LF.centerX,y:LF.centerY}}),xSe=ro(fSe),gSe=xSe.primitives.filter(t=>t.type==="text"),oZ=gSe.find(t=>t.text==="{VAL}");oZ.x=-.35,oZ.y=0,oZ.anchor="middle_right";var rZ=gSe.find(t=>t.text==="{REF}");rZ.y=0,rZ.x=.35,rZ.anchor="middle_left";var BTt=xSe,zTt={paths:{path11:{type:"path",points:[{x:-.4,y:0},{x:.06,y:-.01}],color:"primary",fill:!1},path40:{type:"path",points:[{x:.07,y:.19},{x:.07,y:-.18}],color:"primary",fill:!1},"path12-1":{type:"path",points:[{x:.28,y:.55},{x:.28,y:.11}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:.29,y:-.55},{x:.29,y:-.1}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.07,y:.11},{x:.29,y:.11}],color:"primary",fill:!1},"path2-5":{type:"path",points:[{x:.07,y:-.1},{x:.29,y:-.1}],color:"primary",fill:!1},path15:{type:"path",points:[{x:-.08,y:.06},{x:-.08,y:-.07},{x:.01,y:0},{x:-.08,y:.06}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.15,y:.36},bottom1:{type:"text",text:"{VAL}",x:.04,y:-.42}},refblocks:{top1:{x:.28,y:.55},bottom1:{x:.29,y:-.55},left1:{x:-.4,y:0}},bounds:{width:.85,height:1.16,centerX:0,centerY:0},circles:{path1:{type:"circle",x:.14,y:0,radius:.29,color:"primary",fill:!1}}},{paths:VTt,texts:ySe,bounds:OF,refblocks:iZ,circles:$Tt}=zTt,bSe=za({primitives:[...Object.values(VTt),...Object.values($Tt),{...ySe.top1,anchor:"middle_right",x:0},{...ySe.bottom1,anchor:"middle_right",x:0}],ports:[{...iZ.top1,labels:["1","drain"]},{...iZ.bottom1,labels:["2","source"]},{...iZ.left1,labels:["3","gate"]}],size:{width:OF.width,height:OF.height},center:{x:OF.centerX,y:OF.centerY}}),PSe=ro(bSe),vSe=PSe.primitives.filter(t=>t.type==="text"),sZ=vSe.find(t=>t.text==="{VAL}");sZ.x=-.35,sZ.y=0,sZ.anchor="middle_right";var aZ=vSe.find(t=>t.text==="{REF}");aZ.y=0,aZ.x=.35,aZ.anchor="middle_left";var WTt=PSe,UTt={paths:{diag1:{type:"path",points:[{x:-.1,y:-.1},{x:.1,y:.1}],color:"primary",fill:!1},diag2:{type:"path",points:[{x:-.1,y:.1},{x:.1,y:-.1}],color:"primary",fill:!1},stem:{type:"path",points:[{x:-.2,y:0},{x:0,y:0}],color:"primary",fill:!1}},refblocks:{left1:{x:-.2,y:0}},bounds:{centerX:0,centerY:0}},{paths:XTt,bounds:SSe,refblocks:jTt}=UTt,FF=cn({primitives:[...Object.values(XTt)],ports:[{...jTt.left1,labels:["1"]}],center:{x:SSe.centerX,y:SSe.centerY}}).rotateRightFacingSymbol("right").labelPort("left1",["1"]).build(),GTt=ro(FF,"down"),YTt=ro(FF,"left"),qTt=ro(FF,"up"),$7={paths:{path11:{type:"path",points:[{x:-.4,y:0},{x:.06,y:-.01}],color:"primary",fill:!1},"path40-0":{type:"path",points:[{x:.07,y:.27},{x:.07,y:-.28}],color:"primary",fill:!1},"path40-0-5":{type:"path",points:[{x:.28,y:.24},{x:.08,y:.11}],color:"primary",fill:!1},"path40-0-5-0":{type:"path",points:[{x:.29,y:-.24},{x:.09,y:-.11}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:.29,y:.25},{x:.29,y:.55}],color:"primary",fill:!1},"path12-1-5-3":{type:"path",points:[{x:.29,y:-.55},{x:.29,y:-.25}],color:"primary",fill:!1},path15:{type:"path",points:[{x:.19,y:-.1},{x:.12,y:-.2},{x:.22,y:-.2},{x:.19,y:-.1}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.08,y:.36},bottom1:{type:"text",text:"{VAL}",x:-.07,y:-.41}},refblocks:{top1:{x:.29,y:.55},bottom1:{x:.29,y:-.55},left1:{x:-.4,y:0}},bounds:{minX:-.43,maxX:.43,minY:-.58,maxY:.58,width:.85,height:1.16,centerX:0,centerY:0},circles:{"path1-0":{type:"circle",x:.14,y:0,radius:.29,color:"primary",fill:!1}}},{paths:JTt,texts:sio,bounds:BF,refblocks:cZ,circles:KTt}=$7,QTt=cn({primitives:[...Object.values(JTt),...Object.values(KTt),{type:"text",text:"{REF}",x:-.1,y:.3094553499999995},{type:"text",text:"{VAL}",x:-.1,y:-.3094553499999995}],ports:[{...cZ.top1,labels:["1","collector"]},{...cZ.bottom1,labels:["2","emitter"]},{...cZ.left1,labels:["3","base"]}],size:{width:BF.width,height:BF.height},center:{x:BF.centerX,y:BF.centerY}}).rotateRightFacingSymbol("right").changeTextAnchor("{REF}","middle_right").changeTextAnchor("{VAL}","middle_right").build(),{paths:aio,texts:cio,bounds:lio,refblocks:uio,circles:_io}=$7,ZTt=cn($7).rotateRightFacingSymbol("up").changeTextAnchor("{VAL}","middle_left").labelPort("left1",["3","base"]).labelPort("top1",["1","collector"]).labelPort("bottom1",["2","emitter"]).changeTextAnchor("{REF}","middle_right").build(),{paths:ewt,texts:dio,bounds:zF,refblocks:lZ,circles:twt}=$7,nwt=cn({primitives:[...Object.values(ewt),...Object.values(twt),{type:"text",text:"{REF}",x:-.1,y:-.3094553499999995},{type:"text",text:"{VAL}",x:-.1,y:.3094553499999995}],ports:[{...lZ.top1,labels:["1","collector"]},{...lZ.bottom1,labels:["2","emitter"]},{...lZ.left1,labels:["3","base"]}],size:{width:zF.width,height:zF.height},center:{x:zF.centerX,y:zF.centerY}}).rotateRightFacingSymbol("down").changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_bottom").build(),{paths:owt,texts:hio,bounds:VF,refblocks:uZ,circles:rwt}=$7,iwt=cn({primitives:[...Object.values(owt),...Object.values(rwt),{type:"text",text:"{REF}",x:-.1,y:-.3094553499999995},{type:"text",text:"{VAL}",x:-.1,y:.3094553499999995}],ports:[{...uZ.top1,labels:["1","collector"]},{...uZ.bottom1,labels:["2","emitter"]},{...uZ.left1,labels:["3","base"]}],size:{width:VF.width,height:VF.height},center:{x:VF.centerX,y:VF.centerY}}).rotateRightFacingSymbol("up").changeTextAnchor("{REF}","middle_top").changeTextAnchor("{VAL}","middle_top").build(),{paths:swt,texts:mio,bounds:$F,refblocks:_Z,circles:awt}=$7,cwt=cn({primitives:[...Object.values(swt),...Object.values(awt),{type:"text",text:"{REF}",x:-.1,y:-.3094553499999995},{type:"text",text:"{VAL}",x:-.1,y:.3094553499999995}],ports:[{..._Z.top1,labels:["1","collector"]},{..._Z.bottom1,labels:["2","emitter"]},{..._Z.left1,labels:["3","base"]}],size:{width:$F.width,height:$F.height},center:{x:$F.centerX,y:$F.centerY}}).rotateRightFacingSymbol("left").changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:lwt,texts:pio,bounds:WF,refblocks:dZ,circles:uwt}=$7,_wt=cn({primitives:[...Object.values(lwt),...Object.values(uwt),{type:"text",text:"{REF}",x:-.1,y:-.3094553499999995},{type:"text",text:"{VAL}",x:-.1,y:.3094553499999995}],ports:[{...dZ.top1,labels:["1","collector"]},{...dZ.bottom1,labels:["2","emitter"]},{...dZ.left1,labels:["3","base"]}],size:{width:WF.width,height:WF.height},center:{x:WF.centerX,y:WF.centerY}}).rotateRightFacingSymbol("left").changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),dwt={paths:{path40:{type:"path",points:[{x:.14,y:.04},{x:-.32,y:-.21}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.32,y:.31},{x:.14,y:.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.32,y:-.21},{x:-.32,y:.31}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.32,y:.18},{x:-.57,y:.18}],color:"primary",fill:!1},path45:{type:"path",points:[{x:-.32,y:-.09},{x:-.57,y:-.09}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.43,y:.04},{x:.15,y:.04}],color:"primary",fill:!1},"rect1577-3":{type:"path",points:[{x:-.2,y:.18},{x:-.27,y:.18}],color:"primary",fill:!0},"rect1577-4":{type:"path",points:[{x:-.2,y:-.09},{x:-.27,y:-.09}],color:"primary",fill:!0},"rect1577-4-7":{type:"path",points:[{x:-.23,y:-.05},{x:-.23,y:-.12}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.01,y:.42},bottom1:{type:"text",text:"{VAL}",x:0,y:-.3}},refblocks:{left1:{x:-.57,y:.18},left2:{x:-.57,y:-.09},right1:{x:.43,y:.04}},bounds:{minX:-.55,maxX:.55,minY:-.38,maxY:.27,width:1.09,height:.3,centerX:0,centerY:.05},circles:{}},UF=cn(dwt).labelPort("left1",["1","inp1"]).labelPort("left2",["2","inp2"]).labelPort("right1",["3","out"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),hwt=ro(UF,"down"),mwt=ro(UF,"left"),pwt=ro(UF,"up"),fwt={paths:{path40:{type:"path",points:[{x:.14,y:.04},{x:-.32,y:-.21}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.32,y:.31},{x:.14,y:.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.32,y:-.21},{x:-.32,y:.31}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.32,y:.18},{x:-.57,y:.18}],color:"primary",fill:!1},path45:{type:"path",points:[{x:-.32,y:-.09},{x:-.57,y:-.09}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.43,y:.04},{x:.15,y:.04}],color:"primary",fill:!1},"path44-1":{type:"path",points:[{x:-.1,y:.44},{x:-.1,y:.18}],color:"primary",fill:!1},"path44-2":{type:"path",points:[{x:-.09,y:-.34},{x:-.09,y:-.09}],color:"primary",fill:!1},"rect1577-3":{type:"path",points:[{x:-.2,y:.18},{x:-.27,y:.18}],color:"primary",fill:!0},"rect1577-4":{type:"path",points:[{x:-.2,y:-.09},{x:-.27,y:-.09}],color:"primary",fill:!0},"rect1577-4-7":{type:"path",points:[{x:-.23,y:.14},{x:-.23,y:.22}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:.25,y:.32},bottom1:{type:"text",text:"{VAL}",x:.25,y:-.24}},refblocks:{left1:{x:-.57,y:.18},left2:{x:-.57,y:-.09},right1:{x:.43,y:.04},top2:{x:-.1,y:.44},bottom1:{x:-.09,y:-.34}},bounds:{minX:-.55,maxX:.55,minY:-.38,maxY:.27,width:1.09,height:.3,centerX:0,centerY:.05},circles:{}},XF=cn(fwt).labelPort("left1",["1","inp1"]).labelPort("left2",["2","inp2"]).labelPort("right1",["4","out"]).labelPort("top2",["5","V+"]).labelPort("bottom1",["3","V-"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),xwt=ro(XF,"down"),gwt=ro(XF,"left"),ywt=ro(XF,"up"),bwt={paths:{path11:{type:"path",points:[{x:-.42,y:-.1},{x:.05,y:-.11}],color:"primary",fill:!1},path40:{type:"path",points:[{x:.09,y:.19},{x:.09,y:-.18}],color:"primary",fill:!1},"path12-1":{type:"path",points:[{x:.3,y:.55},{x:.3,y:.11}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:.31,y:-.55},{x:.31,y:-.01}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.09,y:.11},{x:.31,y:.11}],color:"primary",fill:!1},"path2-5":{type:"path",points:[{x:.09,y:-.1},{x:.31,y:-.1}],color:"primary",fill:!1},path15:{type:"path",points:[{x:.2,y:.03},{x:.2,y:-.04},{x:.27,y:-.01},{x:.2,y:.03}],color:"primary",fill:!0},"path2-0":{type:"path",points:[{x:.09,y:0},{x:.31,y:-.01}],color:"primary",fill:!1},"path12-1-0":{type:"path",points:[{x:.05,y:.17},{x:.05,y:-.11}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.13,y:.36},bottom1:{type:"text",text:"{VAL}",x:.06,y:-.42}},refblocks:{top1:{x:.3,y:.55},bottom1:{x:.31,y:-.55},left1:{x:-.42,y:-.1}},bounds:{width:.89,height:1.16,centerX:0,centerY:0},circles:{path1:{type:"circle",x:.16,y:0,radius:.29,color:"primary",fill:!1}}},{paths:Pwt,texts:CSe,bounds:jF,refblocks:hZ,circles:vwt}=bwt,MSe=za({primitives:[...Object.values(Pwt),...Object.values(vwt),{...CSe.top1,anchor:"middle_right",x:0},{...CSe.bottom1,anchor:"middle_right",x:0}],ports:[{...hZ.top1,labels:["1","drain"]},{...hZ.bottom1,labels:["2","source"]},{...hZ.left1,labels:["3","gate"]}],size:{width:jF.width,height:jF.height},center:{x:jF.centerX,y:jF.centerY}}),TSe=ro(MSe),wSe=TSe.primitives.filter(t=>t.type==="text"),mZ=wSe.find(t=>t.text==="{VAL}");mZ.x=-.35,mZ.y=0,mZ.anchor="middle_right";var pZ=wSe.find(t=>t.text==="{REF}");pZ.y=0,pZ.x=.35,pZ.anchor="middle_left";var Swt=TSe,Cwt={paths:{path11:{type:"path",points:[{x:-.42,y:-.1},{x:.05,y:-.11}],color:"primary",fill:!1},"path12-1":{type:"path",points:[{x:.3,y:.55},{x:.3,y:.11}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:.31,y:-.55},{x:.31,y:-.01}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.09,y:.11},{x:.31,y:.11}],color:"primary",fill:!1},"path2-8-3-7":{type:"path",points:[{x:.09,y:.15},{x:.09,y:.07}],color:"primary",fill:!1},"path2-5":{type:"path",points:[{x:.09,y:-.1},{x:.31,y:-.1}],color:"primary",fill:!1},"path2-8-3":{type:"path",points:[{x:.09,y:-.08},{x:.09,y:-.15}],color:"primary",fill:!1},"path2-8-3-2":{type:"path",points:[{x:.09,y:.03},{x:.09,y:-.04}],color:"primary",fill:!1},path15:{type:"path",points:[{x:.2,y:.03},{x:.2,y:-.04},{x:.27,y:-.01},{x:.2,y:.03}],color:"primary",fill:!0},"path2-0":{type:"path",points:[{x:.09,y:0},{x:.31,y:-.01}],color:"primary",fill:!1},"path12-1-0":{type:"path",points:[{x:.05,y:.11},{x:.05,y:-.11}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.13,y:.36},bottom1:{type:"text",text:"{VAL}",x:.06,y:-.42}},refblocks:{top1:{x:.3,y:.55},bottom1:{x:.31,y:-.55},left1:{x:-.42,y:-.1}},bounds:{width:.89,height:1.16,centerX:0,centerY:0},circles:{path1:{type:"circle",x:.16,y:0,radius:.29,color:"primary",fill:!1}}},{paths:Mwt,texts:ESe,bounds:GF,refblocks:fZ,circles:Twt}=Cwt,DSe=za({primitives:[...Object.values(Mwt),...Object.values(Twt),{...ESe.top1,anchor:"middle_right",x:0},{...ESe.bottom1,anchor:"middle_right",x:0}],ports:[{...fZ.top1,labels:["1","drain"]},{...fZ.bottom1,labels:["2","source"]},{...fZ.left1,labels:["3","gate"]}],size:{width:GF.width,height:GF.height},center:{x:GF.centerX,y:GF.centerY}}),ASe=ro(DSe),RSe=ASe.primitives.filter(t=>t.type==="text"),xZ=RSe.find(t=>t.text==="{VAL}");xZ.x=-.35,xZ.y=0,xZ.anchor="middle_right";var gZ=RSe.find(t=>t.text==="{REF}");gZ.y=0,gZ.x=.35,gZ.anchor="middle_left";var wwt=ASe,Ewt={paths:{path11:{type:"path",points:[{x:-.54,y:-.01},{x:-.15,y:-.02}],color:"primary",fill:!1},path40:{type:"path",points:[{x:.13,y:0},{x:-.13,y:-.13}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.13,y:.13},{x:.13,y:0}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.13,y:-.13},{x:-.13,y:.13}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.13,y:.13},{x:.13,y:-.13}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.14,y:0},{x:.54,y:-.01}],color:"primary",fill:!1},"path25-0":{type:"path",points:[{x:.2,y:.38},{x:.16,y:.28},{x:.26,y:.3}],color:"primary",fill:!0},"path78-6":{type:"path",points:[{x:.33,y:.43},{x:.32,y:.42},{x:.21,y:.31},{x:.21,y:.31}],color:"primary",fill:!1},"path25-0-9":{type:"path",points:[{x:.35,y:.35},{x:.31,y:.26},{x:.41,y:.27}],color:"primary",fill:!0},"path78-6-5":{type:"path",points:[{x:.48,y:.4},{x:.47,y:.39},{x:.35,y:.29},{x:.35,y:.29}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.1,y:.35},bottom1:{type:"text",text:"{VAL}",x:0,y:-.43}},refblocks:{left1:{x:-.54,y:-.01},right1:{x:.54,y:-.01}},bounds:{minX:-.57,maxX:.57,minY:-.43,maxY:.43,width:1.14,height:.85,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:-.01,radius:.29,color:"primary",fill:!1}}},kSe=cn(Ewt).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),NSe=ro(kSe),Dwt=NSe.primitives.filter(t=>t.type==="text"),HSe=Dwt.find(t=>t.text==="{REF}");HSe.y=0,HSe.anchor="middle_left";var Awt=NSe,Rwt={paths:{path11:{type:"path",points:[{x:-.4,y:0},{x:.06,y:-.01}],color:"primary",fill:!1},path40:{type:"path",points:[{x:.07,y:.19},{x:.07,y:-.18}],color:"primary",fill:!1},"path12-1":{type:"path",points:[{x:.28,y:.55},{x:.28,y:.11}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:.29,y:-.55},{x:.29,y:-.1}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.07,y:.11},{x:.29,y:.11}],color:"primary",fill:!1},"path2-5":{type:"path",points:[{x:.07,y:-.1},{x:.29,y:-.1}],color:"primary",fill:!1},path15:{type:"path",points:[{x:.01,y:-.07},{x:.01,y:.06},{x:-.08,y:0},{x:.01,y:-.07}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.15,y:.36},bottom1:{type:"text",text:"{VAL}",x:.04,y:-.42}},refblocks:{top1:{x:.28,y:.55},bottom1:{x:.29,y:-.55},left1:{x:-.4,y:0}},bounds:{width:.85,height:1.16,centerX:0,centerY:0},circles:{path1:{type:"circle",x:.14,y:0,radius:.29,color:"primary",fill:!1}}},{paths:kwt,texts:ISe,bounds:YF,refblocks:yZ,circles:Nwt}=Rwt,LSe=za({primitives:[...Object.values(kwt),...Object.values(Nwt),{...ISe.top1,anchor:"middle_right",x:0},{...ISe.bottom1,anchor:"middle_right"}],ports:[{...yZ.top1,labels:["1","drain"]},{...yZ.bottom1,labels:["2","source"]},{...yZ.left1,labels:["3","gate"]}],size:{width:YF.width,height:YF.height},center:{x:YF.centerX,y:YF.centerY}}),OSe=ro(LSe),FSe=OSe.primitives.filter(t=>t.type==="text"),bZ=FSe.find(t=>t.text==="{VAL}");bZ.x=-.35,bZ.y=0,bZ.anchor="middle_right";var PZ=FSe.find(t=>t.text==="{REF}");PZ.y=0,PZ.x=.35,PZ.anchor="middle_left";var Hwt=OSe,W7={paths:{path11:{type:"path",points:[{x:-.4,y:0},{x:.06,y:-.01}],color:"primary",fill:!1},"path40-0":{type:"path",points:[{x:.07,y:.27},{x:.07,y:-.28}],color:"primary",fill:!1},"path40-0-5":{type:"path",points:[{x:.28,y:.24},{x:.08,y:.11}],color:"primary",fill:!1},"path40-0-5-0":{type:"path",points:[{x:.29,y:-.24},{x:.09,y:-.11}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:.29,y:.25},{x:.29,y:.55}],color:"primary",fill:!1},"path12-1-5-3":{type:"path",points:[{x:.29,y:-.55},{x:.29,y:-.25}],color:"primary",fill:!1},path15:{type:"path",points:[{x:.15,y:-.23},{x:.22,y:-.12},{x:.12,y:-.12},{x:.15,y:-.23}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.08,y:.37},bottom1:{type:"text",text:"{VAL}",x:-.07,y:-.41}},refblocks:{top1:{x:.29,y:.55},bottom1:{x:.29,y:-.55},left1:{x:-.4,y:0}},bounds:{minX:-.43,maxX:.43,minY:-.58,maxY:.58,width:.85,height:1.16,centerX:0,centerY:0},circles:{"path1-0":{type:"circle",x:.14,y:0,radius:.29,color:"primary",fill:!1}}},{paths:Iwt,texts:fio,bounds:qF,refblocks:vZ,circles:Lwt}=W7,Owt=cn({primitives:[...Object.values(Iwt),...Object.values(Lwt),{type:"text",text:"{REF}",x:-.1,y:.3094553499999995},{type:"text",text:"{VAL}",x:-.1,y:-.3094553499999995}],ports:[{...vZ.top1,labels:["1","collector"]},{...vZ.bottom1,labels:["2","emitter"]},{...vZ.left1,labels:["3","base"]}],size:{width:qF.width,height:qF.height},center:{x:qF.centerX,y:qF.centerY}}).rotateRightFacingSymbol("right").changeTextAnchor("{REF}","middle_right").changeTextAnchor("{VAL}","middle_right").build(),{paths:xio,texts:gio,bounds:yio,refblocks:bio,circles:Pio}=W7,Fwt=cn(W7).rotateRightFacingSymbol("up").changeTextAnchor("{VAL}","middle_left").labelPort("left1",["3","base"]).labelPort("top1",["1","collector"]).labelPort("bottom1",["2","emitter"]).changeTextAnchor("{REF}","middle_right").build(),{paths:Bwt,texts:vio,bounds:JF,refblocks:SZ,circles:zwt}=W7,Vwt=cn({primitives:[...Object.values(Bwt),...Object.values(zwt),{type:"text",text:"{REF}",x:-.1,y:-.3094553499999995},{type:"text",text:"{VAL}",x:-.1,y:.3094553499999995}],ports:[{...SZ.top1,labels:["1","collector"]},{...SZ.bottom1,labels:["2","emitter"]},{...SZ.left1,labels:["3","base"]}],size:{width:JF.width,height:JF.height},center:{x:JF.centerX,y:JF.centerY}}).rotateRightFacingSymbol("down").changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_bottom").build(),{paths:$wt,texts:Sio,bounds:KF,refblocks:CZ,circles:Wwt}=W7,Uwt=cn({primitives:[...Object.values($wt),...Object.values(Wwt),{type:"text",text:"{REF}",x:-.1,y:-.3094553499999995},{type:"text",text:"{VAL}",x:-.1,y:.3094553499999995}],ports:[{...CZ.top1,labels:["1","collector"]},{...CZ.bottom1,labels:["2","emitter"]},{...CZ.left1,labels:["3","base"]}],size:{width:KF.width,height:KF.height},center:{x:KF.centerX,y:KF.centerY}}).rotateRightFacingSymbol("up").changeTextAnchor("{REF}","middle_top").changeTextAnchor("{VAL}","middle_top").build(),{paths:Xwt,texts:Cio,bounds:QF,refblocks:MZ,circles:jwt}=W7,Gwt=cn({primitives:[...Object.values(Xwt),...Object.values(jwt),{type:"text",text:"{REF}",x:-.1,y:-.3094553499999995},{type:"text",text:"{VAL}",x:-.1,y:.3094553499999995}],ports:[{...MZ.top1,labels:["1","collector"]},{...MZ.bottom1,labels:["2","emitter"]},{...MZ.left1,labels:["3","base"]}],size:{width:QF.width,height:QF.height},center:{x:QF.centerX,y:QF.centerY}}).rotateRightFacingSymbol("left").changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:Ywt,texts:Mio,bounds:ZF,refblocks:TZ,circles:qwt}=W7,Jwt=cn({primitives:[...Object.values(Ywt),...Object.values(qwt),{type:"text",text:"{REF}",x:-.1,y:-.3094553499999995},{type:"text",text:"{VAL}",x:-.1,y:.3094553499999995}],ports:[{...TZ.top1,labels:["1","collector"]},{...TZ.bottom1,labels:["2","emitter"]},{...TZ.left1,labels:["3","base"]}],size:{width:ZF.width,height:ZF.height},center:{x:ZF.centerX,y:ZF.centerY}}).rotateRightFacingSymbol("left").changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),Kwt={paths:{path40:{type:"path",points:[{x:-.19,y:.33},{x:-.26,y:.14}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.38,y:.26},{x:-.19,y:.33}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.26,y:.14},{x:-.38,y:.26}],color:"primary",fill:!1},path43:{type:"path",points:[{x:-.26,y:.39},{x:-.13,y:.26}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.32,y:.2},{x:-.52,y:0}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:0,y:.52},{x:-.19,y:.33}],color:"primary",fill:!1},"path40-4":{type:"path",points:[{x:-.19,y:-.32},{x:-.38,y:-.26}],color:"primary",fill:!1},"path41-1":{type:"path",points:[{x:-.26,y:-.13},{x:-.19,y:-.32}],color:"primary",fill:!1},"path42-7":{type:"path",points:[{x:-.38,y:-.26},{x:-.26,y:-.13}],color:"primary",fill:!1},"path43-1":{type:"path",points:[{x:-.13,y:-.26},{x:-.26,y:-.39}],color:"primary",fill:!1},"path44-8":{type:"path",points:[{x:-.32,y:-.19},{x:-.51,y:-.01}],color:"primary",fill:!1},"path44-0-7":{type:"path",points:[{x:-.01,y:-.5},{x:-.19,y:-.32}],color:"primary",fill:!1},"path40-4-0":{type:"path",points:[{x:.32,y:.19},{x:.13,y:.26}],color:"primary",fill:!1},"path41-1-2":{type:"path",points:[{x:.26,y:.38},{x:.32,y:.19}],color:"primary",fill:!1},"path42-7-1":{type:"path",points:[{x:.13,y:.26},{x:.26,y:.38}],color:"primary",fill:!1},"path43-1-8":{type:"path",points:[{x:.39,y:.26},{x:.26,y:.13}],color:"primary",fill:!1},"path44-8-7":{type:"path",points:[{x:.2,y:.32},{x:.01,y:.51}],color:"primary",fill:!1},"path44-0-7-1":{type:"path",points:[{x:.52,y:0},{x:.32,y:.19}],color:"primary",fill:!1},"path40-4-8":{type:"path",points:[{x:.32,y:-.19},{x:.26,y:-.38}],color:"primary",fill:!1},"path41-1-4":{type:"path",points:[{x:.13,y:-.26},{x:.32,y:-.19}],color:"primary",fill:!1},"path42-7-0":{type:"path",points:[{x:.26,y:-.38},{x:.13,y:-.26}],color:"primary",fill:!1},"path43-1-0":{type:"path",points:[{x:.26,y:-.13},{x:.39,y:-.26}],color:"primary",fill:!1},"path44-8-9":{type:"path",points:[{x:.19,y:-.32},{x:0,y:-.52}],color:"primary",fill:!1},"path44-0-7-3":{type:"path",points:[{x:.5,y:-.01},{x:.32,y:-.19}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.29,y:.46},bottom1:{type:"text",text:"{VAL}",x:-.29,y:-.5}},refblocks:{left1:{x:-.52,y:0},right1:{x:.52,y:0}},bounds:{width:1.09,height:1.09,centerX:0,centerY:0}},{paths:Qwt,texts:BSe,bounds:eB,refblocks:zSe}=Kwt,VSe=za({primitives:[...Object.values(Qwt),{...BSe.bottom1,y:.35,anchor:"middle_top"},{...BSe.top1,anchor:"middle_left"}],ports:[{...zSe.left1,labels:["1"]},{...zSe.right1,labels:["2"]}],size:{width:eB.width+.05,height:eB.height},center:{x:eB.centerX,y:eB.centerY}}),Zwt=ro(VSe),eEt=Zwt,tEt={paths:{path18:{type:"path",points:[{x:-.53,y:0},{x:-.27,y:0}],color:"primary",fill:!1},path19:{type:"path",points:[{x:.26,y:0},{x:.53,y:0}],color:"primary",fill:!1},path20:{type:"path",points:[{x:0,y:.13},{x:.26,y:.13},{x:.26,y:-.13},{x:-.27,y:-.13},{x:-.27,y:.13},{x:0,y:.13}],color:"primary",fill:!1},path23:{type:"path",points:[{x:.28,y:-.28},{x:.18,y:-.25},{x:.25,y:-.18}],color:"primary",fill:!0},path24:{type:"path",points:[{x:.29,y:-.29},{x:.25,y:-.17},{x:.16,y:-.26}],color:"primary",fill:!0},path26:{type:"path",points:[{x:-.3,y:.29},{x:.23,y:-.23}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:.06,y:.2},bottom1:{type:"text",text:"{VAL}",x:-.1,y:-.28}},refblocks:{left1:{x:-.53,y:0},right1:{x:.53,y:0}},bounds:{width:1.13,height:.58,centerX:0,centerY:0}},{paths:nEt,texts:$Se,bounds:tB,refblocks:WSe}=tEt,nB=za({primitives:[...Object.values(nEt),{...$Se.bottom1,x:0,y:-.35,anchor:"middle_top"},{...$Se.top1,x:0,y:.35,anchor:"middle_bottom"}],ports:[{...WSe.left1,labels:["1"]},{...WSe.right1,labels:["2"]}],size:{width:tB.width+.05,height:tB.height},center:{x:tB.centerX,y:tB.centerY}}),wZ=ro(nB,"down"),EZ=wZ.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),DZ=wZ.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");EZ.anchor="middle_left",DZ.anchor="middle_left",EZ.y+=.31,EZ.x=.34,DZ.y-=.31,DZ.x=.34;var oEt=wZ,AZ=ro(nB,"left"),RZ=AZ.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),kZ=AZ.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");RZ.anchor="middle_bottom",kZ.anchor="middle_top",RZ.y+=.73,RZ.x=0,kZ.y-=.7,kZ.x=0;var rEt=AZ,NZ=ro(nB,"up"),HZ=NZ.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),IZ=NZ.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");HZ.anchor="middle_left",IZ.anchor="middle_left",HZ.y+=.21,HZ.x=.34,IZ.y-=.21,IZ.x=.34;var iEt=NZ,oB={paths:{path1:{type:"path",points:[{x:-.42,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:.42,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:{}},{paths:sEt,texts:Tio,bounds:rB,refblocks:LZ,circles:aEt}=oB,cEt=cn({primitives:[...Object.values(sEt),...Object.values(aEt),{type:"text",text:"{REF}",x:-.15,y:.2394553499999995},{type:"text",text:"{VAL}",x:.15,y:.2394553499999995}],ports:[{...LZ.left,labels:["1"]},{...LZ.right,labels:["3"]},{...LZ.bottom,labels:["2"]}],size:{width:rB.width,height:rB.height},center:{x:rB.centerX,y:rB.centerY}}).rotateRightFacingSymbol("down").labelPort("left",["1"]).labelPort("right",["2"]).labelPort("bottom",["3"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:lEt,texts:wio,bounds:iB,refblocks:OZ,circles:uEt}=oB,_Et=cn({primitives:[...Object.values(lEt),...Object.values(uEt),{type:"text",text:"{REF}",x:-.3,y:-.3894553499999995},{type:"text",text:"{VAL}",x:-.3,y:.3194553499999995}],ports:[{...OZ.left,labels:["1"]},{...OZ.right,labels:["3"]},{...OZ.bottom,labels:["2"]}],size:{width:iB.width,height:iB.height},center:{x:iB.centerX,y:iB.centerY}}).rotateRightFacingSymbol("left").labelPort("left",["1"]).labelPort("right",["2"]).labelPort("bottom",["3"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),dEt=cn(oB).labelPort("left",["1"]).labelPort("right",["3"]).labelPort("bottom",["2"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),{paths:hEt,texts:Eio,bounds:sB,refblocks:FZ,circles:mEt}=oB,pEt=cn({primitives:[...Object.values(hEt),...Object.values(mEt),{type:"text",text:"{REF}",x:.3,y:-.2894553499999995},{type:"text",text:"{VAL}",x:-.3,y:-.2894553499999995}],ports:[{...FZ.left,labels:["1"]},{...FZ.right,labels:["3"]},{...FZ.bottom,labels:["2"]}],size:{width:sB.width,height:sB.height},center:{x:sB.centerX,y:sB.centerY}}).rotateRightFacingSymbol("up").labelPort("left",["1"]).labelPort("right",["2"]).labelPort("bottom",["3"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),fEt={paths:{path11:{type:"path",points:[{x:-.54,y:.03},{x:-.3,y:.03}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.29,y:.03},{x:.54,y:.03}],color:"primary",fill:!1}},refblocks:{left1:{x:-.54,y:.03},right1:{x:.54,y:.03}},bounds:{width:1.14,height:.79,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:.04,radius:.29,color:"primary",fill:!1}}},{paths:xEt,bounds:aB,refblocks:USe,circles:gEt}=fEt,XSe=za({primitives:[...Object.values(xEt),...Object.values(gEt),{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:[{...USe.left1,labels:["1"]},{...USe.right1,labels:["2"]}],size:{width:aB.width,height:aB.height},center:{x:aB.centerX,y:aB.centerY}}),jSe=ro(XSe),BZ=jSe.primitives.filter(t=>t.type==="text"),zZ=BZ.find(t=>t.text==="{REF}"),VZ=BZ.find(t=>t.text==="{VAL}"),$Z=BZ.find(t=>t.text==="COS φ");zZ.x=.35,zZ.y=0,zZ.anchor="middle_left",VZ.anchor="middle_right",VZ.x=-.35,VZ.y=0,$Z.x=0,$Z.y=0,$Z.anchor="center";var yEt=jSe,bEt={paths:{"path12-1-8-6-9-9":{type:"path",points:[{x:.01,y:.03},{x:.01,y:-.09}],color:"primary",fill:!1},"path12-1-5-6-4":{type:"path",points:[{x:-.47,y:-.05},{x:-.17,y:-.05}],color:"primary",fill:!1},"path12-1-8-0-0":{type:"path",points:[{x:-.16,y:-.09},{x:.18,y:-.09}],color:"primary",fill:!1},"path12-1-0-1":{type:"path",points:[{x:.2,y:-.05},{x:.47,y:-.05}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:.01,y:.22},bottom1:{type:"text",text:"{VAL}",x:-.16,y:-.22}},refblocks:{left1:{x:-.47,y:-.05},right1:{x:.47,y:-.05}},bounds:{width:1,height:.45,centerX:0,centerY:0},circles:{"circle-2":{type:"circle",x:-.14,y:-.05,radius:.02,color:"primary",fill:!1},circle:{type:"circle",x:.17,y:-.05,radius:.02,color:"primary",fill:!1}}},{paths:PEt,texts:GSe,bounds:cB,refblocks:YSe,circles:vEt}=bEt,qSe=za({primitives:[...Object.values(PEt),...Object.values(vEt),{...GSe.top1,anchor:"middle_left"},{...GSe.bottom1,anchor:"middle_left"}],ports:[{...YSe.left1,labels:["1"]},{...YSe.right1,labels:["2"]}],size:{width:cB.width,height:cB.height},center:{x:cB.centerX,y:cB.centerY}}),SEt=ro(qSe,"up"),CEt={paths:{"path12-1-8-6-9-9":{type:"path",points:[{x:-.05,y:.09},{x:-.05,y:.04}],color:"primary",fill:!1},"path12-1-8-7-9-9":{type:"path",points:[{x:-.05,y:.09},{x:.07,y:.09}],color:"primary",fill:!1},"path12-1-8-6-9-10":{type:"path",points:[{x:.07,y:.09},{x:.07,y:.04}],color:"primary",fill:!1},"path12-1-5-6-4":{type:"path",points:[{x:-.47,y:-.05},{x:-.17,y:-.05}],color:"primary",fill:!1},"path12-1-8-0-0":{type:"path",points:[{x:-.16,y:.04},{x:.18,y:.04}],color:"primary",fill:!1},"path12-1-0-1":{type:"path",points:[{x:.2,y:-.05},{x:.47,y:-.05}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:.01,y:.29},bottom1:{type:"text",text:"{VAL}",x:-.16,y:-.22}},refblocks:{left1:{x:-.47,y:-.05},right1:{x:.47,y:-.05}},bounds:{width:1,height:.45,centerX:0,centerY:0},circles:{"circle-2":{type:"circle",x:-.14,y:-.05,radius:.02,color:"primary",fill:!1},circle:{type:"circle",x:.17,y:-.05,radius:.02,color:"primary",fill:!1}}},{paths:MEt,texts:JSe,bounds:lB,refblocks:KSe,circles:TEt}=CEt,QSe=za({primitives:[...Object.values(MEt),...Object.values(TEt),{...JSe.top1,anchor:"middle_left"},{...JSe.bottom1,anchor:"middle_left"}],ports:[{...KSe.left1,labels:["1"]},{...KSe.right1,labels:["2"]}],size:{width:lB.width,height:lB.height},center:{x:lB.centerX,y:lB.centerY}}),wEt=ro(QSe,"up"),uB={paths:{path12_rotated:{type:"path",points:[{x:-.09,y:.12},{x:-.09,y:-.12}],color:"primary",fill:!1},path2_rotated:{type:"path",points:[{x:-.09,y:0},{x:.09,y:0}],color:"primary",fill:!1}},refblocks:{left1:{x:.09,y:0}},bounds:{centerX:0,centerY:0},circles:{}},{paths:EEt,bounds:ZSe,refblocks:DEt,circles:AEt}=uB,REt=cn({primitives:[...Object.values(EEt),...Object.values(AEt),{type:"text",text:"{REF}",x:-.14,y:-0}],ports:[{...DEt.left1,labels:["1"]}],center:{x:ZSe.centerX,y:ZSe.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_top").build(),{paths:kEt,bounds:e8e,refblocks:NEt,circles:HEt}=uB,IEt=cn({primitives:[...Object.values(kEt),...Object.values(HEt),{type:"text",text:"{REF}",x:-.13,y:0}],ports:[{...NEt.left1,labels:["1"]}],center:{x:e8e.centerX,y:e8e.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_right").build(),{paths:LEt,bounds:t8e,refblocks:OEt,circles:FEt}=uB,BEt=cn({primitives:[...Object.values(LEt),...Object.values(FEt),{type:"text",text:"{REF}",x:-.14,y:-0}],ports:[{...OEt.left1,labels:["1"]}],center:{x:t8e.centerX,y:t8e.centerY}}).rotateRightFacingSymbol("left").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_left").build(),{paths:zEt,bounds:n8e,refblocks:VEt}=uB,$Et=cn({primitives:[...Object.values(zEt),{type:"text",text:"{REF}",x:-.14,y:0}],ports:[{...VEt.left1,labels:["1"]}],center:{x:n8e.centerX,y:n8e.centerY}}).rotateRightFacingSymbol("down").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_bottom").build(),WEt={paths:{path40:{type:"path",points:[{x:-.19,y:-.33},{x:-.26,y:-.14}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.38,y:-.26},{x:-.19,y:-.33}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.26,y:-.14},{x:-.38,y:-.26}],color:"primary",fill:!1},path43:{type:"path",points:[{x:-.26,y:-.39},{x:-.13,y:-.26}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.32,y:-.2},{x:-.52,y:0}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:0,y:-.52},{x:-.19,y:-.33}],color:"primary",fill:!1},"path40-4":{type:"path",points:[{x:-.19,y:.32},{x:-.38,y:.26}],color:"primary",fill:!1},"path41-1":{type:"path",points:[{x:-.26,y:.13},{x:-.19,y:.32}],color:"primary",fill:!1},"path42-7":{type:"path",points:[{x:-.38,y:.26},{x:-.26,y:.13}],color:"primary",fill:!1},"path43-1":{type:"path",points:[{x:-.13,y:.26},{x:-.26,y:.39}],color:"primary",fill:!1},"path44-8":{type:"path",points:[{x:-.32,y:.19},{x:-.51,y:.01}],color:"primary",fill:!1},"path44-0-7":{type:"path",points:[{x:-.01,y:.5},{x:-.19,y:.32}],color:"primary",fill:!1},"path40-4-0":{type:"path",points:[{x:.32,y:-.19},{x:.13,y:-.26}],color:"primary",fill:!1},"path41-1-2":{type:"path",points:[{x:.26,y:-.38},{x:.32,y:-.19}],color:"primary",fill:!1},"path42-7-1":{type:"path",points:[{x:.13,y:-.26},{x:.26,y:-.38}],color:"primary",fill:!1},"path43-1-8":{type:"path",points:[{x:.39,y:-.26},{x:.26,y:-.13}],color:"primary",fill:!1},"path44-8-7":{type:"path",points:[{x:.2,y:-.32},{x:.01,y:-.51}],color:"primary",fill:!1},"path44-0-7-1":{type:"path",points:[{x:.52,y:0},{x:.32,y:-.19}],color:"primary",fill:!1},"path40-4-8":{type:"path",points:[{x:.32,y:.19},{x:.26,y:.38}],color:"primary",fill:!1},"path41-1-4":{type:"path",points:[{x:.13,y:.26},{x:.32,y:.19}],color:"primary",fill:!1},"path42-7-0":{type:"path",points:[{x:.26,y:.38},{x:.13,y:.26}],color:"primary",fill:!1},"path43-1-0":{type:"path",points:[{x:.26,y:.13},{x:.39,y:.26}],color:"primary",fill:!1},"path44-8-9":{type:"path",points:[{x:.19,y:.32},{x:0,y:.52}],color:"primary",fill:!1},"path44-0-7-3":{type:"path",points:[{x:.5,y:.01},{x:.32,y:.19}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.29,y:-.46},bottom1:{type:"text",text:"{VAL}",x:-.29,y:.5}},refblocks:{top1:{x:0,y:-.52},bottom1:{x:0,y:.52},left1:{x:-.52,y:0},right1:{x:.52,y:0}},bounds:{width:1.09,height:1.1,centerX:0,centerY:0},circles:{}},{paths:UEt,texts:o8e,bounds:_B,refblocks:dB,circles:XEt}=WEt,r8e=za({primitives:[...Object.values(UEt),...Object.values(XEt),{...o8e.top1,anchor:"middle_right"},{...o8e.bottom1,anchor:"middle_right"}],ports:[{...dB.top1,labels:["1"]},{...dB.bottom1,labels:["2"]},{...dB.left1,labels:["3"]},{...dB.right1,labels:["4"]}],size:{width:_B.width,height:_B.height},center:{x:_B.centerX,y:_B.centerY}}),WZ=ro(r8e),jEt=WZ.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),GEt=WZ.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");jEt.anchor="middle_left",GEt.anchor="middle_right";var YEt=WZ,hB={paths:{path27:{type:"path",points:[{x:.47,y:.04},{x:.21,y:.04}],color:"primary",fill:!1},"path27-0":{type:"path",points:[{x:-.21,y:.04},{x:-.47,y:.04}],color:"primary",fill:!1},"path27-8-2-4":{type:"path",points:[{x:.21,y:.04},{x:.19,y:-.05}],color:"primary",fill:!1},"path27-8-2-4-29":{type:"path",points:[{x:-.19,y:.14},{x:-.21,y:.04}],color:"primary",fill:!1},"path27-8-2-4-5":{type:"path",points:[{x:.19,y:-.05},{x:.13,y:.14}],color:"primary",fill:!1},"path27-8-2-4-5-1":{type:"path",points:[{x:.08,y:-.05},{x:.13,y:.14}],color:"primary",fill:!1},"path27-8-2-4-5-1-9":{type:"path",points:[{x:.08,y:-.05},{x:.03,y:.14}],color:"primary",fill:!1},"path27-8-2-4-5-1-9-2":{type:"path",points:[{x:-.03,y:-.05},{x:.03,y:.14}],color:"primary",fill:!1},"path27-8-2-4-5-1-9-2-1":{type:"path",points:[{x:-.03,y:-.05},{x:-.08,y:.14}],color:"primary",fill:!1},"path27-8-2-4-5-1-9-2-1-2":{type:"path",points:[{x:-.13,y:-.05},{x:-.08,y:.14}],color:"primary",fill:!1},"path27-8-2-4-5-1-9-2-1-2-2":{type:"path",points:[{x:-.13,y:-.05},{x:-.19,y:.14}],color:"primary",fill:!1}},refblocks:{left1:{x:-.47,y:.04},right1:{x:.47,y:.04}},bounds:{width:.99,height:.84,centerX:0,centerY:0},circles:{}},{paths:qEt,bounds:mB,refblocks:i8e,circles:JEt}=hB,KEt=cn({primitives:[...Object.values(qEt),...Object.values(JEt),{type:"text",text:"{REF}",x:-.2,y:.2194553499999995},{type:"text",text:"{VAL}",x:.2,y:.2194553499999995}],ports:[{...i8e.left1,labels:["1"]},{...i8e.right1,labels:["2"]}],size:{width:mB.width,height:mB.height},center:{x:mB.centerX,y:mB.centerY}}).rotateRightFacingSymbol("down").labelPort("left",["1"]).labelPort("right",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:QEt,bounds:pB,refblocks:s8e,circles:ZEt}=hB,eDt=cn({primitives:[...Object.values(QEt),...Object.values(ZEt),{type:"text",text:"{REF}",x:0,y:-.1704553499999995},{type:"text",text:"{VAL}",x:0,y:.2294553499999995}],ports:[{...s8e.left1,labels:["1"]},{...s8e.right1,labels:["2"]}],size:{width:pB.width,height:pB.height},center:{x:pB.centerX,y:pB.centerY}}).rotateRightFacingSymbol("left").labelPort("left",["1"]).labelPort("right",["2"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),{paths:tDt,bounds:fB,refblocks:a8e,circles:nDt}=hB,oDt=cn({primitives:[...Object.values(tDt),...Object.values(nDt),{type:"text",text:"{REF}",x:0,y:.2294553499999995},{type:"text",text:"{VAL}",x:0,y:-.1704553499999995}],ports:[{...a8e.left1,labels:["1"]},{...a8e.right1,labels:["2"]}],size:{width:fB.width,height:fB.height},center:{x:fB.centerX,y:fB.centerY}}).rotateRightFacingSymbol("right").labelPort("left",["1"]).labelPort("right",["2"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),{paths:rDt,bounds:xB,refblocks:c8e,circles:iDt}=hB,sDt=cn({primitives:[...Object.values(rDt),...Object.values(iDt),{type:"text",text:"{REF}",x:.2,y:-.1404553499999995},{type:"text",text:"{VAL}",x:-.2,y:-.1494553499999995}],ports:[{...c8e.left1,labels:["1"]},{...c8e.right1,labels:["2"]}],size:{width:xB.width,height:xB.height},center:{x:xB.centerX,y:xB.centerY}}).rotateRightFacingSymbol("up").labelPort("left",["1"]).labelPort("right",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),l8e={paths:{path27:{type:"path",points:[{x:.76,y:-.28},{x:.31,y:-.28}],color:"primary",fill:!1},path28:{type:"path",points:[{x:-.3,y:-.02},{x:-.77,y:-.02}],color:"primary",fill:!1},path30:{type:"path",points:[{x:-.3,y:.35},{x:-.3,y:-.28}],color:"primary",fill:!1},"path27-3":{type:"path",points:[{x:.77,y:.35},{x:.32,y:.35}],color:"primary",fill:!1},"path29-5":{type:"path",points:[{x:-.07,y:-.28},{x:-.3,y:-.28}],color:"primary",fill:!1},"path29-5-7":{type:"path",points:[{x:.33,y:-.28},{x:.11,y:-.28}],color:"primary",fill:!1},"path29-5-7-6":{type:"path",points:[{x:-.06,y:-.17},{x:-.06,y:-.39}],color:"primary",fill:!1},"path29-5-7-6-6":{type:"path",points:[{x:.09,y:-.17},{x:.09,y:-.39}],color:"primary",fill:!1},"path29-5-9":{type:"path",points:[{x:-.07,y:.35},{x:-.3,y:.35}],color:"primary",fill:!1},"path29-5-7-2":{type:"path",points:[{x:.33,y:.35},{x:.11,y:.35}],color:"primary",fill:!1},"path29-5-7-6-0":{type:"path",points:[{x:-.06,y:.46},{x:-.06,y:.24}],color:"primary",fill:!1},"path29-5-7-6-6-2":{type:"path",points:[{x:.09,y:.46},{x:.09,y:.24}],color:"primary",fill:!1},"path29-5-92":{type:"path",points:[{x:.33,y:.13},{x:.33,y:.35}],color:"primary",fill:!1},"path29-5-7-28":{type:"path",points:[{x:.33,y:-.28},{x:.33,y:-.05}],color:"primary",fill:!1},"path29-5-7-6-9":{type:"path",points:[{x:.44,y:.11},{x:.22,y:.11}],color:"primary",fill:!1},"path29-5-7-6-6-7":{type:"path",points:[{x:.44,y:-.04},{x:.22,y:-.04}],color:"primary",fill:!1},"path29-5-7-6-9-2":{type:"path",points:[{x:.44,y:.07},{x:.22,y:.07}],color:"primary",fill:!1},"path29-5-7-6-9-2-4":{type:"path",points:[{x:.44,y:0},{x:.44,y:.07}],color:"primary",fill:!1},"path29-5-7-6-9-2-4-6":{type:"path",points:[{x:.22,y:0},{x:.22,y:.07}],color:"primary",fill:!1},"path29-5-7-6-9-2-9":{type:"path",points:[{x:.44,y:0},{x:.22,y:0}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:.02,y:.53},bottom1:{type:"text",text:"{VAL}",x:.01,y:-.54}},refblocks:{left1:{x:-.77,y:-.02},right1:{x:.76,y:-.28},right2:{x:.77,y:.35}},bounds:{width:1.59,height:1.07,centerX:0,centerY:0},circles:{}},{paths:aDt,texts:u8e,bounds:gB,refblocks:UZ,circles:cDt}=l8e,yB=za({primitives:[...Object.values(aDt),...Object.values(cDt),{...u8e.top1,anchor:"middle_bottom"},{...u8e.bottom1,anchor:"middle_top"}],ports:[{...UZ.left1,labels:["1"]},{...UZ.right1,labels:["2"]},{...UZ.right2,labels:["3"]}],size:{width:gB.width,height:gB.height},center:{x:gB.centerX,y:gB.centerY}}),XZ=ro(yB,"down"),jZ=XZ.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),GZ=XZ.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");jZ.anchor="middle_bottom",GZ.anchor="middle_top",jZ.y+=.3,jZ.x+=.101,GZ.y-=.49999,GZ.x+=1.19999;var lDt=XZ,{paths:uDt,bounds:bB,refblocks:YZ,circles:_Dt}=l8e,_8e=za({primitives:[...Object.values(uDt),...Object.values(_Dt),{type:"text",text:"{REF}",x:.01596175000000022,y:-.5308501500000009,anchor:"middle_top"},{type:"text",text:"{VAL}",x:.013116750000000454,y:.5408501499999989,anchor:"middle_bottom"}],ports:[{...YZ.left1,labels:["1"]},{...YZ.right1,labels:["2"]},{...YZ.right2,labels:["3"]}],size:{width:bB.width,height:bB.height},center:{x:bB.centerX,y:bB.centerY}}),qZ=ro(yB,"left"),JZ=qZ.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),KZ=qZ.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");JZ.anchor="middle_bottom",KZ.anchor="middle_top",JZ.y+=.99,JZ.x-=0,KZ.y-=1.10999,KZ.x=0;var dDt=qZ,QZ=ro(yB,"up"),ZZ=QZ.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),eee=QZ.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");ZZ.anchor="middle_bottom",eee.anchor="middle_top",ZZ.y+=.499,ZZ.x=.62,eee.y-=.29999,eee.x+=.1;var hDt=QZ,mDt=ro(_8e),pDt={paths:{path40:{type:"path",points:[{x:.14,y:.04},{x:-.12,y:-.09}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.12,y:.18},{x:.14,y:.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.12,y:-.09},{x:-.12,y:.18}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.14,y:.18},{x:.14,y:-.09}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.12,y:.04},{x:-.52,y:.04}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.52,y:.04},{x:.15,y:.04}],color:"primary",fill:!1},"path43-7":{type:"path",points:[{x:.21,y:.18},{x:.14,y:.18}],color:"primary",fill:!1},"path43-7-9":{type:"path",points:[{x:.21,y:.13},{x:.21,y:.18}],color:"primary",fill:!1},"path43-7-2":{type:"path",points:[{x:.08,y:-.09},{x:.14,y:-.09}],color:"primary",fill:!1},"path43-7-9-3":{type:"path",points:[{x:.08,y:-.04},{x:.08,y:-.09}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.01,y:.27},bottom1:{type:"text",text:"{VAL}",x:0,y:-.27}},refblocks:{left1:{x:-.52,y:.04},right1:{x:.52,y:.04}},bounds:{minX:-.55,maxX:.55,minY:-.27,maxY:.27,width:1.09,height:.55,centerX:0,centerY:0},circles:{}},PB=cn(pDt).labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{VAL}","middle_top").changeTextAnchor("{REF}","middle_bottom").build(),tee=ro(PB,"down"),nee=tee.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),oee=tee.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");nee.anchor="middle_left",oee.anchor="middle_left",nee.y+=.3,nee.x=.3,oee.y-=.3,oee.x=.3;var fDt=tee,ree=ro(PB,"left"),iee=ree.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),see=ree.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");iee.anchor="middle_bottom",see.anchor="middle_top",iee.y+=.5,iee.x=0,see.y-=.55,see.x=0;var xDt=ree,aee=ro(PB,"up"),cee=aee.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),lee=aee.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");cee.anchor="middle_left",lee.anchor="middle_left",cee.y+=.3,cee.x=.3,lee.y-=.3,lee.x=.3;var gDt=aee,d8e={paths:{path11:{type:"path",points:[{x:-.52,y:.04},{x:-.18,y:.04}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.19,y:.05},{x:.52,y:.05}],color:"primary",fill:!1},"path12-6":{type:"path",points:[{x:.18,y:-.15},{x:.18,y:.25}],color:"primary",fill:!1},"path12-2":{type:"path",points:[{x:.19,y:0},{x:.35,y:-.14}],color:"primary",fill:!1},"path12-2-9":{type:"path",points:[{x:.35,y:-.14},{x:.34,y:-.35}],color:"primary",fill:!1},"path11-0-9":{type:"path",points:[{x:-.17,y:.27},{x:-.17,y:-.15},{x:.18,y:.05},{x:-.17,y:.27}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.22,y:.38},bottom1:{type:"text",text:"{VAL}",x:.11,y:-.38}},refblocks:{bottom1:{x:.34,y:-.35},left1:{x:-.52,y:.04},right1:{x:.52,y:.05}},bounds:{minX:-.55,maxX:.55,minY:-.38,maxY:.38,width:1.09,height:.77,centerX:0,centerY:0},circles:{}},{paths:Dio,texts:Aio,bounds:Rio,refblocks:kio,circles:Nio}=d8e,h8e=cn(d8e).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).labelPort("bottom1",["3"]).changeTextAnchor("{REF}","middle_bottom").build(),m8e=ro(h8e),yDt=m8e.primitives.filter(t=>t.type==="text"),p8e=yDt.find(t=>t.text==="{REF}");p8e.y=0,p8e.anchor="middle_left";var bDt=m8e,vB={paths:{path44:{type:"path",points:[{x:-.18,y:-.03},{x:-.45,y:-.03}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.45,y:-.03},{x:.18,y:-.02}],color:"primary",fill:!1},"path44-0-7":{type:"path",points:[{x:.07,y:-.02},{x:-.07,y:-.02}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.07,y:.1},{x:.07,y:-.15}],color:"primary",fill:!0},"path2-8":{type:"path",points:[{x:-.07,y:.1},{x:-.07,y:-.15}],color:"primary",fill:!0},"path8704-1":{type:"path",points:[{x:-.07,y:-.15},{x:-.07,y:-.15},{x:-.09,y:-.15},{x:-.1,y:-.14},{x:-.11,y:-.13},{x:-.13,y:-.12},{x:-.14,y:-.11},{x:-.14,y:-.1},{x:-.15,y:-.09},{x:-.16,y:-.08},{x:-.16,y:-.07},{x:-.16,y:-.06},{x:-.17,y:-.05},{x:-.17,y:-.04},{x:-.17,y:-.03},{x:-.17,y:-.02},{x:-.17,y:-.01},{x:-.16,y:0},{x:-.16,y:.01},{x:-.16,y:.02},{x:-.15,y:.03},{x:-.15,y:.04},{x:-.14,y:.05},{x:-.14,y:.05},{x:-.13,y:.06},{x:-.12,y:.07},{x:-.11,y:.08},{x:-.11,y:.08},{x:-.1,y:.09},{x:-.09,y:.09},{x:-.08,y:.1},{x:-.07,y:.1},{x:-.07,y:.1}],color:"primary",fill:!1},"path8704-1-7":{type:"path",points:[{x:.07,y:-.15},{x:.07,y:-.15},{x:.09,y:-.15},{x:.1,y:-.14},{x:.12,y:-.13},{x:.13,y:-.12},{x:.14,y:-.11},{x:.14,y:-.1},{x:.15,y:-.09},{x:.16,y:-.08},{x:.16,y:-.07},{x:.17,y:-.06},{x:.17,y:-.05},{x:.17,y:-.04},{x:.17,y:-.03},{x:.17,y:-.02},{x:.17,y:-.01},{x:.16,y:0},{x:.16,y:.01},{x:.16,y:.02},{x:.15,y:.03},{x:.15,y:.04},{x:.14,y:.05},{x:.14,y:.05},{x:.13,y:.06},{x:.12,y:.07},{x:.11,y:.08},{x:.11,y:.08},{x:.1,y:.09},{x:.09,y:.09},{x:.08,y:.1},{x:.07,y:.1},{x:.07,y:.1}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.02,y:.15}},refblocks:{left1:{x:-.45,y:-.03},right1:{x:.45,y:-.03}},bounds:{minX:-.47,maxX:.47,minY:-.15,maxY:.15,width:.95,height:.31,centerX:0,centerY:0},circles:{}},PDt=cn(vB).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").build(),vDt=cn(vB).rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_top").build(),SDt=cn(vB).rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),CDt=cn(vB).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_right").build(),SB={paths:{path44:{type:"path",points:[{x:-.18,y:-.03},{x:-.45,y:-.03}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.45,y:-.03},{x:.18,y:-.02}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.07,y:.1},{x:.07,y:-.15}],color:"primary",fill:!0},"path2-8":{type:"path",points:[{x:-.07,y:.1},{x:-.07,y:-.15}],color:"primary",fill:!0},"path8704-1":{type:"path",points:[{x:-.07,y:-.15},{x:-.07,y:-.15},{x:-.09,y:-.15},{x:-.1,y:-.14},{x:-.11,y:-.13},{x:-.13,y:-.12},{x:-.14,y:-.11},{x:-.14,y:-.1},{x:-.15,y:-.09},{x:-.16,y:-.08},{x:-.16,y:-.07},{x:-.16,y:-.06},{x:-.17,y:-.05},{x:-.17,y:-.04},{x:-.17,y:-.03},{x:-.17,y:-.02},{x:-.17,y:-.01},{x:-.16,y:0},{x:-.16,y:.01},{x:-.16,y:.02},{x:-.15,y:.03},{x:-.15,y:.04},{x:-.14,y:.05},{x:-.14,y:.05},{x:-.13,y:.06},{x:-.12,y:.07},{x:-.11,y:.08},{x:-.11,y:.08},{x:-.1,y:.09},{x:-.09,y:.09},{x:-.08,y:.1},{x:-.07,y:.1},{x:-.07,y:.1}],color:"primary",fill:!1},"path8704-1-7":{type:"path",points:[{x:.07,y:-.15},{x:.07,y:-.15},{x:.09,y:-.15},{x:.1,y:-.14},{x:.12,y:-.13},{x:.13,y:-.12},{x:.14,y:-.11},{x:.14,y:-.1},{x:.15,y:-.09},{x:.16,y:-.08},{x:.16,y:-.07},{x:.17,y:-.06},{x:.17,y:-.05},{x:.17,y:-.04},{x:.17,y:-.03},{x:.17,y:-.02},{x:.17,y:-.01},{x:.16,y:0},{x:.16,y:.01},{x:.16,y:.02},{x:.15,y:.03},{x:.15,y:.04},{x:.14,y:.05},{x:.14,y:.05},{x:.13,y:.06},{x:.12,y:.07},{x:.11,y:.08},{x:.11,y:.08},{x:.1,y:.09},{x:.09,y:.09},{x:.08,y:.1},{x:.07,y:.1},{x:.07,y:.1}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.02,y:.15}},refblocks:{left1:{x:-.45,y:-.03},right1:{x:.45,y:-.03}},bounds:{minX:-.47,maxX:.47,minY:-.15,maxY:.15,width:.95,height:.31,centerX:0,centerY:0},circles:{}},MDt=cn(SB).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").build(),TDt=cn(SB).rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_top").build(),wDt=cn(SB).rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),EDt=cn(SB).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_right").build(),CB={paths:{path44:{type:"path",points:[{x:-.22,y:.1},{x:-.45,y:.1}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.45,y:.1},{x:.22,y:.1}],color:"primary",fill:!1},"path44-5":{type:"path",points:[{x:0,y:-.03},{x:0,y:-.25}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.12,y:.23},{x:.12,y:-.02}],color:"primary",fill:!0},"path2-88":{type:"path",points:[{x:.04,y:.22},{x:.04,y:-.02}],color:"primary",fill:!0},"path2-88-5":{type:"path",points:[{x:-.05,y:.22},{x:-.05,y:-.02}],color:"primary",fill:!0},"path2-88-5-1":{type:"path",points:[{x:.04,y:.22},{x:-.05,y:.22}],color:"primary",fill:!0},"path2-88-5-1-6":{type:"path",points:[{x:.04,y:-.02},{x:-.05,y:-.02}],color:"primary",fill:!0},"path2-8":{type:"path",points:[{x:-.12,y:.23},{x:-.12,y:-.02}],color:"primary",fill:!0},"path8704-1":{type:"path",points:[{x:-.13,y:-.03},{x:-.13,y:-.03},{x:-.14,y:-.02},{x:-.16,y:-.01},{x:-.17,y:0},{x:-.18,y:.01},{x:-.19,y:.02},{x:-.2,y:.03},{x:-.2,y:.04},{x:-.21,y:.05},{x:-.21,y:.06},{x:-.22,y:.07},{x:-.22,y:.08},{x:-.22,y:.09},{x:-.22,y:.1},{x:-.22,y:.11},{x:-.22,y:.12},{x:-.22,y:.13},{x:-.21,y:.14},{x:-.21,y:.15},{x:-.21,y:.15},{x:-.2,y:.16},{x:-.19,y:.17},{x:-.19,y:.18},{x:-.18,y:.19},{x:-.17,y:.2},{x:-.17,y:.2},{x:-.16,y:.21},{x:-.15,y:.22},{x:-.14,y:.22},{x:-.13,y:.23},{x:-.13,y:.23},{x:-.13,y:.23}],color:"primary",fill:!1},"path8704-1-7":{type:"path",points:[{x:.12,y:-.03},{x:.12,y:-.03},{x:.14,y:-.02},{x:.15,y:-.01},{x:.17,y:0},{x:.18,y:.01},{x:.19,y:.02},{x:.2,y:.03},{x:.2,y:.04},{x:.21,y:.05},{x:.21,y:.06},{x:.22,y:.07},{x:.22,y:.08},{x:.22,y:.09},{x:.22,y:.1},{x:.22,y:.11},{x:.22,y:.12},{x:.22,y:.13},{x:.21,y:.14},{x:.21,y:.15},{x:.2,y:.15},{x:.2,y:.16},{x:.19,y:.17},{x:.19,y:.18},{x:.18,y:.19},{x:.17,y:.2},{x:.17,y:.2},{x:.16,y:.21},{x:.15,y:.21},{x:.14,y:.22},{x:.13,y:.23},{x:.12,y:.23},{x:.12,y:.23}],color:"primary",fill:!1},path1:{type:"path",points:[{x:-.05,y:.1},{x:-.12,y:.1}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.02,y:.28}},refblocks:{bottom1:{x:0,y:-.25},left1:{x:-.45,y:.1},right1:{x:.45,y:.1}},bounds:{minX:-.47,maxX:.47,minY:-.28,maxY:.28,width:.95,height:.56,centerX:0,centerY:0},circles:{}},DDt=cn(CB).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_left").build(),ADt=cn(CB).rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_top").build(),RDt=cn(CB).rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_bottom").build(),kDt=cn(CB).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_right").build(),MB={paths:{path44:{type:"path",points:[{x:-.22,y:.1},{x:-.45,y:.1}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.45,y:.1},{x:.22,y:.1}],color:"primary",fill:!1},"path44-0-7":{type:"path",points:[{x:.12,y:.1},{x:.04,y:.1}],color:"primary",fill:!1},"path44-5":{type:"path",points:[{x:0,y:-.03},{x:0,y:-.25}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.12,y:.23},{x:.12,y:-.02}],color:"primary",fill:!0},"path2-88":{type:"path",points:[{x:.04,y:.22},{x:.04,y:-.02}],color:"primary",fill:!0},"path2-88-5":{type:"path",points:[{x:-.05,y:.22},{x:-.05,y:-.02}],color:"primary",fill:!0},"path2-88-5-1":{type:"path",points:[{x:.04,y:.22},{x:-.05,y:.22}],color:"primary",fill:!0},"path2-88-5-1-6":{type:"path",points:[{x:.04,y:-.02},{x:-.05,y:-.02}],color:"primary",fill:!0},"path2-8":{type:"path",points:[{x:-.12,y:.23},{x:-.12,y:-.02}],color:"primary",fill:!0},"path8704-1":{type:"path",points:[{x:-.13,y:-.03},{x:-.13,y:-.03},{x:-.14,y:-.02},{x:-.16,y:-.01},{x:-.17,y:0},{x:-.18,y:.01},{x:-.19,y:.02},{x:-.2,y:.03},{x:-.2,y:.04},{x:-.21,y:.05},{x:-.21,y:.06},{x:-.22,y:.07},{x:-.22,y:.08},{x:-.22,y:.09},{x:-.22,y:.1},{x:-.22,y:.11},{x:-.22,y:.12},{x:-.22,y:.13},{x:-.21,y:.14},{x:-.21,y:.15},{x:-.21,y:.15},{x:-.2,y:.16},{x:-.19,y:.17},{x:-.19,y:.18},{x:-.18,y:.19},{x:-.17,y:.2},{x:-.17,y:.2},{x:-.16,y:.21},{x:-.15,y:.22},{x:-.14,y:.22},{x:-.13,y:.23},{x:-.13,y:.23},{x:-.13,y:.23}],color:"primary",fill:!1},"path8704-1-7":{type:"path",points:[{x:.12,y:-.03},{x:.12,y:-.03},{x:.14,y:-.02},{x:.15,y:-.01},{x:.17,y:0},{x:.18,y:.01},{x:.19,y:.02},{x:.2,y:.03},{x:.2,y:.04},{x:.21,y:.05},{x:.21,y:.06},{x:.22,y:.07},{x:.22,y:.08},{x:.22,y:.09},{x:.22,y:.1},{x:.22,y:.11},{x:.22,y:.12},{x:.22,y:.13},{x:.21,y:.14},{x:.21,y:.15},{x:.2,y:.15},{x:.2,y:.16},{x:.19,y:.17},{x:.19,y:.18},{x:.18,y:.19},{x:.17,y:.2},{x:.17,y:.2},{x:.16,y:.21},{x:.15,y:.21},{x:.14,y:.22},{x:.13,y:.23},{x:.12,y:.23},{x:.12,y:.23}],color:"primary",fill:!1},path1:{type:"path",points:[{x:-.05,y:.1},{x:-.12,y:.1}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.02,y:.28}},refblocks:{bottom1:{x:0,y:-.25},left1:{x:-.45,y:.1},right1:{x:.45,y:.1}},bounds:{minX:-.47,maxX:.47,minY:-.28,maxY:.28,width:.95,height:.56,centerX:0,centerY:0},circles:{}},NDt=cn(MB).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_left").build(),HDt=cn(MB).rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_top").build(),IDt=cn(MB).rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_bottom").build(),LDt=cn(MB).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_right").build(),TB={paths:{path44:{type:"path",points:[{x:-.22,y:.1},{x:-.45,y:.1}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.45,y:.1},{x:.22,y:.1}],color:"primary",fill:!1},"path44-0-7":{type:"path",points:[{x:.12,y:.1},{x:.04,y:.1}],color:"primary",fill:!1},"path44-5":{type:"path",points:[{x:0,y:-.03},{x:0,y:-.25}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.12,y:.23},{x:.12,y:-.02}],color:"primary",fill:!0},"path2-88":{type:"path",points:[{x:.04,y:.22},{x:.04,y:-.02}],color:"primary",fill:!0},"path2-88-5":{type:"path",points:[{x:-.05,y:.22},{x:-.05,y:-.02}],color:"primary",fill:!0},"path2-88-5-1":{type:"path",points:[{x:.04,y:.22},{x:-.05,y:.22}],color:"primary",fill:!0},"path2-88-5-1-6":{type:"path",points:[{x:.04,y:-.02},{x:-.05,y:-.02}],color:"primary",fill:!0},"path2-8":{type:"path",points:[{x:-.12,y:.23},{x:-.12,y:-.02}],color:"primary",fill:!0},"path8704-1":{type:"path",points:[{x:-.13,y:-.03},{x:-.13,y:-.03},{x:-.14,y:-.02},{x:-.16,y:-.01},{x:-.17,y:0},{x:-.18,y:.01},{x:-.19,y:.02},{x:-.2,y:.03},{x:-.2,y:.04},{x:-.21,y:.05},{x:-.21,y:.06},{x:-.22,y:.07},{x:-.22,y:.08},{x:-.22,y:.09},{x:-.22,y:.1},{x:-.22,y:.11},{x:-.22,y:.12},{x:-.22,y:.13},{x:-.21,y:.14},{x:-.21,y:.15},{x:-.21,y:.15},{x:-.2,y:.16},{x:-.19,y:.17},{x:-.19,y:.18},{x:-.18,y:.19},{x:-.17,y:.2},{x:-.17,y:.2},{x:-.16,y:.21},{x:-.15,y:.22},{x:-.14,y:.22},{x:-.13,y:.23},{x:-.13,y:.23},{x:-.13,y:.23}],color:"primary",fill:!1},"path8704-1-7":{type:"path",points:[{x:.12,y:-.03},{x:.12,y:-.03},{x:.14,y:-.02},{x:.15,y:-.01},{x:.17,y:0},{x:.18,y:.01},{x:.19,y:.02},{x:.2,y:.03},{x:.2,y:.04},{x:.21,y:.05},{x:.21,y:.06},{x:.22,y:.07},{x:.22,y:.08},{x:.22,y:.09},{x:.22,y:.1},{x:.22,y:.11},{x:.22,y:.12},{x:.22,y:.13},{x:.21,y:.14},{x:.21,y:.15},{x:.2,y:.15},{x:.2,y:.16},{x:.19,y:.17},{x:.19,y:.18},{x:.18,y:.19},{x:.17,y:.2},{x:.17,y:.2},{x:.16,y:.21},{x:.15,y:.21},{x:.14,y:.22},{x:.13,y:.23},{x:.12,y:.23},{x:.12,y:.23}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.02,y:.28}},refblocks:{bottom1:{x:0,y:-.25},left1:{x:-.45,y:.1},right1:{x:.45,y:.1}},bounds:{minX:-.47,maxX:.47,minY:-.28,maxY:.28,width:.95,height:.56,centerX:0,centerY:0},circles:{}},ODt=cn(TB).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_left").build(),FDt=cn(TB).rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_top").build(),BDt=cn(TB).rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_bottom").build(),zDt=cn(TB).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_right").build(),wB={paths:{path44:{type:"path",points:[{x:-.22,y:.1},{x:-.45,y:.1}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.45,y:.1},{x:.22,y:.1}],color:"primary",fill:!1},"path44-5":{type:"path",points:[{x:0,y:-.03},{x:0,y:-.25}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.12,y:.23},{x:.12,y:-.02}],color:"primary",fill:!0},"path2-88":{type:"path",points:[{x:.04,y:.22},{x:.04,y:-.02}],color:"primary",fill:!0},"path2-88-5":{type:"path",points:[{x:-.05,y:.22},{x:-.05,y:-.02}],color:"primary",fill:!0},"path2-88-5-1":{type:"path",points:[{x:.04,y:.22},{x:-.05,y:.22}],color:"primary",fill:!0},"path2-88-5-1-6":{type:"path",points:[{x:.04,y:-.02},{x:-.05,y:-.02}],color:"primary",fill:!0},"path2-8":{type:"path",points:[{x:-.12,y:.23},{x:-.12,y:-.02}],color:"primary",fill:!0},"path8704-1":{type:"path",points:[{x:-.13,y:-.03},{x:-.13,y:-.03},{x:-.14,y:-.02},{x:-.16,y:-.01},{x:-.17,y:0},{x:-.18,y:.01},{x:-.19,y:.02},{x:-.2,y:.03},{x:-.2,y:.04},{x:-.21,y:.05},{x:-.21,y:.06},{x:-.22,y:.07},{x:-.22,y:.08},{x:-.22,y:.09},{x:-.22,y:.1},{x:-.22,y:.11},{x:-.22,y:.12},{x:-.22,y:.13},{x:-.21,y:.14},{x:-.21,y:.15},{x:-.21,y:.15},{x:-.2,y:.16},{x:-.19,y:.17},{x:-.19,y:.18},{x:-.18,y:.19},{x:-.17,y:.2},{x:-.17,y:.2},{x:-.16,y:.21},{x:-.15,y:.22},{x:-.14,y:.22},{x:-.13,y:.23},{x:-.13,y:.23},{x:-.13,y:.23}],color:"primary",fill:!1},"path8704-1-7":{type:"path",points:[{x:.12,y:-.03},{x:.12,y:-.03},{x:.14,y:-.02},{x:.15,y:-.01},{x:.17,y:0},{x:.18,y:.01},{x:.19,y:.02},{x:.2,y:.03},{x:.2,y:.04},{x:.21,y:.05},{x:.21,y:.06},{x:.22,y:.07},{x:.22,y:.08},{x:.22,y:.09},{x:.22,y:.1},{x:.22,y:.11},{x:.22,y:.12},{x:.22,y:.13},{x:.21,y:.14},{x:.21,y:.15},{x:.2,y:.15},{x:.2,y:.16},{x:.19,y:.17},{x:.19,y:.18},{x:.18,y:.19},{x:.17,y:.2},{x:.17,y:.2},{x:.16,y:.21},{x:.15,y:.21},{x:.14,y:.22},{x:.13,y:.23},{x:.12,y:.23},{x:.12,y:.23}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.02,y:.28}},refblocks:{bottom1:{x:0,y:-.25},left1:{x:-.45,y:.1},right1:{x:.45,y:.1}},bounds:{minX:-.47,maxX:.47,minY:-.28,maxY:.28,width:.95,height:.56,centerX:0,centerY:0},circles:{}},VDt=cn(wB).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_left").build(),$Dt=cn(wB).rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_top").build(),WDt=cn(wB).rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_bottom").build(),UDt=cn(wB).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_right").build(),XDt={paths:{path1:{type:"path",points:[{x:-.37,y:.03},{x:-.13,y:.03}],color:"primary",fill:!1},"path-1-3":{type:"path",points:[{x:-.07,y:.03},{x:.11,y:-.03}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.1,y:-.06},{x:.37,y:-.06}],color:"primary",fill:!1},path3:{type:"path",points:[{x:.12,y:.17},{x:.37,y:.17}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.37},bottom1:{type:"text",text:"{VAL}",x:0,y:-.37}},refblocks:{left1:{x:-.37,y:.03},right1:{x:.37,y:-.06},right2:{x:.37,y:.17}},bounds:{minX:-.4,maxX:.4,minY:-.4,maxY:.4,width:.79,height:.79,centerX:0,centerY:0},circles:{"circle-3":{type:"circle",x:.08,y:-.07,radius:.02,color:"primary",fill:!1},"circle-1":{type:"circle",x:-.1,y:.03,radius:.02,color:"primary",fill:!1},"circle-2":{type:"circle",x:.08,y:.17,radius:.02,color:"primary",fill:!1}}},EB=cn(XDt).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right2",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_bottom").build(),uee=ro(EB,"down"),_ee=uee.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),dee=uee.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");_ee.anchor="middle_bottom",dee.anchor="middle_top",_ee.x=.44,_ee.y+=.28,dee.y-=.28,dee.x=.44;var jDt=uee,hee=ro(EB,"left"),mee=hee.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),pee=hee.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");mee.anchor="middle_bottom",pee.anchor="middle_top",mee.x=0,mee.y+=.625,pee.y-=.695,pee.x=0;var GDt=hee,fee=ro(EB,"up"),xee=fee.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),gee=fee.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");xee.anchor="middle_bottom",gee.anchor="middle_top",xee.x=.4,xee.y+=.28,gee.y-=.28,gee.x=.4;var YDt=fee,qDt={paths:{path1:{type:"path",points:[{x:-.37,y:.03},{x:-.13,y:.03}],color:"primary",fill:!1},"path-1-3":{type:"path",points:[{x:-.07,y:.03},{x:.11,y:.14}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.1,y:-.06},{x:.37,y:-.06}],color:"primary",fill:!1},path3:{type:"path",points:[{x:.12,y:.17},{x:.37,y:.17}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.4},bottom1:{type:"text",text:"{VAL}",x:0,y:-.4}},refblocks:{left1:{x:-.37,y:.03},right1:{x:.37,y:-.06},right3:{x:.37,y:.17}},bounds:{minX:-.4,maxX:.4,minY:-.4,maxY:.4,width:.79,height:.79,centerX:0,centerY:0},circles:{"circle-3":{type:"circle",x:.08,y:-.07,radius:.02,color:"primary",fill:!1},"circle-1":{type:"circle",x:-.1,y:.03,radius:.02,color:"primary",fill:!1},"circle-2":{type:"circle",x:.08,y:.17,radius:.02,color:"primary",fill:!1}}},DB=cn(qDt).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right3",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_bottom").build(),yee=ro(DB,"down"),bee=yee.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),Pee=yee.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");bee.anchor="middle_bottom",Pee.anchor="middle_top",bee.x=.44,bee.y+=.28,Pee.y-=.28,Pee.x=.44;var JDt=yee,vee=ro(DB,"left"),See=vee.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),Cee=vee.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");See.anchor="middle_bottom",Cee.anchor="middle_top",See.x=0,See.y+=.625,Cee.y-=.695,Cee.x=0;var KDt=vee,Mee=ro(DB,"up"),Tee=Mee.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),wee=Mee.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");Tee.anchor="middle_bottom",wee.anchor="middle_top",Tee.x=.4,Tee.y+=.28,wee.y-=.28,wee.x=.4;var QDt=Mee,AB={paths:{path11:{type:"path",points:[{x:-.38,y:0},{x:-.12,y:-.01}],color:"primary",fill:!1},"path11-0":{type:"path",points:[{x:-.07,y:0},{x:.11,y:.05}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.12,y:-.01},{x:.38,y:0}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.31},bottom1:{type:"text",text:"{VAL}",x:0,y:-.28}},refblocks:{left1:{x:-.12,y:-.01},left2:{x:-.38,y:0},right1:{x:.12,y:-.01},right2:{x:.38,y:0}},bounds:{minX:-.4,maxX:.4,minY:-.25,maxY:.25,width:.81,height:.5,centerX:0,centerY:0},circles:{"circle-2":{type:"circle",x:.1,y:0,radius:.02,color:"primary",fill:!1},"circle-1":{type:"circle",x:-.1,y:0,radius:.02,color:"primary",fill:!1}}};delete AB.refblocks.left1,delete AB.refblocks.right1,AB.bounds.width+=.2;var RB=cn(AB).changeTextAnchor("{VAL}","middle_top").labelPort("left2",["1"]).labelPort("right2",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),Eee=ro(RB,"down"),Dee=Eee.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),Aee=Eee.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");Dee.anchor="middle_bottom",Aee.anchor="middle_top",Dee.x=.3,Dee.y+=.265,Aee.y-=.265,Aee.x=.3;var ZDt=Eee,Ree=ro(RB,"left"),kee=Ree.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),Nee=Ree.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");kee.anchor="middle_bottom",Nee.anchor="middle_top",kee.x=0,kee.y+=.57,Nee.y-=.57,Nee.x=0;var eAt=Ree,Hee=ro(RB,"up"),Iee=Hee.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),Lee=Hee.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");Iee.anchor="middle_bottom",Lee.anchor="middle_top",Iee.x=.3,Iee.y+=.265,Lee.y-=.265,Lee.x=.3;var tAt=Hee,kB={paths:{path11:{type:"path",points:[{x:-.38,y:0},{x:-.12,y:-.01}],color:"primary",fill:!1},"path11-0":{type:"path",points:[{x:-.07,y:.01},{x:.1,y:.14}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.12,y:-.01},{x:.38,y:0}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.25},bottom1:{type:"text",text:"{VAL}",x:0,y:-.25}},refblocks:{left1:{x:-.12,y:-.01},left2:{x:-.38,y:0},right1:{x:.12,y:-.01},right2:{x:.38,y:0}},bounds:{minX:-.4,maxX:.4,minY:-.25,maxY:.25,width:.81,height:.5,centerX:0,centerY:0},circles:{"circle-2":{type:"circle",x:.1,y:0,radius:.02,color:"primary",fill:!1},"circle-1":{type:"circle",x:-.1,y:0,radius:.02,color:"primary",fill:!1}}};delete kB.refblocks.left1,delete kB.refblocks.right1,kB.bounds.width+=.2;var NB=cn(kB).changeTextAnchor("{VAL}","middle_top").labelPort("left2",["1"]).labelPort("right2",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),Oee=ro(NB,"down"),Fee=Oee.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),Bee=Oee.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");Fee.anchor="middle_bottom",Bee.anchor="middle_top",Fee.x=.3,Fee.y+=.265,Bee.y-=.265,Bee.x=.3;var nAt=Oee,zee=ro(NB,"left"),Vee=zee.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),$ee=zee.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");Vee.anchor="middle_bottom",$ee.anchor="middle_top",Vee.x=0,Vee.y+=.57,$ee.y-=.57,$ee.x=0;var oAt=zee,Wee=ro(NB,"up"),Uee=Wee.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),Xee=Wee.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");Uee.anchor="middle_bottom",Xee.anchor="middle_top",Uee.x=.3,Uee.y+=.265,Xee.y-=.265,Xee.x=.3;var rAt=Wee,HB={paths:{path44:{type:"path",points:[{x:-.16845120000000047,y:.02621170000000017},{x:-.4458008,y:.02709619999999968}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.4458008,y:.026971799999999657},{x:.1677968999999997,y:.027926399999999685}],color:"primary",fill:!1},"path8704-1":{type:"path",points:[{x:-.0040837000000002455,y:-.13467459999999964},{x:-.0040837000000002455,y:-.13467459999999964},{x:-.017668143940740948,y:-.1311205263185182},{x:-.03043520885925943,y:-.12727072121481456},{x:-.04240966440000013,y:-.1231399985999998},{x:-.05361628020740751,y:-.11874317238518502},{x:-.064079825925926,y:-.11409505648148131},{x:-.07382507120000005,y:-.10921046479999987},{x:-.0828767856740741,y:-.10410421125185171},{x:-.0912597389925926,y:-.09879110974814802},{x:-.09899870079999995,y:-.0932859741999998},{x:-.10611844074074069,y:-.08760361851851838},{x:-.11264372845925916,y:-.0817588566148146},{x:-.11859933359999993,y:-.07576650239999982},{x:-.12401002580740728,y:-.06964136978518495},{x:-.12890057472592584,y:-.06339827268148127},{x:-.13329574999999985,y:-.05705202499999972},{x:-.13722032127407394,y:-.05061744065185156},{x:-.14069905819259243,y:-.04410933354814783},{x:-.14375673039999987,y:-.03754251759999966},{x:-.14641810754074058,y:-.030931806718518143},{x:-.1487079592592591,y:-.0242920148148144},{x:-.15065105519999983,y:-.017637955799999563},{x:-.15227216500740723,y:-.01098444358518472},{x:-.15359605832592574,y:-.004346292081480994},{x:-.1546475047999998,y:.00226168480000051},{x:-.15545127407407386,y:.008824673148148676},{x:-.1560321357925924,y:.015327859051852397},{x:-.1564148595999998,y:.02175642860000056},{x:-.1566242151407405,y:.028095567881482052},{x:-.15668497205925902,y:.03433046298518576},{x:-.15662189999999976,y:.04044630000000058},{x:-.15662189999999976,y:.0404463000000006},{x:-.15662189999999976,y:.0404463000000006},{x:-.15622857394444417,y:.04717166472222282},{x:-.1553217675555553,y:.05388046444444503},{x:-.15392183849999977,y:.060558907500000585},{x:-.1520491444444442,y:.0671932022222228},{x:-.1497240430555553,y:.07376955694444502},{x:-.14696689199999974,y:.08027418000000058},{x:-.14379804894444415,y:.0866932797222228},{x:-.1402378715555553,y:.09301306444444506},{x:-.13630671749999965,y:.09921974250000057},{x:-.13202494444444415,y:.10529952222222282},{x:-.12741291005555522,y:.11123861194444501},{x:-.1224909719999997,y:.1170232200000006},{x:-.11727948794444407,y:.12263955472222278},{x:-.11179881555555524,y:.12807382444444504},{x:-.10606931249999965,y:.13331223750000057},{x:-.1001113364444441,y:.13834100222222284},{x:-.09394524505555521,y:.14314632694444504},{x:-.08759139599999967,y:.14771442000000062},{x:-.08107014694444413,y:.15203148972222283},{x:-.07440185555555523,y:.15608374444444503},{x:-.0676068794999997,y:.15985739250000058},{x:-.06070557644444415,y:.16333864222222283},{x:-.05371830405555529,y:.16651370194444504},{x:-.04666541999999976,y:.1693687800000006},{x:-.03956728194444424,y:.1718900847222228},{x:-.03244424755555539,y:.17406382444444501},{x:-.025316674499999876,y:.17587620750000055},{x:-.01820492044444437,y:.17731344222222278},{x:-.01112934305555553,y:.178361736944445},{x:-.004110300000000034,y:.17900730000000054},{x:-.004110300000000011,y:.17900730000000054}],color:"primary",fill:!1},"path8704-1-9":{type:"path",points:[{x:.004158700000000071,y:-.1355885000000001},{x:.004158700000000071,y:-.1355885000000001},{x:.017743143940740766,y:-.1320344263185187},{x:.03051020885925925,y:-.12818462121481505},{x:.042484664399999955,y:-.12405389860000024},{x:.053691280207407335,y:-.11965707238518546},{x:.0641548259259258,y:-.11500895648148178},{x:.07390007119999986,y:-.1101243648000003},{x:.0829517856740739,y:-.10501811125185218},{x:.0913347389925924,y:-.09970500974814848},{x:.09907370079999973,y:-.09419987420000027},{x:.10619344074074046,y:-.08851751851851883},{x:.11271872845925893,y:-.08267275661481507},{x:.11867433359999968,y:-.07668040240000029},{x:.12408502580740703,y:-.0705552697851854},{x:.12897557472592555,y:-.06431217268148172},{x:.13337074999999957,y:-.05796592500000018},{x:.13729532127407365,y:-.05153134065185202},{x:.14077405819259214,y:-.045023233548148286},{x:.14383173039999952,y:-.038456417600000126},{x:.14649310754074024,y:-.03184570671851861},{x:.14878295925925875,y:-.02520591481481487},{x:.1507260551999995,y:-.01855185580000003},{x:.15234716500740686,y:-.011898343585185192},{x:.15367105832592537,y:-.005260192081481464},{x:.15472250479999944,y:.001347784800000043},{x:.1555262740740735,y:.007910773148148207},{x:.156107135792592,y:.01441395905185193},{x:.1564898595999994,y:.020842528600000094},{x:.15669921514074014,y:.02718166788148159},{x:.15675997205925862,y:.03341656298518529},{x:.15669689999999936,y:.03953240000000011},{x:.15669689999999936,y:.039532400000000134},{x:.15669689999999936,y:.039532400000000134},{x:.1563035739444438,y:.04625776472222235},{x:.15539676755555493,y:.05296656444444457},{x:.15399683849999934,y:.05964500750000013},{x:.1521241444444438,y:.06627930222222234},{x:.14979904305555491,y:.07285565694444456},{x:.14704189199999937,y:.07936028000000013},{x:.1438730489444438,y:.08577937972222234},{x:.1403128715555549,y:.09209916444444458},{x:.13638171749999925,y:.0983058425000001},{x:.13209994444444376,y:.10438562222222235},{x:.12748791005555482,y:.11032471194444453},{x:.12256597199999929,y:.11610932000000013},{x:.1173544879444437,y:.1217256547222223},{x:.11187381555555485,y:.12715992444444457},{x:.10614431249999925,y:.1323983375000001},{x:.10018633644444369,y:.13742710222222235},{x:.09402024505555481,y:.14223242694444457},{x:.08766639599999927,y:.14680052000000016},{x:.08114514694444372,y:.15111758972222236},{x:.07447685555555483,y:.15516984444444457},{x:.06768187949999929,y:.15894349250000012},{x:.06078057644444377,y:.16242474222222236},{x:.053793304055554894,y:.16559980194444457},{x:.046740419999999366,y:.16845488000000014},{x:.039642281944443844,y:.17097618472222234},{x:.03251924755555499,y:.17314992444444455},{x:.02539167449999948,y:.17496230750000008},{x:.018279920444443973,y:.17639954222222232},{x:.011204343055555134,y:.17744783694444452},{x:.004185299999999637,y:.17809340000000007},{x:.004185299999999614,y:.17809340000000007}],color:"primary",fill:!1},path4:{type:"path",points:[{x:-.08039130000000005,y:.0179576999999993},{x:-.08039130000000005,y:.09650599999999931}],color:"primary",fill:!0},"path4-5":{type:"path",points:[{x:.01494479999999987,y:-.055216500000000224},{x:.01494479999999987,y:.09691909999999937}],color:"primary",fill:!0},"path4-5-8":{type:"path",points:[{x:.06871169999999927,y:-.056870000000000864},{x:.06871169999999927,y:.018784499999999538}],color:"primary",fill:!0},"path4-1":{type:"path",points:[{x:-.08179359999999969,y:.09650570000000003},{x:.015771699999999722,y:.09650570000000003}],color:"primary",fill:!0},"path4-1-6":{type:"path",points:[{x:.0117995999999998,y:-.05594970000000088},{x:.06843709999999925,y:-.05594970000000088}],color:"primary",fill:!0},"rect1577-4":{type:"path",points:[{x:-.17162450000000073,y:.11125030000000025},{x:-.2688274000000015,y:.11125030000000025},{x:-.2688274000000015,y:.11469129999999961},{x:-.17162450000000073,y:.11469129999999961}],color:"primary",fill:!0},"rect1577-4-7":{type:"path",points:[{x:-.2184661999999995,y:.16159429999999997},{x:-.2184661999999995,y:.06439139999999943},{x:-.22190719999999908,y:.06439139999999943},{x:-.22190719999999908,y:.16159429999999997}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.0024445000000006267,y:.23933980000000044},bottom1:{type:"text",text:"{VAL}",x:.00341719999999901,y:-.23933980000000066}},refblocks:{left1:{x:-.4458008,y:.02709619999999968},right1:{x:.4458008,y:.026971799999999657}},bounds:{minX:-.473959241,maxX:.473959241,minY:-.23933980000000066,maxY:.23933980000000044,width:.947918482,height:.4786796000000011,centerX:0,centerY:-11102230246251565e-32},circles:{}},iAt=cn(HB).rotateRightFacingSymbol("down").labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{REF}","middle_left",{x:.02,y:.2}).changeTextAnchor("{VAL}","middle_left",{x:.5,y:-.2}).build(),sAt=cn(HB).rotateRightFacingSymbol("left").labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{REF}","middle_bottom",{x:0,y:.45}).changeTextAnchor("{VAL}","middle_top",{x:0,y:-.55}).build(),aAt=cn(HB).rotateRightFacingSymbol("right").labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),cAt=cn(HB).rotateRightFacingSymbol("up").labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{VAL}","middle_left",{x:.02,y:-.2}).changeTextAnchor("{REF}","middle_left",{x:.5,y:.2}).build(),f8e={paths:{path40:{type:"path",points:[{x:.14,y:.04},{x:-.12,y:-.09}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.12,y:.18},{x:.14,y:.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.12,y:-.09},{x:-.12,y:.18}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.14,y:.18},{x:.14,y:-.09}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.12,y:.04},{x:-.52,y:.04}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.52,y:.04},{x:.15,y:.04}],color:"primary",fill:!1},"path43-5":{type:"path",points:[{x:.19,y:-.09},{x:.15,y:-.09}],color:"primary",fill:!1},"path43-5-2":{type:"path",points:[{x:.19,y:-.14},{x:.19,y:-.09}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.01,y:.27},bottom1:{type:"text",text:"{VAL}",x:0,y:-.27}},refblocks:{left1:{x:-.52,y:.04},right1:{x:.52,y:.04}},bounds:{minX:-.55,maxX:.55,minY:-.27,maxY:.27,width:1.09,height:.55,centerX:0,centerY:0},circles:{}},{paths:Hio,texts:Iio,bounds:Lio,refblocks:Oio,circles:Fio}=f8e,x8e=cn(f8e).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),lAt=ro(x8e),uAt={paths:{path11:{type:"path",points:[{x:-.54,y:0},{x:-.3,y:0}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.29,y:0},{x:.54,y:0}],color:"primary",fill:!1}},texts:{left1:{type:"text",text:"RPM",x:0,y:-.02}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:0}},bounds:{width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:"circle",x:-.01,y:-.01,radius:.29,color:"primary",fill:!1}}},{paths:_At,texts:dAt,bounds:IB,refblocks:g8e,circles:hAt}=uAt,jee=za({primitives:[...Object.values(_At),...Object.values(hAt),{type:"text",text:"{REF}",x:0,y:-.3594553499999995,anchor:"middle_top"},{type:"text",text:"{VAL}",x:0,y:.35,anchor:"middle_bottom"},{...dAt.left1,y:.01,anchor:"center",fontSize:.2}],ports:[{...g8e.left1,labels:["1"]},{...g8e.right1,labels:["2"]}],size:{width:IB.width,height:IB.height},center:{x:IB.centerX,y:IB.centerY}}),{5:mAt,...pAt}=jee.primitives;function fAt(t){return typeof t=="object"}var y8e=ro({...jee,primitives:Object.values(pAt).filter(fAt)}),xAt={...y8e,primitives:[...y8e.primitives,mAt]},LB=za({primitives:[{type:"path",points:[{x:-.2,y:0},{x:0,y:0}],color:"primary",fill:!1},{type:"path",points:Array.from({length:8},(t,e)=>{let n=Math.PI/2-e*Math.PI/7,o=.1;return{x:.1-o*Math.cos(n),y:o*Math.sin(n)}}),color:"primary",fill:!1},{type:"text",text:"{REF}",x:.125,y:0,anchor:"middle_left"}],ports:[{x:-.2,y:0,labels:["1"]}],center:{x:0,y:0}}),b8e=ro(LB,"down"),P8e=b8e.primitives.find(t=>t.type==="text"&&t.text==="{REF}");P8e&&(P8e.anchor="middle_top");var gAt=b8e,yAt=ro(LB,"left"),v8e=ro(LB,"up"),S8e=v8e.primitives.find(t=>t.type==="text"&&t.text==="{REF}");S8e&&(S8e.anchor="middle_bottom");var bAt=v8e,PAt={paths:{path40:{type:"path",points:[{x:.44,y:.04},{x:.19,y:-.09}],color:"primary",fill:!1},path41:{type:"path",points:[{x:.19,y:.18},{x:.44,y:.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:.19,y:-.09},{x:.19,y:.18}],color:"primary",fill:!1},path44:{type:"path",points:[{x:.19,y:.04},{x:-.11,y:.04}],color:"primary",fill:!1},path45:{type:"path",points:[{x:-.43,y:.22},{x:-.11,y:.04}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.01,y:.27},bottom1:{type:"text",text:"{VAL}",x:0,y:-.27}},refblocks:{right1:{x:-.43,y:.22}},bounds:{minX:-.55,maxX:.55,minY:-.27,maxY:.27,width:1.09,height:.55,centerX:0,centerY:0},circles:{}},Gee=cn(PAt).labelPort("right1",["1"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),Yee=ro(Gee,"up"),qee=Yee.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),Jee=Yee.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");qee.anchor="middle_bottom",Jee.anchor="middle_top",qee.x=.4,qee.y+=.2,Jee.y-=.3,Jee.x=.4;var C8e=Yee,Kee=yO(C8e),Qee=Kee.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),Zee=Kee.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");Qee.anchor="middle_bottom",Zee.anchor="middle_top",Qee.x=.35,Qee.y+=.4,Zee.y-=.4,Zee.x=.35;var vAt=Kee,ete=ro(Gee,"left"),tte=ete.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),nte=ete.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");tte.anchor="middle_bottom",nte.anchor="middle_top",tte.x=0,tte.y+=.5,nte.y-=.6,nte.x=0;var SAt=ete,M8e={paths:{path11:{type:"path",points:[{x:-.54,y:.04},{x:-.11,y:.04}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.1,y:.04},{x:.54,y:.04}],color:"primary",fill:!1},"path11-0":{type:"path",points:[{x:-.09,y:-.15},{x:-.09,y:.26}],color:"primary",fill:!1},"path11-0-3":{type:"path",points:[{x:.09,y:-.15},{x:.09,y:.26}],color:"primary",fill:!1},"path11-0-9":{type:"path",points:[{x:-.08,y:.06},{x:-.08,y:-.15},{x:.09,y:-.05},{x:-.08,y:.06}],color:"primary",fill:!0},"path11-0-9-0":{type:"path",points:[{x:.08,y:.26},{x:.08,y:.05},{x:-.09,y:.15},{x:.07,y:.26}],color:"primary",fill:!0},"path12-2":{type:"path",points:[{x:.09,y:-.06},{x:.27,y:-.17}],color:"primary",fill:!1},"path12-2-9":{type:"path",points:[{x:.27,y:-.18},{x:.27,y:-.31}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:.01,y:.42},bottom1:{type:"text",text:"{VAL}",x:-.03,y:-.42}},refblocks:{bottom1:{x:.27,y:-.31},left1:{x:-.54,y:.04},right1:{x:.54,y:.04}},bounds:{minX:-.57,maxX:.57,minY:-.42,maxY:.42,width:1.14,height:.83,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:.05,radius:.29,color:"primary",fill:!1}}},{paths:Bio,texts:zio,bounds:Vio,refblocks:$io,circles:Wio}=M8e,T8e=cn(M8e).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).labelPort("bottom1",["3"]).changeTextAnchor("{REF}","middle_bottom").build(),w8e=ro(T8e),E8e=w8e.primitives.filter(t=>t.type==="text"),CAt=E8e.find(t=>t.text==="{REF}"),MAt=E8e.find(t=>t.text==="{VAL}");CAt.y=0,MAt.y=0;var TAt=w8e,wAt={paths:{path40:{type:"path",points:[{x:.14,y:.04},{x:-.12,y:-.09}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.12,y:.18},{x:.14,y:.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.12,y:-.09},{x:-.12,y:.18}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.14,y:.18},{x:.14,y:-.09}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.12,y:.04},{x:-.52,y:.04}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.52,y:.04},{x:.15,y:.04}],color:"primary",fill:!1},"path43-8":{type:"path",points:[{x:.14,y:.18},{x:.08,y:.18}],color:"primary",fill:!1},"path43-8-8":{type:"path",points:[{x:.14,y:-.09},{x:.08,y:-.09}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.01,y:.27},bottom1:{type:"text",text:"{VAL}",x:0,y:-.27}},refblocks:{left1:{x:-.52,y:.04},right1:{x:.52,y:.04}},bounds:{width:1.09,height:.55,centerX:0,centerY:0},circles:{}},{paths:EAt,texts:D8e,bounds:OB,refblocks:A8e,circles:DAt}=wAt,R8e=za({primitives:[...Object.values(EAt),...Object.values(DAt),{...D8e.top1,anchor:"middle_bottom"},{...D8e.bottom1,anchor:"middle_top"}],ports:[{...A8e.left1,labels:["1"]},{...A8e.right1,labels:["2"]}],size:{width:OB.width,height:OB.height},center:{x:OB.centerX,y:OB.centerY}}),ote=ro(R8e),AAt=ote.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),RAt=ote.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");AAt.anchor="middle_left",RAt.anchor="middle_right";var kAt=ote,NAt={paths:{path11:{type:"path",points:[{x:-.34,y:.22},{x:-.02,y:.01}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.23,y:.13},{x:.23,y:.4}],color:"primary",fill:!1},"path12-2":{type:"path",points:[{x:.23,y:-.08},{x:.23,y:-.35}],color:"primary",fill:!1},"path11-0":{type:"path",points:[{x:-.01,y:-.18},{x:-.01,y:.23}],color:"primary",fill:!1},"path11-0-3":{type:"path",points:[{x:.23,y:.12},{x:-.01,y:.12}],color:"primary",fill:!1},"path11-0-9":{type:"path",points:[{x:-.11,y:.13},{x:-.17,y:.04},{x:-.06,y:.03},{x:-.11,y:.13}],color:"primary",fill:!0},"path11-0-3-8":{type:"path",points:[{x:.23,y:-.08},{x:-.01,y:-.08}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.2,y:.39},bottom1:{type:"text",text:"{VAL}",x:-.03,y:-.42}},refblocks:{top1:{x:.23,y:.4},bottom1:{x:.23,y:-.35},left1:{x:-.34,y:.22}},bounds:{width:.74,height:.85,centerX:0,centerY:0},circles:{path1:{type:"circle",x:.08,y:.01,radius:.29,color:"primary",fill:!1}}},{paths:HAt,texts:k8e,bounds:FB,refblocks:rte,circles:IAt}=NAt,N8e=za({primitives:[...Object.values(HAt),...Object.values(IAt),{...k8e.top1,anchor:"middle_left"},{...k8e.bottom1,anchor:"middle_right"}],ports:[{...rte.top1,labels:["1"]},{...rte.bottom1,labels:["2"]},{...rte.left1,labels:["3"]}],size:{width:FB.width,height:FB.height},center:{x:FB.centerX,y:FB.centerY}}),H8e=ro(N8e),I8e=H8e.primitives.filter(t=>t.type==="text"),LAt=I8e.find(t=>t.text==="{REF}");LAt.y=.1;var L8e=I8e.find(t=>t.text==="{VAL}");L8e.y=.1,L8e.x=-.4;var OAt=H8e,FAt={paths:{capsule_outer:{type:"path",points:[{x:-.44,y:.34},{x:-.45,y:.39},{x:-.46,y:.42},{x:-.49,y:.44},{x:-.52,y:.46},{x:-.56,y:.46},{x:-.6,y:.46},{x:-.63,y:.44},{x:-.65,y:.42},{x:-.67,y:.39},{x:-.68,y:.34},{x:-.68,y:-.34},{x:-.67,y:-.39},{x:-.65,y:-.42},{x:-.63,y:-.44},{x:-.6,y:-.45},{x:-.56,y:-.46},{x:-.52,y:-.45},{x:-.49,y:-.44},{x:-.46,y:-.42},{x:-.45,y:-.39},{x:-.44,y:-.34},{x:-.44,y:.34}],color:"primary",fill:!1},capsule_inner:{type:"path",points:[{x:-.51,y:.28},{x:-.52,y:.32},{x:-.53,y:.34},{x:-.56,y:.35},{x:-.57,y:.35},{x:-.58,y:.34},{x:-.6,y:.32},{x:-.61,y:.28},{x:-.61,y:-.28},{x:-.6,y:-.32},{x:-.58,y:-.34},{x:-.57,y:-.35},{x:-.56,y:-.35},{x:-.53,y:-.34},{x:-.52,y:-.32},{x:-.51,y:-.28},{x:-.51,y:.28}],color:"primary",fill:!0},usb_vertical:{type:"path",points:[{x:.1,y:-.4},{x:.1,y:.4}],color:"primary",fill:!1},usb_left_branch:{type:"path",points:[{x:.1,y:-.1},{x:-.03,y:.05},{x:-.03,y:.15}],color:"primary",fill:!1},usb_right_branch:{type:"path",points:[{x:.1,y:0},{x:.25,y:.15},{x:.25,y:.25}],color:"primary",fill:!1},usb_arrow:{type:"path",points:[{x:.05,y:.4},{x:.1,y:.5},{x:.15,y:.4},{x:.05,y:.4}],color:"primary",fill:!0},usb_square:{type:"path",points:[{x:.2,y:.25},{x:.3,y:.25},{x:.3,y:.35},{x:.2,y:.35},{x:.2,y:.25}],color:"primary",fill:!0}},circles:{usb_base:{type:"circle",x:.1,y:-.4,radius:.07,color:"primary",fill:!0},usb_tip_circle:{type:"circle",x:-.03,y:.15,radius:.04,color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.25,y:.7}},refblocks:{},bounds:{minX:-.75,maxX:.35,minY:-.6,maxY:.75,width:1.1,height:1.35,centerX:-.2,centerY:.08}},BAt=cn(FAt).changeTextAnchor("{REF}","middle_bottom").build(),zAt={paths:{path11:{type:"path",points:[{x:-.54,y:0},{x:-.3,y:0}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.29,y:0},{x:.54,y:0}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.18,y:-.36},bottom1:{type:"text",text:"{VAL}",x:-.01,y:.43},left1:{type:"text",text:"Var",x:-.19,y:.07}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:0}},bounds:{width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:"circle",x:-.01,y:-.01,radius:.29,color:"primary",fill:!1}}},{paths:VAt,texts:ite,bounds:BB,refblocks:O8e,circles:$At}=zAt,F8e=za({primitives:[...Object.values(VAt),...Object.values($At),{...ite.top1,x:0,y:-.3594553499999995,anchor:"middle_top"},{...ite.bottom1,x:0,y:.35,anchor:"middle_bottom"},{...ite.left1,x:-.02,y:.01,fontSize:.2,anchor:"center"}],ports:[{...O8e.left1,labels:["1"]},{...O8e.right1,labels:["2"]}],size:{width:BB.width,height:BB.height},center:{x:BB.centerX,y:BB.centerY}}),WAt=ro(F8e),UAt={paths:{path40:{type:"path",points:[{x:.08,y:.04},{x:-.18,y:-.09}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.18,y:.18},{x:.08,y:.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.18,y:-.09},{x:-.18,y:.18}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.09,y:.17},{x:.1,y:-.09}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.2,y:.04},{x:-.52,y:.04}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.52,y:.04},{x:.21,y:.04}],color:"primary",fill:!1},"path43-6":{type:"path",points:[{x:.19,y:.17},{x:.19,y:-.09}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.01,y:.27},bottom1:{type:"text",text:"{VAL}",x:0,y:-.27}},refblocks:{left1:{x:-.52,y:.04},right1:{x:.52,y:.04}},bounds:{width:1.09,height:.55,centerX:0,centerY:0},circles:{}},{paths:XAt,texts:B8e,bounds:zB,refblocks:z8e,circles:jAt}=UAt,V8e=za({primitives:[...Object.values(XAt),...Object.values(jAt),{...B8e.top1,anchor:"middle_bottom"},{...B8e.bottom1,anchor:"middle_top"}],ports:[{...z8e.left1,labels:["1"]},{...z8e.right1,labels:["2"]}],size:{width:zB.width,height:zB.height},center:{x:zB.centerX,y:zB.centerY}}),ste=ro(V8e),GAt=ste.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),YAt=ste.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");GAt.anchor="middle_left",YAt.anchor="middle_right";var qAt=ste,JAt={paths:{path5:{type:"path",points:[{x:-.54,y:0},{x:-.26,y:0}],color:"primary",fill:!1},path6:{type:"path",points:[{x:.27,y:0},{x:.54,y:.01}],color:"primary",fill:!1},path7:{type:"path",points:[{x:.27,y:-.23},{x:-.26,y:.24}],color:"primary",fill:!1},path8:{type:"path",points:[{x:.38,y:-.23},{x:.27,y:-.23}],color:"primary",fill:!1},path9:{type:"path",points:[{x:0,y:.14},{x:.27,y:.14},{x:.27,y:-.13},{x:-.26,y:-.13},{x:-.26,y:.14},{x:0,y:.14}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.06,y:.25},bottom1:{type:"text",text:"{VAL}",x:.01,y:-.25}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:.01}},bounds:{width:1.13,height:.5,centerX:0,centerY:0}},{paths:KAt,texts:$8e,bounds:VB,refblocks:W8e}=JAt,U8e=za({primitives:[...Object.values(KAt),{...$8e.top1,anchor:"middle_left"},{...$8e.bottom1,anchor:"middle_right"}],ports:[{...W8e.left1,labels:["1","-"]},{...W8e.right1,labels:["2","+"]}],size:{width:VB.width,height:VB.height},center:{x:VB.centerX,y:VB.centerY}}),QAt=ro(U8e),ZAt={paths:{path11:{type:"path",points:[{x:-.54,y:0},{x:-.3,y:0}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.29,y:0},{x:.54,y:0}],color:"primary",fill:!1}},texts:{left1:{type:"text",text:"Var",x:0,y:-.02}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:0}},bounds:{width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:"circle",x:-.01,y:-.01,radius:.29,color:"primary",fill:!1}}},{paths:eRt,texts:tRt,bounds:$B,refblocks:X8e,circles:nRt}=ZAt,ate=za({primitives:[...Object.values(eRt),...Object.values(nRt),{type:"text",text:"{REF}",x:0,y:-.3594553499999995,anchor:"middle_top"},{type:"text",text:"{VAL}",x:0,y:.35,anchor:"middle_bottom"},{...tRt.left1,anchor:"center",y:.02,fontSize:.2}],ports:[{...X8e.left1,labels:["1"]},{...X8e.right1,labels:["2"]}],size:{width:$B.width,height:$B.height},center:{x:$B.centerX,y:$B.centerY}}),{5:oRt,...rRt}=ate.primitives;function iRt(t){return typeof t=="object"}var j8e=ro({...ate,primitives:Object.values(rRt).filter(iRt)}),sRt={...j8e,primitives:[...j8e.primitives,oRt]},WB={paths:{"path28-2":{type:"path",points:[{x:.19,y:0},{x:0,y:.09}],color:"primary",fill:!1},"path28-2-6":{type:"path",points:[{x:.19,y:0},{x:0,y:-.09}],color:"primary",fill:!1},"path29-3":{type:"path",points:[{x:.19,y:0},{x:-.23,y:0}],color:"primary",fill:!1}},texts:{right1:{type:"text",text:"{REF}",x:.25,y:0}},refblocks:{left1:{x:-.23,y:0}},bounds:{minX:-.25,maxX:.25,minY:-.09,maxY:.09,width:.5,height:.19,centerX:0,centerY:0},circles:{}};function UB(t,e){let{width:n,height:o}=t.size,r=1,i=1;e.width!==void 0&&e.height!==void 0?(r=e.width/n,i=e.height/o):e.width!==void 0?r=i=e.width/n:e.height!==void 0&&(r=i=e.height/o);let s=t.primitives.map(a=>{switch(a.type){case"path":return{...a,points:a.points.map(c=>({x:c.x*r,y:c.y*i}))};case"text":return{...a,x:a.x*r,y:a.y*i,fontSize:a.fontSize?a.fontSize*r:void 0};case"circle":return{...a,x:a.x*r,y:a.y*i,radius:a.radius*r};case"box":return{...a,x:a.x*r,y:a.y*i,width:a.width*r,height:a.height*i};default:return a}});return{...t,primitives:s,center:{x:t.center.x*r,y:t.center.y*i},ports:t.ports.map(a=>({...a,x:a.x*r,y:a.y*i})),size:{width:n*r,height:o*i}}}var aRt=cn(WB).rotateRightFacingSymbol("down").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_top").build(),cRt=UB(aRt,{width:.24,height:.23}),lRt=cn(WB).rotateRightFacingSymbol("left").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_right").build(),uRt=UB(lRt,{width:.23,height:.24}),_Rt=cn(WB).rotateRightFacingSymbol("right").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_left").build(),dRt=UB(_Rt,{width:.23,height:.24}),hRt=cn(WB).rotateRightFacingSymbol("up").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_bottom").build(),mRt=UB(hRt,{width:.24,height:.23}),G8e={paths:{path11:{type:"path",points:[{x:-.54,y:.03},{x:-.3,y:.03}],color:"primary",fill:!1},"path11-5-5":{type:"path",points:[{x:.1,y:.13},{x:0,y:-.06},{x:-.11,y:.13}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.29,y:.03},{x:.54,y:.03}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.02,y:.4},bottom1:{type:"text",text:"{VAL}",x:-.01,y:-.4}},refblocks:{left1:{x:-.54,y:.03},right1:{x:.54,y:.03}},bounds:{minX:-.57,maxX:.57,minY:-.4,maxY:.4,width:1.14,height:.8,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:.04,radius:.29,color:"primary",fill:!1}}},{paths:Uio,texts:Xio,bounds:jio,circles:Gio,refblocks:Yio}=G8e,Y8e=cn(G8e).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),pRt=ro(Y8e),fRt={paths:{path11:{type:"path",points:[{x:-.54,y:0},{x:-.3,y:0}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.29,y:0},{x:.54,y:0}],color:"primary",fill:!1}},texts:{left1:{type:"text",text:"Wh",x:0,y:-.02}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:0}},bounds:{width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:"circle",x:-.01,y:-.01,radius:.29,color:"primary",fill:!1}}},{paths:xRt,texts:gRt,bounds:XB,refblocks:q8e,circles:yRt}=fRt,cte=za({primitives:[...Object.values(xRt),...Object.values(yRt),{type:"text",text:"{REF}",x:0,y:-.3594553499999995,anchor:"middle_top"},{type:"text",text:"{VAL}",x:0,y:.35,anchor:"middle_bottom"},{...gRt.left1,anchor:"center",y:.01,fontSize:.2}],ports:[{...q8e.left1,labels:["1"]},{...q8e.right1,labels:["2"]}],size:{width:XB.width,height:XB.height},center:{x:XB.centerX,y:XB.centerY}}),{5:bRt,...PRt}=cte.primitives;function vRt(t){return typeof t=="object"}var J8e=ro({...cte,primitives:Object.values(PRt).filter(vRt)}),SRt={...J8e,primitives:[...J8e.primitives,bRt]},CRt={paths:{path11:{type:"path",points:[{x:-.54,y:0},{x:-.3,y:0}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.29,y:0},{x:.54,y:0}],color:"primary",fill:!1}},texts:{left1:{type:"text",text:"W",x:0,y:-.02}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:0}},bounds:{width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:"circle",x:-.01,y:-.01,radius:.29,color:"primary",fill:!1}}},{paths:MRt,texts:TRt,bounds:jB,refblocks:K8e,circles:wRt}=CRt,lte=za({primitives:[...Object.values(MRt),...Object.values(wRt),{type:"text",text:"{REF}",x:0,y:-.3594553499999995,anchor:"middle_top"},{type:"text",text:"{VAL}",x:0,y:.35,anchor:"middle_bottom"},{...TRt.left1,anchor:"center",y:.01,fontSize:.3}],ports:[{...K8e.left1,labels:["1"]},{...K8e.right1,labels:["2"]}],size:{width:jB.width,height:jB.height},center:{x:jB.centerX,y:jB.centerY}}),{5:ERt,...DRt}=lte.primitives;function ARt(t){return typeof t=="object"}var Q8e=ro({...lte,primitives:Object.values(DRt).filter(ARt)}),RRt={...Q8e,primitives:[...Q8e.primitives,ERt]},kRt={paths:{path40:{type:"path",points:[{x:.14,y:.04},{x:-.12,y:-.09}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.12,y:.18},{x:.14,y:.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.12,y:-.09},{x:-.12,y:.18}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.14,y:.18},{x:.14,y:-.09}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.12,y:.04},{x:-.52,y:.04}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.52,y:.04},{x:.15,y:.04}],color:"primary",fill:!1},"path43-8":{type:"path",points:[{x:.14,y:.18},{x:.08,y:.18}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.01,y:.27},bottom1:{type:"text",text:"{VAL}",x:0,y:-.27}},refblocks:{left1:{x:-.52,y:.04},right1:{x:.52,y:.04}},bounds:{width:1.09,height:.55,centerX:0,centerY:0},circles:{}},{paths:NRt,texts:Z8e,bounds:GB,refblocks:eCe,circles:HRt}=kRt,tCe=za({primitives:[...Object.values(NRt),...Object.values(HRt),{...Z8e.top1,anchor:"middle_bottom"},{...Z8e.bottom1,anchor:"middle_top"}],ports:[{...eCe.left1,labels:["1"]},{...eCe.right1,labels:["2"]}],size:{width:GB.width,height:GB.height},center:{x:GB.centerX,y:GB.centerY}}),ute=ro(tCe),IRt=ute.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),LRt=ute.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");IRt.anchor="middle_left",LRt.anchor="middle_right";var ORt=ute,t1={ac_voltmeter_down:N7t,ac_voltmeter_horz:L7t,ac_voltmeter_left:B7t,ac_voltmeter_right:$7t,ac_voltmeter_up:X7t,ac_voltmeter_vert:Y7t,avalanche_diode_down:K7t,avalanche_diode_horz:Q7t,avalanche_diode_left:tSt,avalanche_diode_right:nSt,avalanche_diode_up:iSt,avalanche_diode_vert:cSt,backward_diode_down:_St,backward_diode_left:Ive,backward_diode_right:fSt,backward_diode_up:xSt,battery_horz:Bve,battery_vert:PSt,boxresistor_down:CSt,boxresistor_left:wSt,boxresistor_right:ASt,boxresistor_small_down:NSt,boxresistor_small_left:LSt,boxresistor_small_right:BSt,boxresistor_small_up:$St,boxresistor_up:XSt,bridged_ground_down:YSt,bridged_ground_left:KSt,bridged_ground_right:n7e,bridged_ground_up:e8t,capacitor_down:o8t,capacitor_left:r8t,capacitor_polarized_down:a8t,capacitor_polarized_left:c8t,capacitor_polarized_right:_8t,capacitor_polarized_up:m8t,capacitor_right:p8t,capacitor_up:g8t,constant_current_diode_down:P8t,constant_current_diode_horz:v8t,constant_current_diode_left:M8t,constant_current_diode_right:T8t,constant_current_diode_up:D8t,constant_current_diode_vert:k8t,crystal_4pin_down:I8t,crystal_4pin_left:L8t,crystal_4pin_right:O8t,crystal_4pin_up:z8t,crystal_down:W8t,crystal_left:U8t,crystal_right:X8t,crystal_up:Y8t,darlington_pair_transistor_down:q8t,darlington_pair_transistor_horz:J8t,darlington_pair_transistor_left:K8t,darlington_pair_transistor_right:Q8t,darlington_pair_transistor_up:Z8t,darlington_pair_transistor_vert:eCt,dc_ammeter_horz:NK,dc_ammeter_vert:lCt,dc_voltmeter_down:dCt,dc_voltmeter_horz:pCt,dc_voltmeter_left:gCt,dc_voltmeter_right:PCt,dc_voltmeter_up:CCt,dc_voltmeter_vert:wCt,diac_down:ECt,diac_horz:DCt,diac_left:ACt,diac_right:RCt,diac_up:kCt,diac_vert:NCt,digital_ground_down:LCt,digital_ground_left:BCt,digital_ground_right:$Ct,digital_ground_up:XCt,diode_down:GCt,diode_left:YCt,diode_right:hF,diode_up:qCt,dpdt_normally_closed_switch_down:KCt,dpdt_normally_closed_switch_left:QCt,dpdt_normally_closed_switch_right:mF,dpdt_normally_closed_switch_up:ZCt,dpdt_switch_down:tMt,dpdt_switch_left:nMt,dpdt_switch_right:pF,dpdt_switch_up:oMt,dpst_normally_closed_switch_down:iMt,dpst_normally_closed_switch_left:sMt,dpst_normally_closed_switch_right:fF,dpst_normally_closed_switch_up:aMt,dpst_switch_down:lMt,dpst_switch_left:uMt,dpst_switch_right:xF,dpst_switch_up:_Mt,ferrite_bead_down:mMt,ferrite_bead_left:pMt,ferrite_bead_right:R7e,ferrite_bead_up:A7e,filled_diode_down:gMt,filled_diode_horz:PMt,filled_diode_left:CMt,filled_diode_right:wMt,filled_diode_up:AMt,filled_diode_vert:NMt,frequency_meter_horz:PQ,frequency_meter_vert:VMt,fuse_horz:V7e,fuse_vert:XMt,ground_down:jMt,ground_horz:GMt,ground_left:YMt,ground_right:qMt,ground_up:JMt,ground_vert:KMt,gunn_diode_horz:QMt,gunn_diode_vert:ZMt,icled_down:tTt,icled_left:nTt,icled_right:wF,icled_up:oTt,igbt_transistor_horz:$7e,igbt_transistor_vert:iTt,illuminated_push_button_normally_open_horz:U7e,illuminated_push_button_normally_open_vert:aTt,inductor_down:_Tt,inductor_left:dTt,inductor_right:AQ,inductor_up:q7e,laser_diode_down:hTt,laser_diode_left:mTt,laser_diode_right:DF,laser_diode_up:pTt,led_down:yTt,led_left:bTt,led_right:zQ,led_up:Z7e,light_dependent_resistor_horz:nSe,light_dependent_resistor_vert:CTt,mosfet_depletion_normally_on_horz:sSe,mosfet_depletion_normally_on_vert:wTt,mushroom_head_normally_open_momentary_horz:uSe,mushroom_head_normally_open_momentary_vert:RTt,n_channel_d_mosfet_transistor_horz:dSe,n_channel_d_mosfet_transistor_vert:ITt,n_channel_e_mosfet_transistor_horz:fSe,n_channel_e_mosfet_transistor_vert:BTt,njfet_transistor_horz:bSe,njfet_transistor_vert:WTt,not_connected_down:GTt,not_connected_left:YTt,not_connected_right:FF,not_connected_up:qTt,npn_bipolar_transistor_down:QTt,npn_bipolar_transistor_horz:ZTt,npn_bipolar_transistor_left:nwt,npn_bipolar_transistor_right:iwt,npn_bipolar_transistor_up:cwt,npn_bipolar_transistor_vert:_wt,opamp_no_power_down:hwt,opamp_no_power_left:mwt,opamp_no_power_right:UF,opamp_no_power_up:pwt,opamp_with_power_down:xwt,opamp_with_power_left:gwt,opamp_with_power_right:XF,opamp_with_power_up:ywt,p_channel_d_mosfet_transistor_horz:MSe,p_channel_d_mosfet_transistor_vert:Swt,p_channel_e_mosfet_transistor_horz:DSe,p_channel_e_mosfet_transistor_vert:wwt,photodiode_horz:kSe,photodiode_vert:Awt,pjfet_transistor_horz:LSe,pjfet_transistor_vert:Hwt,pnp_bipolar_transistor_down:Owt,pnp_bipolar_transistor_horz:Fwt,pnp_bipolar_transistor_left:Vwt,pnp_bipolar_transistor_right:Uwt,pnp_bipolar_transistor_up:Gwt,pnp_bipolar_transistor_vert:Jwt,potentiometer_horz:VSe,potentiometer_vert:eEt,potentiometer2_down:oEt,potentiometer2_left:rEt,potentiometer2_right:nB,potentiometer2_up:iEt,potentiometer3_down:cEt,potentiometer3_left:_Et,potentiometer3_right:dEt,potentiometer3_up:pEt,power_factor_meter_horz:XSe,power_factor_meter_vert:yEt,push_button_normally_closed_momentary_horz:qSe,push_button_normally_closed_momentary_vert:SEt,push_button_normally_open_momentary_horz:QSe,push_button_normally_open_momentary_vert:wEt,rail_down:REt,rail_left:IEt,rail_right:BEt,rail_up:$Et,rectifier_diode_horz:r8e,rectifier_diode_vert:YEt,resistor_down:KEt,resistor_left:eDt,resistor_right:oDt,resistor_up:sDt,resonator_down:lDt,resonator_horz:_8e,resonator_left:dDt,resonator_right:yB,resonator_up:hDt,resonator_vert:mDt,schottky_diode_down:fDt,schottky_diode_left:xDt,schottky_diode_right:PB,schottky_diode_up:gDt,silicon_controlled_rectifier_horz:h8e,silicon_controlled_rectifier_vert:bDt,solderjumper2_bridged12_down:PDt,solderjumper2_bridged12_left:vDt,solderjumper2_bridged12_right:SDt,solderjumper2_bridged12_up:CDt,solderjumper2_down:MDt,solderjumper2_left:TDt,solderjumper2_right:wDt,solderjumper2_up:EDt,solderjumper3_bridged12_down:DDt,solderjumper3_bridged12_left:ADt,solderjumper3_bridged12_right:RDt,solderjumper3_bridged12_up:kDt,solderjumper3_bridged123_down:NDt,solderjumper3_bridged123_left:HDt,solderjumper3_bridged123_right:IDt,solderjumper3_bridged123_up:LDt,solderjumper3_bridged23_down:ODt,solderjumper3_bridged23_left:FDt,solderjumper3_bridged23_right:BDt,solderjumper3_bridged23_up:zDt,solderjumper3_down:VDt,solderjumper3_left:$Dt,solderjumper3_right:WDt,solderjumper3_up:UDt,spdt_normally_closed_switch_down:jDt,spdt_normally_closed_switch_left:GDt,spdt_normally_closed_switch_right:EB,spdt_normally_closed_switch_up:YDt,spdt_switch_down:JDt,spdt_switch_left:KDt,spdt_switch_right:DB,spdt_switch_up:QDt,spst_normally_closed_switch_down:ZDt,spst_normally_closed_switch_left:eAt,spst_normally_closed_switch_right:RB,spst_normally_closed_switch_up:tAt,spst_switch_down:nAt,spst_switch_left:oAt,spst_switch_right:NB,spst_switch_up:rAt,square_wave_down:iAt,square_wave_left:sAt,square_wave_right:aAt,square_wave_up:cAt,step_recovery_diode_horz:x8e,step_recovery_diode_vert:lAt,tachometer_horz:jee,tachometer_vert:xAt,testpoint_down:gAt,testpoint_left:yAt,testpoint_right:LB,testpoint_up:bAt,tilted_ground_down:vAt,tilted_ground_left:SAt,tilted_ground_right:Gee,tilted_ground_up:C8e,triac_horz:T8e,triac_vert:TAt,tunnel_diode_horz:R8e,tunnel_diode_vert:kAt,unijunction_transistor_horz:N8e,unijunction_transistor_vert:OAt,usbc:BAt,var_meter_horz:F8e,var_meter_vert:WAt,varactor_diode_horz:V8e,varactor_diode_vert:qAt,varistor_horz:U8e,varistor_vert:QAt,varmeter_horz:ate,varmeter_vert:sRt,vcc_down:cRt,vcc_left:uRt,vcc_right:dRt,vcc_up:mRt,volt_meter_horz:Y8e,volt_meter_vert:pRt,watt_hour_meter_horz:cte,watt_hour_meter_vert:SRt,wattmeter_horz:lte,wattmeter_vert:RRt,zener_diode_horz:tCe,zener_diode_vert:ORt};Object.fromEntries(Object.keys(t1).map(t=>[t,t]));const nCe=!0,FRt=!1,uA={CCW:-1,CW:1,NOT_ORIENTABLE:0},BRt=2*Math.PI,YB=1,oCe=0,_6=2,zRt=3,VRt=4,$Rt=1,WRt=2,_te=0,_A=1,iM=2;var qB=Object.freeze({__proto__:null,BOUNDARY:_6,CCW:nCe,CONTAINS:zRt,CW:FRt,END_VERTEX:iM,INSIDE:YB,INTERLACE:VRt,NOT_VERTEX:_te,ORIENTATION:uA,OUTSIDE:oCe,OVERLAP_OPPOSITE:WRt,OVERLAP_SAME:$Rt,PIx2:BRt,START_VERTEX:_A});let d6=1e-6;function rCe(t){d6=t}function iCe(){return d6}const URt=3;function dte(t){return t<d6&&t>-d6}function U7(t,e){return t-e<d6&&t-e>-d6}function sCe(t,e){return t-e>d6}function XRt(t,e){return t-e>-d6}function aCe(t,e){return t-e<-d6}function jRt(t,e){return t-e<d6}var GRt=Object.freeze({__proto__:null,DECIMALS:URt,EQ:U7,EQ_0:dte,GE:XRt,GT:sCe,LE:jRt,LT:aCe,getTolerance:iCe,setTolerance:rCe});let Ae={Utils:GRt,Errors:void 0,Matrix:void 0,Planar_set:void 0,Point:void 0,Vector:void 0,Line:void 0,Circle:void 0,Segment:void 0,Arc:void 0,Box:void 0,Edge:void 0,Face:void 0,Ray:void 0,Ray_shooting:void 0,Multiline:void 0,Polygon:void 0,Distance:void 0,Inversion:void 0};for(let t in qB)Ae[t]=qB[t];Object.defineProperty(Ae,"DP_TOL",{get:function(){return iCe()},set:function(t){rCe(t)}});class q0{static get ILLEGAL_PARAMETERS(){return new ReferenceError("Illegal Parameters")}static get ZERO_DIVISION(){return new Error("Zero division")}static get UNRESOLVED_BOUNDARY_CONFLICT(){return new Error("Unresolved boundary conflict in boolean operation")}static get INFINITE_LOOP(){return new Error("Infinite loop")}static get CANNOT_COMPLETE_BOOLEAN_OPERATION(){return new Error("Cannot complete boolean operation")}static get CANNOT_INVOKE_ABSTRACT_METHOD(){return new Error("Abstract method cannot be invoked")}static get OPERATION_IS_NOT_SUPPORTED(){return new Error("Operation is not supported")}static get UNSUPPORTED_SHAPE_TYPE(){return new Error("Unsupported shape type")}}Ae.Errors=q0;class hte{constructor(e,n){this.first=e,this.last=n||this.first}[Symbol.iterator](){let e;return{next:()=>(e=e?e.next:this.first,{value:e,done:e===void 0})}}get size(){let e=0;for(let n of this)e++;return e}toArray(e=void 0,n=void 0){let o=[],r=e||this.first,i=n||this.last,s=r;if(s===void 0)return o;do o.push(s),s=s.next;while(s!==i.next);return o}append(e){return this.isEmpty()?this.first=e:(e.prev=this.last,this.last.next=e),this.last=e,this.last.next=void 0,this.first.prev=void 0,this}insert(e,n){if(this.isEmpty())this.first=e,this.last=e;else if(n==null)e.next=this.first,this.first.prev=e,this.first=e;else{let o=n.next;n.next=e,o&&(o.prev=e),e.prev=n,e.next=o,this.last===n&&(this.last=e)}return this.last.next=void 0,this.first.prev=void 0,this}remove(e){return e===this.first&&e===this.last?(this.first=void 0,this.last=void 0):(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e===this.first&&(this.first=e.next),e===this.last&&(this.last=e.prev)),this}isEmpty(){return this.first===void 0}static testInfiniteLoop(e){let n=e,o=e;do{if(n!=e&&n===o)throw q0.INFINITE_LOOP;n=n.next,o=o.next.next}while(n!=e)}}const cCe={stroke:"black"};class YRt{constructor(e=cCe){for(const n in e)this[n]=e[n];this.stroke=e.stroke??cCe.stroke}toAttributesString(){return Object.keys(this).reduce((e,n)=>e+(this[n]!==void 0?this.toAttrString(n,this[n]):""),"")}toAttrString(e,n){const o=e==="className"?"class":this.convertCamelToKebabCase(e);return n===null?`${o} `:`${o}="${n.toString()}" `}convertCamelToKebabCase(e){return e.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g).join("-").toLowerCase()}}function X7(t){return new YRt(t).toAttributesString()}function sM(t,e){let n=[],[o,r,i]=t.standard,[s,a,c]=e.standard,l=o*a-r*s,u=i*a-r*c,_=o*c-i*s;if(!Ae.Utils.EQ_0(l)){let d,m;r===0?(d=i/o,m=_/l):a===0?(d=c/s,m=_/l):o===0?(d=u/l,m=i/r):s===0?(d=u/l,m=c/a):(d=u/l,m=_/l),n.push(new Ae.Point(d,m))}return n}function j7(t,e){let n=[],o=e.pc.projectionOn(t),r=e.pc.distanceTo(o)[0];if(Ae.Utils.EQ(r,e.r))n.push(o);else if(Ae.Utils.LT(r,e.r)){let i=Math.sqrt(e.r*e.r-r*r),s,a;s=t.norm.rotate90CCW().multiply(i),a=o.translate(s),n.push(a),s=t.norm.rotate90CW().multiply(i),a=o.translate(s),n.push(a)}return n}function aM(t,e){let n=[];for(let o of e.toSegments()){let r=dA(o,t);for(let i of r)gCe(i,n)||n.push(i)}return n}function JB(t,e){let n=[];if(aM(t,e.box).length===0)return n;let o=new Ae.Circle(e.pc,e.r),r=j7(t,o);for(let i of r)i.on(e)&&n.push(i);return n}function dA(t,e){let n=[];if(t.ps.on(e)&&n.push(t.ps),t.pe.on(e)&&!t.isZeroLength()&&n.push(t.pe),n.length>0||t.isZeroLength()||t.ps.leftTo(e)&&t.pe.leftTo(e)||!t.ps.leftTo(e)&&!t.pe.leftTo(e))return n;let o=new Ae.Line(t.ps,t.pe);return sM(o,e)}function KB(t,e){let n=[];if(t.isZeroLength())return t.ps.on(e)&&n.push(t.ps),n;if(e.isZeroLength())return e.ps.on(t)&&n.push(e.ps),n;let o=new Ae.Line(t.ps,t.pe),r=new Ae.Line(e.ps,e.pe);if(o.incidentTo(r))t.ps.on(e)&&n.push(t.ps),t.pe.on(e)&&n.push(t.pe),e.ps.on(t)&&!e.ps.equalTo(t.ps)&&!e.ps.equalTo(t.pe)&&n.push(e.ps),e.pe.on(t)&&!e.pe.equalTo(t.ps)&&!e.pe.equalTo(t.pe)&&n.push(e.pe);else{let i=sM(o,r);i.length>0&&lCe(i[0],t)&&lCe(i[0],e)&&n.push(i[0])}return n}function lCe(t,e){const n=e.box;return Ae.Utils.LE(t.x,n.xmax)&&Ae.Utils.GE(t.x,n.xmin)&&Ae.Utils.LE(t.y,n.ymax)&&Ae.Utils.GE(t.y,n.ymin)}function QB(t,e){let n=[];if(t.isZeroLength()){let[i,s]=t.ps.distanceTo(e.pc);return Ae.Utils.EQ(i,e.r)&&n.push(t.ps),n}let o=new Ae.Line(t.ps,t.pe),r=j7(o,e);for(let i of r)i.on(t)&&n.push(i);return n}function cM(t,e){let n=[];if(t.isZeroLength())return t.ps.on(e)&&n.push(t.ps),n;let o=new Ae.Line(t.ps,t.pe),r=new Ae.Circle(e.pc,e.r),i=j7(o,r);for(let s of i)s.on(t)&&s.on(e)&&n.push(s);return n}function qRt(t,e){let n=[];for(let o of e.toSegments()){let r=KB(o,t);for(let i of r)n.push(i)}return n}function uCe(t,e){let n=[],o=new Ae.Vector(t.pc,e.pc),r=t.r,i=e.r;if(Ae.Utils.EQ_0(r)||Ae.Utils.EQ_0(i))return n;if(Ae.Utils.EQ_0(o.x)&&Ae.Utils.EQ_0(o.y)&&Ae.Utils.EQ(r,i))return n.push(t.pc.translate(-r,0)),n;let s=t.pc.distanceTo(e.pc)[0];if(Ae.Utils.GT(s,r+i)||Ae.Utils.LT(s,Math.abs(r-i)))return n;o.x/=s,o.y/=s;let a;if(Ae.Utils.EQ(s,r+i)||Ae.Utils.EQ(s,Math.abs(r-i)))return a=t.pc.translate(r*o.x,r*o.y),n.push(a),n;let c=r*r/(2*s)-i*i/(2*s)+s/2,l=t.pc.translate(c*o.x,c*o.y),u=Math.sqrt(r*r-c*c);return a=l.translate(o.rotate90CCW().multiply(u)),n.push(a),a=l.translate(o.rotate90CW().multiply(u)),n.push(a),n}function JRt(t,e){let n=[];for(let o of e.toSegments()){let r=QB(o,t);for(let i of r)n.push(i)}return n}function _Ce(t,e){let n=[];if(t.pc.equalTo(e.pc)&&Ae.Utils.EQ(t.r,e.r)){let s;return s=t.start,s.on(e)&&n.push(s),s=t.end,s.on(e)&&n.push(s),s=e.start,s.on(t)&&n.push(s),s=e.end,s.on(t)&&n.push(s),n}let o=new Ae.Circle(t.pc,t.r),r=new Ae.Circle(e.pc,e.r),i=o.intersect(r);for(let s of i)s.on(t)&&s.on(e)&&n.push(s);return n}function mte(t,e){let n=[];if(e.pc.equalTo(t.pc)&&Ae.Utils.EQ(e.r,t.r))return n.push(t.start),n.push(t.end),n;let o=e,r=new Ae.Circle(t.pc,t.r),i=uCe(o,r);for(let s of i)s.on(t)&&n.push(s);return n}function KRt(t,e){let n=[];for(let o of e.toSegments()){let r=cM(o,t);for(let i of r)n.push(i)}return n}function dCe(t,e){return t.isSegment?KB(t.shape,e):cM(e,t.shape)}function hCe(t,e){return t.isSegment?cM(t.shape,e):_Ce(t.shape,e)}function mCe(t,e){return t.isSegment?dA(t.shape,e):JB(e,t.shape)}function QRt(t,e){return t.isSegment?xte(e,t.shape):gte(e,t.shape)}function ZRt(t,e){return t.isSegment?QB(t.shape,e):mte(t.shape,e)}function pte(t,e){let n=[];for(let o of e.edges)for(let r of dCe(o,t))n.push(r);return n}function fte(t,e){let n=[];for(let o of e.edges)for(let r of hCe(o,t))n.push(r);return n}function hA(t,e){let n=[];if(e.isEmpty())return n;for(let o of e.edges)for(let r of mCe(o,t))gCe(r,n)||n.push(r);return t.sortPoints(n)}function pCe(t,e){let n=[];if(e.isEmpty())return n;for(let o of e.edges)for(let r of ZRt(o,t))n.push(r);return n}function fCe(t,e){return t.isSegment?dCe(e,t.shape):t.isArc?hCe(e,t.shape):t.isLine?mCe(e,t.shape):t.isRay?QRt(e,t.shape):[]}function xCe(t,e){let n=[];if(e.isEmpty()||t.shape.box.not_intersect(e.box))return n;let o=e.edges.search(t.shape.box);for(let r of o)n=[...n,...fCe(t,r)];return n}function ekt(t,e){let n=[];if(e.isEmpty()||t.size===0)return n;for(let o of t)n=[...n,...xCe(o,e)];return n}function tkt(t,e){let n=[];if(t.isEmpty()||e.isEmpty()||t.box.not_intersect(e.box))return n;for(let o of t.edges)n=[...n,...xCe(o,e)];return n}function nkt(t,e){return t instanceof Ae.Line?hA(t,e):t instanceof Ae.Segment?pte(t,e):t instanceof Ae.Arc?fte(t,e):[]}function gCe(t,e){return e.some(n=>n.equalTo(t))}function Bb(t){return new Ae.Line(t.start,t.norm)}function xte(t,e){return dA(e,Bb(t)).filter(n=>t.contains(n))}function gte(t,e){return JB(Bb(t),e).filter(n=>t.contains(n))}function yCe(t,e){return j7(Bb(t),e).filter(n=>t.contains(n))}function okt(t,e){return aM(Bb(t),e).filter(n=>t.contains(n))}function bCe(t,e){return sM(Bb(t),e).filter(n=>t.contains(n))}function rkt(t,e){return sM(Bb(t),Bb(e)).filter(n=>t.contains(n)).filter(n=>e.contains(n))}function PCe(t,e){return hA(Bb(t),e).filter(n=>t.contains(n))}function vCe(t,e){if(t.intersect&&t.intersect instanceof Function)return t.intersect(e);throw q0.UNSUPPORTED_SHAPE_TYPE}function lM(t,e){let n=[];for(let o of e)n=[...n,...vCe(t,o.shape)];return n}function ikt(t,e){let n=[];for(let o of t)for(let r of e)n=[...n,...vCe(o.shape,r.shape)];return n}let G7=class aL extends hte{constructor(...e){if(super(),this.isInfinite=!1,e.length===1&&e[0]instanceof Array&&e[0].length>0){const n=e[0],o=n.length,r=c=>c instanceof Ae.Segment||c instanceof Ae.Arc||c instanceof Ae.Ray||c instanceof Ae.Line,i=c=>c instanceof Ae.Segment||c instanceof Ae.Arc||c instanceof Ae.Ray,s=c=>c instanceof Ae.Segment||c instanceof Ae.Arc;if(o===1&&r(n[0])||o>1&&i(n[0])&&i(n[o-1])&&n.slice(1,o-1).every(s)){this.isInfinite=n.some(c=>c instanceof Ae.Ray||c instanceof Ae.Line);for(let c of n){let l=new Ae.Edge(c);this.append(l)}this.setArcLength()}else throw Ae.Errors.ILLEGAL_PARAMETERS}}get edges(){return[...this]}get box(){return this.edges.reduce((e,n)=>e.merge(n.box),new Ae.Box)}get vertices(){let e=this.edges.map(n=>n.start);return e.push(this.last.end),e}get length(){if(this.isEmpty())return 0;if(this.isInfinite)return Number.POSITIVE_INFINITY;let e=0;for(let n of this)e+=n.length;return e}clone(){return new aL(this.toShapes())}setArcLength(){for(let e of this)this.setOneEdgeArcLength(e)}setOneEdgeArcLength(e){e===this.first?e.arc_length=0:e.arc_length=e.prev.arc_length+e.prev.length}pointAtLength(e){if(e>this.length||e<0||this.isInfinite)return null;let n=null;for(let o of this)if(e>=o.arc_length&&(o===this.last||e<o.next.arc_length)){n=o.pointAtLength(e-o.arc_length);break}return n}addVertex(e,n){let o=n.shape.split(e);if(o[0]===null)return n.prev;if(o[1]===null)return n;let r=new Ae.Edge(o[0]),i=n.prev;return this.insert(r,i),n.shape=o[1],r}getChain(e,n){let o=[];for(let r=e;r!==n.next;r=r.next)o.push(r);return o}split(e){for(let n of e){let o=this.findEdgeByPoint(n);this.addVertex(n,o)}return this}findEdgeByPoint(e){let n;for(let o of this)if(o.shape.contains(e)){n=o;break}return n}distanceTo(e){if(e instanceof Point){const[n,o]=Ae.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ae.Line){const[n,o]=Ae.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ae.Circle){const[n,o]=Ae.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ae.Segment){const[n,o]=Ae.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ae.Arc){const[n,o]=Ae.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ae.Multiline)return Ae.Distance.multiline2multiline(this,e);throw Ae.Errors.UNSUPPORTED_SHAPE_TYPE}intersect(e){return e instanceof Ae.Multiline?ikt(this,e):lM(e,this)}contains(e){if(e instanceof Ae.Point)return this.edges.some(n=>n.shape.contains(e));throw Ae.Errors.UNSUPPORTED_SHAPE_TYPE}translate(e){return new aL(this.edges.map(n=>n.shape.translate(e)))}rotate(e=0,n=new Ae.Point){return new aL(this.edges.map(o=>o.shape.rotate(e,n)))}transform(e=new Ae.Matrix){return new aL(this.edges.map(n=>n.shape.transform(e)))}toShapes(){return this.edges.map(e=>e.shape.clone())}toJSON(){return this.edges.map(e=>e.toJSON())}svgPoints(){return this.vertices.map(e=>`${e.x},${e.y}`).join(" ")}dpath(){let e=`M${this.first.start.x},${this.first.start.y}`;for(let n of this)e+=n.svg();return e}svg(e={}){let n=`
|
|
257
|
+
at `+s}return e},gO.buildMessage=function(t,e){var n={literal:function(l){return'"'+r(l.text)+'"'},class:function(l){var u=l.parts.map(function(_){return Array.isArray(_)?i(_[0])+"-"+i(_[1]):i(_)});return"["+(l.inverted?"^":"")+u.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(l){return l.description}};function o(l){return l.charCodeAt(0).toString(16).toUpperCase()}function r(l){return l.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(u){return"\\x0"+o(u)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(u){return"\\x"+o(u)})}function i(l){return l.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(u){return"\\x0"+o(u)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(u){return"\\x"+o(u)})}function s(l){return n[l.type](l)}function a(l){var u=l.map(s),_,d;if(u.sort(),u.length>0){for(_=1,d=1;_<u.length;_++)u[_-1]!==u[_]&&(u[d]=u[_],d++);u.length=d}switch(u.length){case 1:return u[0];case 2:return u[0]+" or "+u[1];default:return u.slice(0,-1).join(", ")+", or "+u[u.length-1]}}function c(l){return l?'"'+r(l)+'"':"end of input"}return"Expected "+a(t)+" but "+c(e)+" found."};function TK(t){if(t.length===0)return{minX:0,maxX:0,minY:0,maxY:0};let e=1/0,n=-1/0,o=1/0,r=-1/0,i=s=>{e=Math.min(e,s.x),n=Math.max(n,s.x),o=Math.min(o,s.y),r=Math.max(r,s.y)};return t.forEach(s=>{switch(s.type){case"path":s.points.forEach(i);break;case"text":i({x:s.x,y:s.y});break;case"circle":{let{x:a,y:c,radius:l}=s;i({x:a-l,y:c-l}),i({x:a+l,y:c+l});break}case"box":{let{x:a,y:c,width:l,height:u}=s,_=l/2,d=u/2;i({x:a-_,y:c-d}),i({x:a+_,y:c+d});break}}}),{minX:e,maxX:n,minY:o,maxY:r}}var D7t=(t,e="right")=>{switch(e){case"down":switch(t){case"middle_top":return"middle_right";case"middle_bottom":return"middle_left";case"middle_left":return"middle_bottom";case"middle_right":return"middle_top"}break;case"up":switch(t){case"middle_top":return"middle_left";case"middle_bottom":return"middle_right";case"middle_left":return"middle_top";case"middle_right":return"middle_bottom"}break;case"left":switch(t){case"middle_top":return"middle_bottom";case"middle_bottom":return"middle_top";case"middle_left":return"middle_right";case"middle_right":return"middle_left"}break;case"right":return t}return t},yO=(t,e)=>{let{primitives:n,center:o,ports:r,size:i}=t,s=xO({a:1,b:0,c:0,d:-1,e:0,f:2*o.y}),a=n.map(l=>{switch(l={...l},l.type){case"path":return{...l,points:l.points.map(m=>Dg(s,m))};case"text":let u=Dg(s,{x:l.x,y:l.y}),_={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{...l,x:u.x,y:u.y,anchor:_[l.anchor]};case"circle":case"box":let d=Dg(s,{x:l.x,y:l.y});return{...l,x:d.x,y:d.y}}}),c=r.map(l=>({...l,...Dg(s,l)}));return{primitives:a,center:o,ports:c,size:i,...e}},cA=(t,e)=>{let{primitives:n,center:o,ports:r,size:i}=t,s=xO({a:-1,b:0,c:0,d:1,e:0,f:2*o.x}),a=n.map(l=>{switch(l={...l},l.type){case"path":return{...l,points:l.points.map(m=>Dg(s,m))};case"text":let u=Dg(s,{x:l.x,y:l.y}),_={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{...l,x:u.x,y:u.y,anchor:_[l.anchor]};case"circle":case"box":let d=Dg(s,{x:l.x,y:l.y});return{...l,x:d.x,y:d.y}}}),c=r.map(l=>({...l,...Dg(s,l)}));return{primitives:a,center:o,ports:c,size:i,...e}},wK=(t,e)=>{let{newOrientation:n,overrides:o}=e,r={up:Math.PI/2,right:0,down:-Math.PI/2,left:-Math.PI},i=w7t(n?r[n]:Math.PI/2,t.center.x,t.center.y),{primitives:s,center:a,size:c,ports:l}=t,u=s.map(m=>{switch(m={...m},m.type){case"path":return{...m,points:m.points.map(f=>Dg(i,f))};case"text":let h=Dg(i,{x:m.x,y:m.y});return m.anchor=D7t(m.anchor,n??"right"),{...m,x:h.x,y:h.y};case"circle":let p=Dg(i,{x:m.x,y:m.y});return{...m,x:p.x,y:p.y};case"box":let x=Dg(i,{x:m.x,y:m.y});return{...m,x:x.x,y:x.y,width:m.height,height:m.width}}}),_=l.map(m=>({...m,...Dg(i,m)})),d=TK(u);return{primitives:u,center:a,ports:_,size:{width:d.maxX-d.minX,height:d.maxY-d.minY},...o}},ro=(t,e="down",n={})=>wK(t,{newOrientation:e,overrides:n}),A7t=class{symbol;constructor(e){this.symbol=JSON.parse(JSON.stringify(e)),this.symbol.size=this.computeSize()}changeTextAnchor(e,n,o){return this.symbol={...this.symbol,primitives:this.symbol.primitives.map(r=>r.type==="text"&&r.text===e?{...r,anchor:n,...o?{x:r.x+o.x,y:r.y+o.y}:{}}:r)},this}labelPort(e,n){return this.symbol={...this.symbol,ports:this.symbol.ports.map(o=>o.labels.includes(e)?{...o,labels:n}:o)},this}rotateRightFacingSymbol(e){return this.symbol=wK(this.symbol,{newOrientation:e}),this}computeSize(){let e=TK(this.symbol.primitives);return{width:e.maxX-e.minX,height:e.maxY-e.minY}}build(){return{...this.symbol,size:this.computeSize()}}},cn=t=>{let e=t.primitives??[...Object.values(t.paths??{}),...Object.values(t.texts??{}),...Object.values(t.circles??{}),...Object.values(t.rects??{})],n=t.ports??Object.entries(t.refblocks).flatMap(([r,i])=>[{...i,labels:[r]}]),o=t.center??{x:t.bounds.centerX,y:t.bounds.centerY};return n.length===2&&(o={x:(n[0].x+n[1].x)/2,y:(n[0].y+n[1].y)/2}),new A7t({...t,primitives:e,ports:n,center:o})},KC={paths:{path11:{type:"path",points:[{x:-.54,y:.03},{x:-.3,y:.04}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.29,y:.04},{x:.54,y:.04}],color:"primary",fill:!1},"path11-5-5":{type:"path",points:[{x:.1,y:.13},{x:0,y:-.06},{x:-.11,y:.13}],color:"primary",fill:!1},path17:{type:"path",points:[{x:0,y:-.13},{x:.07,y:-.11}],color:"primary",fill:!1},path18:{type:"path",points:[{x:.07,y:-.11},{x:.14,y:-.13}],color:"primary",fill:!1},path19:{type:"path",points:[{x:-.15,y:-.13},{x:-.07,y:-.11}],color:"primary",fill:!1},path20:{type:"path",points:[{x:-.07,y:-.11},{x:0,y:-.13}],color:"primary",fill:!1}},refblocks:{left1:{x:-.54,y:.03},right1:{x:.54,y:.04}},bounds:{width:1.14,height:.79,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:.04,radius:.29,color:"primary",fill:!1}}},{paths:R7t,bounds:bO,refblocks:Sve,circles:k7t}=KC,N7t=cn({primitives:[...Object.values(R7t),...Object.values(k7t),{type:"text",text:"{REF}",x:-.15,y:.3894553499999995},{type:"text",text:"{VAL}",x:.15,y:.3894553499999995}],ports:[{...Sve.left1,labels:["1"]},{...Sve.right1,labels:["2"]}],size:{width:bO.width,height:bO.height},center:{x:bO.centerX,y:bO.centerY}}).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:H7t,bounds:PO,refblocks:Cve,circles:I7t}=KC,L7t=cn({primitives:[...Object.values(H7t),...Object.values(I7t),{type:"text",text:"{REF}",x:-0,y:.4094553499999995},{type:"text",text:"{VAL}",x:0,y:-.4094553499999995}],ports:[{...Cve.left1,labels:["1"]},{...Cve.right1,labels:["2"]}],size:{width:PO.width,height:PO.height},center:{x:PO.centerX,y:PO.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:O7t,bounds:vO,refblocks:Mve,circles:F7t}=KC,B7t=cn({primitives:[...Object.values(O7t),...Object.values(F7t),{type:"text",text:"{REF}",x:-0,y:-.3094553499999995},{type:"text",text:"{VAL}",x:0,y:.4094553499999995}],ports:[{...Mve.left1,labels:["1"]},{...Mve.right1,labels:["2"]}],size:{width:vO.width,height:vO.height},center:{x:vO.centerX,y:vO.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:z7t,bounds:SO,refblocks:Tve,circles:V7t}=KC,$7t=cn({primitives:[...Object.values(z7t),...Object.values(V7t),{type:"text",text:"{REF}",x:-0,y:.4094553499999995},{type:"text",text:"{VAL}",x:0,y:-.4094553499999995}],ports:[{...Tve.left1,labels:["1"]},{...Tve.right1,labels:["2"]}],size:{width:SO.width,height:SO.height},center:{x:SO.centerX,y:SO.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:W7t,bounds:CO,refblocks:wve,circles:U7t}=KC,X7t=cn({primitives:[...Object.values(W7t),...Object.values(U7t),{type:"text",text:"{REF}",x:.15,y:-.2894553499999995},{type:"text",text:"{VAL}",x:-.15,y:-.2894553499999995}],ports:[{...wve.left1,labels:["1"]},{...wve.right1,labels:["2"]}],size:{width:CO.width,height:CO.height},center:{x:CO.centerX,y:CO.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:j7t,bounds:MO,refblocks:Eve,circles:G7t}=KC,Y7t=cn({primitives:[...Object.values(j7t),...Object.values(G7t),{type:"text",text:"{REF}",x:.15,y:-.2894553499999995},{type:"text",text:"{VAL}",x:-.15,y:-.2894553499999995}],ports:[{...Eve.left1,labels:["1"]},{...Eve.right1,labels:["2"]}],size:{width:MO.width,height:MO.height},center:{x:MO.centerX,y:MO.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),QC={paths:{path40:{type:"path",points:[{x:.14,y:.04},{x:-.12,y:-.09}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.12,y:.18},{x:.14,y:.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.12,y:-.09},{x:-.12,y:.18}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.14,y:.18},{x:.14,y:-.09}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.12,y:.04},{x:-.52,y:.04}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.52,y:.04},{x:.15,y:.04}],color:"primary",fill:!1},"path43-8":{type:"path",points:[{x:.14,y:.18},{x:.08,y:.2}],color:"primary",fill:!1},"path43-8-3":{type:"path",points:[{x:.21,y:-.11},{x:.15,y:-.09}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.01,y:.27},bottom1:{type:"text",text:"{VAL}",x:0,y:-.27}},refblocks:{left1:{x:-.52,y:.04},right1:{x:.52,y:.04}},bounds:{minX:-.55,maxX:.55,minY:-.27,maxY:.27,width:1.09,height:.55,centerX:0,centerY:0},circles:{}},{paths:q7t,texts:Fro,bounds:TO,refblocks:Dve,circles:J7t}=QC,K7t=cn({primitives:[...Object.values(q7t),...Object.values(J7t),{type:"text",text:"{REF}",x:-.15,y:.3294553499999995},{type:"text",text:"{VAL}",x:.15,y:.3294553499999995}],ports:[{...Dve.left1,labels:["1"]},{...Dve.right1,labels:["2"]}],size:{width:TO.width,height:TO.height},center:{x:TO.centerX,y:TO.centerY}}).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),Q7t=cn(QC).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1","neg"]).labelPort("right1",["2","pos"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:Z7t,texts:Bro,bounds:wO,refblocks:Ave,circles:eSt}=QC,tSt=cn({primitives:[...Object.values(Z7t),...Object.values(eSt),{type:"text",text:"{REF}",x:-0,y:-.2294553499999995},{type:"text",text:"{VAL}",x:0,y:.3294553499999995}],ports:[{...Ave.left1,labels:["1"]},{...Ave.right1,labels:["2"]}],size:{width:wO.width,height:wO.height},center:{x:wO.centerX,y:wO.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),nSt=cn(QC).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1","neg"]).labelPort("right1",["2","pos"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:oSt,texts:zro,bounds:EO,refblocks:Rve,circles:rSt}=QC,iSt=cn({primitives:[...Object.values(oSt),...Object.values(rSt),{type:"text",text:"{REF}",x:.15,y:-.2294553499999995},{type:"text",text:"{VAL}",x:-.15,y:-.2294553499999995}],ports:[{...Rve.left1,labels:["1"]},{...Rve.right1,labels:["2"]}],size:{width:EO.width,height:EO.height},center:{x:EO.centerX,y:EO.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:sSt,texts:Vro,bounds:DO,refblocks:kve,circles:aSt}=QC,cSt=cn({primitives:[...Object.values(sSt),...Object.values(aSt),{type:"text",text:"{REF}",x:.15,y:-.2294553499999995},{type:"text",text:"{VAL}",x:-.15,y:-.2294553499999995}],ports:[{...kve.left1,labels:["1"]},{...kve.right1,labels:["2"]}],size:{width:DO.width,height:DO.height},center:{x:DO.centerX,y:DO.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),EK={paths:{path40:{type:"path",points:[{x:.14,y:.04},{x:-.12,y:-.09}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.12,y:.18},{x:.14,y:.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.12,y:-.09},{x:-.12,y:.18}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.14,y:.18},{x:.14,y:-.09}],color:"primary",fill:!1},path44:{type:"path",points:[{x:.14,y:.04},{x:-.52,y:.04}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.52,y:.04},{x:.15,y:.04}],color:"primary",fill:!1},"path43-8":{type:"path",points:[{x:.18,y:.18},{x:.11,y:.18}],color:"primary",fill:!1},"path43-8-8":{type:"path",points:[{x:.18,y:-.09},{x:.11,y:-.09}],color:"primary",fill:!1}},refblocks:{left1:{x:-.52,y:.04},right1:{x:.52,y:.04}},bounds:{width:1.09,height:.55,centerX:0,centerY:0},circles:{}},{paths:lSt,bounds:AO,refblocks:Nve,circles:uSt}=EK,_St=cn({primitives:[...Object.values(lSt),...Object.values(uSt),{type:"text",text:"{REF}",x:-.16,y:.2294553499999995},{type:"text",text:"{VAL}",x:.16,y:.2294553499999995}],ports:[{...Nve.left1,labels:["1"]},{...Nve.right1,labels:["2"]}],size:{width:AO.width,height:AO.height},center:{x:AO.centerX,y:AO.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").build(),{paths:dSt,bounds:RO,refblocks:Hve,circles:hSt}=EK,Ive=cn({primitives:[...Object.values(dSt),...Object.values(hSt),{type:"text",text:"{REF}",x:-1118e-7,y:-.18},{type:"text",text:"{VAL}",x:1118e-7,y:.2738453}],ports:[{...Hve.left1,labels:["1"]},{...Hve.right1,labels:["2"]}],size:{width:RO.width,height:RO.height},center:{x:RO.centerX,y:RO.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("left").labelPort("left1",["2"]).labelPort("right1",["1"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:mSt,bounds:kO,refblocks:Lve,circles:pSt}=EK,fSt=cn({primitives:[...Object.values(mSt),...Object.values(pSt),{type:"text",text:"{REF}",x:-.0050250999999996715,y:.27384529999999985,anchor:"middle_left"},{type:"text",text:"{VAL}",x:-.00011179999999999524,y:-.27384530000000007,anchor:"middle_left"}],ports:[{...Lve.left1,labels:["1"]},{...Lve.right1,labels:["2"]}],size:{width:kO.width,height:kO.height},center:{x:kO.centerX,y:kO.centerY}}).changeTextAnchor("{VAL}","middle_top").labelPort("right1",["2"]).labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_bottom").build(),DK=ro(Ive,"down"),AK=DK.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),RK=DK.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");AK.anchor="middle_left",RK.anchor="middle_left",AK.x=.25,AK.y+=.21,RK.y-=.21,RK.x=.25;var xSt=DK;function za(t){let e=t.size;if(!e){let n=TK(t.primitives);e={width:n.maxX-n.minX,height:n.maxY-n.minY}}return{...t,size:e}}var gSt={paths:{path43:{type:"path",points:[{x:-.06,y:.19},{x:-.06,y:-.12}],color:"primary",fill:!1},"path43-6":{type:"path",points:[{x:.02,y:.13},{x:.02,y:-.06}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.06,y:.03},{x:-.45,y:.03}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.45,y:.03},{x:.03,y:.03}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.03,y:.27},bottom1:{type:"text",text:"{VAL}",x:-.03,y:-.28}},refblocks:{left1:{x:-.45,y:.03},right1:{x:.45,y:.03}},bounds:{width:.95,height:.29,centerX:0,centerY:.06},circles:{}},{paths:ySt,texts:Ove,bounds:NO,refblocks:Fve,circles:bSt}=gSt,Bve=za({primitives:[...Object.values(ySt),...Object.values(bSt),{...Ove.top1,anchor:"middle_bottom"},{...Ove.bottom1,anchor:"middle_top"}],ports:[{...Fve.left1,labels:["1"]},{...Fve.right1,labels:["2"]}],size:{width:NO.width,height:NO.height},center:{x:NO.centerX,y:NO.centerY}}),PSt=wK(Bve,{newOrientation:"up"}),HO={paths:{path1:{type:"path",points:[{x:-.53,y:.05},{x:-.25,y:.05}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.28,y:.05},{x:.57,y:.05}],color:"primary",fill:!1},path3:{type:"path",points:[{x:.02,y:.18},{x:.28,y:.18},{x:.28,y:-.09},{x:-.25,y:-.09},{x:-.25,y:.18},{x:.02,y:.18}],color:"primary",fill:!1}},refblocks:{left1:{x:-.53,y:.05},right1:{x:.57,y:.05}},bounds:{centerX:0,centerY:0},circles:{}},{paths:vSt,bounds:zve,refblocks:Vve,circles:SSt}=HO,CSt=cn({primitives:[...Object.values(vSt),...Object.values(SSt),{type:"text",text:"{REF}",x:-.16,y:.2294553499999995},{type:"text",text:"{VAL}",x:.16,y:.2294553499999995}],ports:[{...Vve.left1,labels:["1"]},{...Vve.right1,labels:["2"]}],center:{x:zve.centerX,y:zve.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").build(),{paths:MSt,bounds:$ve,refblocks:Wve,circles:TSt}=HO,wSt=cn({primitives:[...Object.values(MSt),...Object.values(TSt),{type:"text",text:"{REF}",x:0,y:-.1994553499999995},{type:"text",text:"{VAL}",x:0,y:.2694553499999995}],ports:[{...Wve.left1,labels:["1"]},{...Wve.right1,labels:["2"]}],center:{x:$ve.centerX,y:$ve.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:ESt,bounds:Uve,refblocks:Xve,circles:DSt}=HO,ASt=cn({primitives:[...Object.values(ESt),...Object.values(DSt),{type:"text",text:"{REF}",x:0,y:.2294553499999995},{type:"text",text:"{VAL}",x:0,y:-.1594553499999995}],ports:[{...Xve.left1,labels:["1"]},{...Xve.right1,labels:["2"]}],center:{x:Uve.centerX,y:Uve.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),IO={paths:{path2:{type:"path",points:[{x:.15,y:-.01},{x:.55,y:-.01}],color:"primary",fill:!0},"path2-5":{type:"path",points:[{x:-.15,y:.06},{x:.14,y:.06}],color:"primary",fill:!0},"path2-5-1":{type:"path",points:[{x:.14,y:.06},{x:.14,y:-.08}],color:"primary",fill:!0},"path2-5-1-6":{type:"path",points:[{x:-.16,y:.06},{x:-.16,y:-.08}],color:"primary",fill:!0},"path2-5-4":{type:"path",points:[{x:-.15,y:-.08},{x:.14,y:-.08}],color:"primary",fill:!0},"path2-9":{type:"path",points:[{x:-.55,y:-.01},{x:-.17,y:-.01}],color:"primary",fill:!0}},refblocks:{left1:{x:-.55,y:-.01},right1:{x:.55,y:-.01}},bounds:{width:1.16,height:.35,centerX:0,centerY:0},circles:{}},{paths:RSt,bounds:LO,refblocks:jve,circles:kSt}=IO,NSt=cn({primitives:[...Object.values(RSt),...Object.values(kSt),{type:"text",text:"{REF}",x:-.2,y:.1404553499999995},{type:"text",text:"{VAL}",x:.2,y:.1494553499999995}],ports:[{...jve.left1,labels:["1"]},{...jve.right1,labels:["2"]}],size:{width:LO.width,height:LO.height},center:{x:LO.centerX,y:LO.centerY}}).rotateRightFacingSymbol("down").labelPort("left",["1"]).labelPort("right",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:HSt,bounds:OO,refblocks:Gve,circles:ISt}=IO,LSt=cn({primitives:[...Object.values(HSt),...Object.values(ISt),{type:"text",text:"{REF}",x:0,y:-.2294553499999995},{type:"text",text:"{VAL}",x:0,y:.1704553499999995}],ports:[{...Gve.left1,labels:["1"]},{...Gve.right1,labels:["2"]}],size:{width:OO.width,height:OO.height},center:{x:OO.centerX,y:OO.centerY}}).rotateRightFacingSymbol("left").labelPort("left",["1"]).labelPort("right",["2"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),{paths:OSt,bounds:FO,refblocks:Yve,circles:FSt}=IO,BSt=cn({primitives:[...Object.values(OSt),...Object.values(FSt),{type:"text",text:"{REF}",x:0,y:.2294553499999995},{type:"text",text:"{VAL}",x:0,y:-.1704553499999995}],ports:[{...Yve.left1,labels:["1"]},{...Yve.right1,labels:["2"]}],size:{width:FO.width,height:FO.height},center:{x:FO.centerX,y:FO.centerY}}).rotateRightFacingSymbol("right").labelPort("left",["1"]).labelPort("right",["2"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),{paths:zSt,bounds:BO,refblocks:qve,circles:VSt}=IO,$St=cn({primitives:[...Object.values(zSt),...Object.values(VSt),{type:"text",text:"{REF}",x:.2,y:-.1404553499999995},{type:"text",text:"{VAL}",x:-.2,y:-.1494553499999995}],ports:[{...qve.left1,labels:["1"]},{...qve.right1,labels:["2"]}],size:{width:BO.width,height:BO.height},center:{x:BO.centerX,y:BO.centerY}}).rotateRightFacingSymbol("up").labelPort("left",["1"]).labelPort("right",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:WSt,bounds:Jve,refblocks:Kve,circles:USt}=HO,XSt=cn({primitives:[...Object.values(WSt),...Object.values(USt),{type:"text",text:"{REF}",x:.16,y:-.2294553499999995},{type:"text",text:"{VAL}",x:-.16,y:-.2294553499999995}],ports:[{...Kve.left1,labels:["1"]},{...Kve.right1,labels:["2"]}],center:{x:Jve.centerX,y:Jve.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").build(),kK={paths:{"horizontal-bar":{type:"path",points:[{x:-.4,y:0},{x:.4,y:0}],color:"primary",fill:!1},"middle-dash-1":{type:"path",points:[{x:0,y:.2},{x:0,y:.07}],color:"primary",fill:!1},"middle-dash-2":{type:"path",points:[{x:0,y:.01},{x:0,y:-.12}],color:"primary",fill:!1},"middle-dash-3":{type:"path",points:[{x:0,y:-.18},{x:0,y:-.31}],color:"primary",fill:!1},"left-vertical":{type:"path",points:[{x:-.25,y:0},{x:-.25,y:-.2}],color:"primary",fill:!1},"right-vertical":{type:"path",points:[{x:.25,y:0},{x:.25,y:-.2}],color:"primary",fill:!1},"left-ground":{type:"path",points:[{x:-.3,y:-.2},{x:-.25,y:-.3},{x:-.2,y:-.2},{x:-.3,y:-.2}],color:"primary",fill:!1},"right-ground":{type:"path",points:[{x:.2,y:-.2},{x:.25,y:-.3},{x:.3,y:-.2},{x:.2,y:-.2}],color:"primary",fill:!1}},refblocks:{left1:{x:-.4,y:0},right1:{x:.4,y:0}},bounds:{centerX:0,centerY:-.02},circles:{}},{paths:jSt,bounds:Qve,refblocks:Zve,circles:GSt}=kK,YSt=cn({primitives:[...Object.values(jSt),...Object.values(GSt),{type:"text",text:"{REF}",x:0,y:.2594553499999995}],ports:[{...Zve.left1,labels:["1"]},{...Zve.right1,labels:["2"]}],center:{x:Qve.centerX,y:Qve.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").build(),{paths:qSt,bounds:e7e,refblocks:t7e,circles:JSt}=kK,n7e=cn({primitives:[...Object.values(qSt),...Object.values(JSt),{type:"text",text:"{REF}",x:0,y:.2594553499999995}],ports:[{...t7e.left1,labels:["1"]},{...t7e.right1,labels:["2"]}],center:{x:e7e.centerX,y:e7e.centerY}}).rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),KSt=cA(n7e),{paths:QSt,bounds:o7e,refblocks:r7e,circles:ZSt}=kK,e8t=cn({primitives:[...Object.values(QSt),...Object.values(ZSt),{type:"text",text:"{REF}",x:0,y:.2594553499999995}],ports:[{...r7e.left1,labels:["1"]},{...r7e.right1,labels:["2"]}],center:{x:o7e.centerX,y:o7e.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_right").build(),zO={paths:{path27:{type:"path",points:[{x:.55,y:.02},{x:.07,y:.02}],color:"primary",fill:!1},path28:{type:"path",points:[{x:-.09,y:.02},{x:-.55,y:.02}],color:"primary",fill:!1},path29:{type:"path",points:[{x:.07,y:.28},{x:.07,y:-.25}],color:"primary",fill:!1},path30:{type:"path",points:[{x:-.09,y:.28},{x:-.09,y:-.25}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.01,y:.42},bottom1:{type:"text",text:"{VAL}",x:0,y:-.42}},refblocks:{left1:{x:-.55,y:.02},right1:{x:.55,y:.02}},bounds:{minX:-.58,maxX:.58,minY:-.42,maxY:.42,width:1.16,height:.84,centerX:0,centerY:0},circles:{}},{paths:t8t,texts:$ro,bounds:VO,refblocks:i7e,circles:n8t}=zO,o8t=cn({primitives:[...Object.values(t8t),...Object.values(n8t),{type:"text",text:"{REF}",x:-.2,y:.115},{type:"text",text:"{VAL}",x:.2,y:.115}],ports:[{...i7e.left1,labels:["1"]},{...i7e.right1,labels:["2"]}],size:{width:VO.width,height:VO.height},center:{x:VO.centerX,y:VO.centerY}}).changeTextAnchor("{VAL}","top_left").rotateRightFacingSymbol("down").labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{REF}","bottom_left").build(),r8t=cn(zO).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["2","neg"]).labelPort("right1",["1","pos"]).changeTextAnchor("{REF}","middle_bottom").build(),$O={paths:{"path27-5":{type:"path",points:[{x:.45,y:.02},{x:0,y:.02}],color:"primary",fill:!1},"path28-5":{type:"path",points:[{x:-.09,y:.02},{x:-.54,y:.02}],color:"primary",fill:!1},"path30-7":{type:"path",points:[{x:0,y:.28},{x:0,y:-.25}],color:"primary",fill:!1},path8704:{type:"path",points:[{x:-.14,y:-.24},{x:-.14,y:-.24},{x:-.14,y:-.24},{x:-.14,y:-.24},{x:-.14,y:-.24},{x:-.14,y:-.24},{x:-.14,y:-.24},{x:-.14,y:-.24},{x:-.14,y:-.24},{x:-.14,y:-.23},{x:-.14,y:-.23},{x:-.14,y:-.23},{x:-.14,y:-.23},{x:-.13,y:-.23},{x:-.13,y:-.23},{x:-.13,y:-.23},{x:-.13,y:-.23},{x:-.13,y:-.22},{x:-.13,y:-.22},{x:-.13,y:-.22},{x:-.13,y:-.22},{x:-.13,y:-.22},{x:-.13,y:-.22},{x:-.13,y:-.22},{x:-.13,y:-.22},{x:-.13,y:-.21},{x:-.13,y:-.21},{x:-.13,y:-.21},{x:-.12,y:-.21},{x:-.12,y:-.21},{x:-.12,y:-.21},{x:-.12,y:-.21},{x:-.12,y:-.21},{x:-.12,y:-.2},{x:-.12,y:-.2},{x:-.12,y:-.2},{x:-.12,y:-.2},{x:-.12,y:-.2},{x:-.12,y:-.2},{x:-.12,y:-.2},{x:-.12,y:-.2},{x:-.12,y:-.19},{x:-.12,y:-.19},{x:-.12,y:-.19},{x:-.12,y:-.19},{x:-.11,y:-.19},{x:-.11,y:-.19},{x:-.11,y:-.19},{x:-.11,y:-.18},{x:-.11,y:-.18},{x:-.11,y:-.18},{x:-.11,y:-.18},{x:-.11,y:-.18},{x:-.11,y:-.18},{x:-.11,y:-.18},{x:-.11,y:-.18},{x:-.11,y:-.17},{x:-.11,y:-.17},{x:-.11,y:-.17},{x:-.11,y:-.17},{x:-.11,y:-.17},{x:-.11,y:-.17},{x:-.11,y:-.17},{x:-.11,y:-.17},{x:-.1,y:-.16},{x:-.1,y:-.16},{x:-.1,y:-.16},{x:-.1,y:-.16},{x:-.1,y:-.16},{x:-.1,y:-.16},{x:-.1,y:-.16},{x:-.1,y:-.16},{x:-.1,y:-.15},{x:-.1,y:-.15},{x:-.1,y:-.15},{x:-.1,y:-.15},{x:-.1,y:-.15},{x:-.1,y:-.15},{x:-.1,y:-.15},{x:-.1,y:-.14},{x:-.1,y:-.14},{x:-.1,y:-.14},{x:-.1,y:-.14},{x:-.1,y:-.14},{x:-.1,y:-.14},{x:-.1,y:-.14},{x:-.09,y:-.14},{x:-.09,y:-.13},{x:-.09,y:-.13},{x:-.09,y:-.13},{x:-.09,y:-.13},{x:-.09,y:-.13},{x:-.09,y:-.13},{x:-.09,y:-.13},{x:-.09,y:-.13},{x:-.09,y:-.12},{x:-.09,y:-.12},{x:-.09,y:-.12},{x:-.09,y:-.12},{x:-.09,y:-.12},{x:-.09,y:-.12},{x:-.09,y:-.12},{x:-.09,y:-.12},{x:-.09,y:-.11},{x:-.09,y:-.11},{x:-.09,y:-.11},{x:-.09,y:-.11},{x:-.09,y:-.11},{x:-.09,y:-.11},{x:-.09,y:-.1},{x:-.09,y:-.1},{x:-.09,y:-.1},{x:-.09,y:-.1},{x:-.09,y:-.1},{x:-.09,y:-.1},{x:-.08,y:-.09},{x:-.08,y:-.09},{x:-.08,y:-.09},{x:-.08,y:-.09},{x:-.08,y:-.09},{x:-.08,y:-.09},{x:-.08,y:-.08},{x:-.08,y:-.08},{x:-.08,y:-.08},{x:-.08,y:-.08},{x:-.08,y:-.08},{x:-.08,y:-.08},{x:-.08,y:-.07},{x:-.08,y:-.07},{x:-.08,y:-.07},{x:-.08,y:-.07},{x:-.08,y:-.07},{x:-.08,y:-.07},{x:-.08,y:-.06},{x:-.08,y:-.06},{x:-.08,y:-.06},{x:-.08,y:-.06},{x:-.08,y:-.06},{x:-.08,y:-.05},{x:-.08,y:-.05},{x:-.08,y:-.05},{x:-.08,y:-.05},{x:-.08,y:-.05},{x:-.08,y:-.05},{x:-.08,y:-.04},{x:-.08,y:-.04},{x:-.08,y:-.04},{x:-.08,y:-.04},{x:-.08,y:-.04},{x:-.08,y:-.04},{x:-.08,y:-.03},{x:-.08,y:-.03},{x:-.08,y:-.03},{x:-.08,y:-.03},{x:-.08,y:-.03},{x:-.08,y:-.03},{x:-.08,y:-.02},{x:-.08,y:-.02},{x:-.08,y:-.02},{x:-.08,y:-.02},{x:-.08,y:-.02},{x:-.08,y:-.02},{x:-.08,y:-.01},{x:-.08,y:-.01},{x:-.08,y:-.01},{x:-.08,y:-.01},{x:-.08,y:-.01},{x:-.08,y:0},{x:-.08,y:0},{x:-.08,y:0},{x:-.08,y:0},{x:-.08,y:0},{x:-.08,y:0},{x:-.08,y:.01},{x:-.07,y:.01},{x:-.07,y:.01},{x:-.07,y:.01},{x:-.07,y:.01},{x:-.07,y:.01},{x:-.08,y:.02},{x:-.08,y:.02},{x:-.08,y:.02},{x:-.08,y:.02},{x:-.08,y:.02},{x:-.08,y:.02},{x:-.08,y:.03},{x:-.08,y:.03},{x:-.08,y:.03},{x:-.08,y:.03},{x:-.08,y:.03},{x:-.08,y:.03},{x:-.08,y:.04},{x:-.08,y:.04},{x:-.08,y:.04},{x:-.08,y:.04},{x:-.08,y:.04},{x:-.08,y:.05},{x:-.08,y:.05},{x:-.08,y:.05},{x:-.08,y:.05},{x:-.08,y:.05},{x:-.08,y:.05},{x:-.08,y:.06},{x:-.08,y:.06},{x:-.08,y:.06},{x:-.08,y:.06},{x:-.08,y:.06},{x:-.08,y:.06},{x:-.08,y:.06},{x:-.08,y:.06},{x:-.08,y:.07},{x:-.08,y:.07},{x:-.08,y:.07},{x:-.08,y:.07},{x:-.08,y:.07},{x:-.08,y:.07},{x:-.08,y:.07},{x:-.08,y:.08},{x:-.08,y:.08},{x:-.08,y:.08},{x:-.08,y:.08},{x:-.08,y:.08},{x:-.08,y:.08},{x:-.08,y:.09},{x:-.08,y:.09},{x:-.08,y:.09},{x:-.08,y:.09},{x:-.08,y:.09},{x:-.08,y:.09},{x:-.08,y:.09},{x:-.08,y:.1},{x:-.08,y:.1},{x:-.08,y:.1},{x:-.08,y:.1},{x:-.08,y:.1},{x:-.08,y:.1},{x:-.08,y:.1},{x:-.08,y:.11},{x:-.08,y:.11},{x:-.08,y:.11},{x:-.08,y:.11},{x:-.08,y:.11},{x:-.08,y:.11},{x:-.08,y:.11},{x:-.08,y:.12},{x:-.08,y:.12},{x:-.08,y:.12},{x:-.08,y:.12},{x:-.09,y:.12},{x:-.09,y:.12},{x:-.09,y:.12},{x:-.09,y:.13},{x:-.09,y:.13},{x:-.09,y:.13},{x:-.09,y:.13},{x:-.09,y:.13},{x:-.09,y:.13},{x:-.09,y:.14},{x:-.09,y:.14},{x:-.09,y:.14},{x:-.09,y:.14},{x:-.09,y:.14},{x:-.09,y:.14},{x:-.09,y:.14},{x:-.09,y:.15},{x:-.09,y:.15},{x:-.09,y:.15},{x:-.09,y:.15},{x:-.09,y:.15},{x:-.09,y:.15},{x:-.09,y:.15},{x:-.09,y:.16},{x:-.09,y:.16},{x:-.09,y:.16},{x:-.09,y:.16},{x:-.09,y:.16},{x:-.09,y:.16},{x:-.09,y:.16},{x:-.09,y:.17},{x:-.09,y:.17},{x:-.1,y:.17},{x:-.1,y:.17},{x:-.1,y:.17},{x:-.1,y:.17},{x:-.1,y:.17},{x:-.1,y:.18},{x:-.1,y:.18},{x:-.1,y:.18},{x:-.1,y:.18},{x:-.1,y:.18},{x:-.1,y:.18},{x:-.1,y:.18},{x:-.1,y:.19},{x:-.1,y:.19},{x:-.1,y:.19},{x:-.1,y:.19},{x:-.1,y:.19},{x:-.1,y:.19},{x:-.1,y:.19},{x:-.1,y:.2},{x:-.1,y:.2},{x:-.1,y:.2},{x:-.1,y:.2},{x:-.1,y:.2},{x:-.1,y:.2},{x:-.11,y:.2},{x:-.11,y:.2},{x:-.11,y:.2},{x:-.11,y:.21},{x:-.11,y:.21},{x:-.11,y:.21},{x:-.11,y:.21},{x:-.11,y:.21},{x:-.11,y:.21},{x:-.11,y:.21},{x:-.11,y:.21},{x:-.11,y:.21},{x:-.11,y:.21},{x:-.11,y:.21},{x:-.11,y:.21},{x:-.11,y:.21},{x:-.11,y:.22},{x:-.11,y:.22},{x:-.11,y:.22},{x:-.11,y:.22},{x:-.11,y:.22},{x:-.11,y:.22},{x:-.11,y:.22},{x:-.11,y:.22},{x:-.11,y:.22},{x:-.11,y:.22},{x:-.11,y:.22},{x:-.11,y:.22},{x:-.11,y:.23},{x:-.11,y:.23},{x:-.11,y:.23},{x:-.11,y:.23},{x:-.12,y:.23},{x:-.12,y:.23},{x:-.12,y:.23},{x:-.12,y:.23},{x:-.12,y:.23},{x:-.12,y:.23},{x:-.12,y:.23},{x:-.12,y:.23},{x:-.12,y:.24},{x:-.12,y:.24},{x:-.12,y:.24},{x:-.12,y:.24},{x:-.12,y:.24},{x:-.12,y:.24},{x:-.12,y:.24},{x:-.12,y:.24},{x:-.12,y:.24},{x:-.12,y:.24},{x:-.12,y:.24},{x:-.12,y:.24},{x:-.12,y:.25},{x:-.12,y:.25},{x:-.12,y:.25},{x:-.12,y:.25},{x:-.12,y:.25},{x:-.12,y:.25},{x:-.13,y:.25},{x:-.13,y:.25},{x:-.13,y:.25},{x:-.13,y:.25},{x:-.13,y:.25},{x:-.13,y:.25},{x:-.13,y:.25},{x:-.13,y:.26},{x:-.13,y:.26},{x:-.13,y:.26},{x:-.13,y:.26},{x:-.13,y:.26},{x:-.13,y:.26},{x:-.13,y:.26},{x:-.13,y:.26},{x:-.13,y:.26},{x:-.13,y:.26},{x:-.13,y:.26},{x:-.13,y:.26},{x:-.13,y:.26},{x:-.13,y:.27},{x:-.13,y:.27},{x:-.13,y:.27},{x:-.13,y:.27},{x:-.14,y:.27},{x:-.14,y:.27},{x:-.14,y:.27},{x:-.14,y:.27},{x:-.14,y:.27},{x:-.14,y:.27},{x:-.14,y:.27},{x:-.14,y:.27},{x:-.14,y:.27},{x:-.14,y:.28},{x:-.14,y:.28},{x:-.14,y:.28},{x:-.14,y:.28},{x:-.14,y:.28},{x:-.14,y:.28},{x:-.14,y:.28},{x:-.14,y:.28},{x:-.14,y:.28}],color:"primary",fill:!1},"rect1577-4":{type:"path",points:[{x:.26,y:.25},{x:.12,y:.25},{x:.12,y:.25},{x:.26,y:.25}],color:"primary",fill:!0},"rect1577-4-7":{type:"path",points:[{x:.2,y:.32},{x:.2,y:.18},{x:.19,y:.18},{x:.19,y:.32}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.01,y:.42},bottom1:{type:"text",text:"{VAL}",x:0,y:-.42}},refblocks:{left1:{x:-.54,y:.02},right1:{x:.45,y:.02}},bounds:{minX:-.58,maxX:.58,minY:-.42,maxY:.42,width:1.16,height:.84,centerX:0,centerY:0},circles:{}},{paths:i8t,texts:Wro,bounds:WO,refblocks:s7e,circles:s8t}=$O,a8t=cn({primitives:[...Object.values(i8t),...Object.values(s8t),{type:"text",text:"{REF}",x:.1,y:-.2094553499999995},{type:"text",text:"{VAL}",x:-.2,y:-.2094553499999995}],ports:[{...s7e.left1,labels:["2","neg"]},{...s7e.right1,labels:["1","pos"]}],size:{width:WO.width,height:WO.height},center:{x:WO.centerX,y:WO.centerY}}).changeTextAnchor("{VAL}","top_left").rotateRightFacingSymbol("up").changeTextAnchor("{REF}","bottom_left").build(),c8t=cn($O).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["2","neg"]).labelPort("right1",["1","pos"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:l8t,texts:Uro,bounds:UO,refblocks:a7e,circles:u8t}=$O,_8t=cn({primitives:[...Object.values(l8t),...Object.values(u8t),{type:"text",text:"{REF}",x:0,y:-.4094553499999995},{type:"text",text:"{VAL}",x:-0,y:.4094553499999995}],ports:[{...a7e.left1,labels:["2","neg"]},{...a7e.right1,labels:["1","pos"]}],size:{width:UO.width,height:UO.height},center:{x:UO.centerX,y:UO.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("left").changeTextAnchor("{REF}","middle_bottom").build(),{paths:d8t,texts:Xro,bounds:XO,refblocks:c7e,circles:h8t}=$O,m8t=cn({primitives:[...Object.values(d8t),...Object.values(h8t),{type:"text",text:"{REF}",x:-.2,y:.2094553499999995},{type:"text",text:"{VAL}",x:.3,y:.2094553499999995}],ports:[{...c7e.left1,labels:["2","neg"]},{...c7e.right1,labels:["1","pos"]}],size:{width:XO.width,height:XO.height},center:{x:XO.centerX,y:XO.centerY}}).changeTextAnchor("{VAL}","top_left").rotateRightFacingSymbol("down").changeTextAnchor("{REF}","bottom_left").build(),p8t=cn(zO).rotateRightFacingSymbol("right").changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:f8t,texts:jro,bounds:jO,refblocks:l7e,circles:x8t}=zO,g8t=cn({primitives:[...Object.values(f8t),...Object.values(x8t),{type:"text",text:"{REF}",x:.2,y:-.095},{type:"text",text:"{VAL}",x:-.2,y:-.095}],ports:[{...l7e.left1,labels:["1"]},{...l7e.right1,labels:["2"]}],size:{width:jO.width,height:jO.height},center:{x:jO.centerX,y:jO.centerY}}).changeTextAnchor("{VAL}","top_left").rotateRightFacingSymbol("up").labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{REF}","bottom_left").build(),ZC={paths:{path11:{type:"path",points:[{x:-.54,y:.03},{x:-.3,y:.03}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.29,y:.03},{x:.54,y:.03}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.29,y:.29},{x:.29,y:-.23}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.02,y:.37},bottom1:{type:"text",text:"{VAL}",x:-.01,y:-.37}},refblocks:{left1:{x:-.54,y:.03},right1:{x:.54,y:.03}},bounds:{minX:-.57,maxX:.57,minY:-.37,maxY:.37,width:1.14,height:.74,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:.04,radius:.29,color:"primary",fill:!1}}},{paths:y8t,texts:Gro,bounds:GO,refblocks:u7e,circles:b8t}=ZC,P8t=cn({primitives:[...Object.values(y8t),...Object.values(b8t),{type:"text",text:"{REF}",x:-.15,y:.3894553499999995},{type:"text",text:"{VAL}",x:.15,y:.3894553499999995}],ports:[{...u7e.left1,labels:["1"]},{...u7e.right1,labels:["2"]}],size:{width:GO.width,height:GO.height},center:{x:GO.centerX,y:GO.centerY}}).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),v8t=cn(ZC).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:S8t,texts:Yro,bounds:YO,refblocks:_7e,circles:C8t}=ZC,M8t=cn({primitives:[...Object.values(S8t),...Object.values(C8t),{type:"text",text:"{REF}",x:-0,y:-.2894553499999995},{type:"text",text:"{VAL}",x:0,y:.3894553499999995}],ports:[{..._7e.left1,labels:["1"]},{..._7e.right1,labels:["2"]}],size:{width:YO.width,height:YO.height},center:{x:YO.centerX,y:YO.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),T8t=cn(ZC).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1","neg"]).labelPort("right1",["2","pos"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:w8t,texts:qro,bounds:qO,refblocks:d7e,circles:E8t}=ZC,D8t=cn({primitives:[...Object.values(w8t),...Object.values(E8t),{type:"text",text:"{REF}",x:.15,y:-.2894553499999995},{type:"text",text:"{VAL}",x:-.15,y:-.2894553499999995}],ports:[{...d7e.left1,labels:["1"]},{...d7e.right1,labels:["2"]}],size:{width:qO.width,height:qO.height},center:{x:qO.centerX,y:qO.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:A8t,texts:Jro,bounds:JO,refblocks:h7e,circles:R8t}=ZC,k8t=cn({primitives:[...Object.values(A8t),...Object.values(R8t),{type:"text",text:"{REF}",x:.15,y:-.2894553499999995},{type:"text",text:"{VAL}",x:-.15,y:-.2894553499999995}],ports:[{...h7e.left1,labels:["1"]},{...h7e.right1,labels:["2"]}],size:{width:JO.width,height:JO.height},center:{x:JO.centerX,y:JO.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),KO={paths:{path27:{type:"path",points:[{x:.54,y:-.01},{x:.13,y:-.01}],color:"primary",fill:!1},path29:{type:"path",points:[{x:.13,y:.25},{x:.13,y:-.27}],color:"primary",fill:!1},"path29-2":{type:"path",points:[{x:.07,y:.25},{x:.07,y:-.28}],color:"primary",fill:!1},path30:{type:"path",points:[{x:-.14,y:.25},{x:-.14,y:-.27}],color:"primary",fill:!1},"path29-5":{type:"path",points:[{x:-.08,y:.26},{x:-.08,y:-.27}],color:"primary",fill:!1},"path29-2-7":{type:"path",points:[{x:.07,y:.26},{x:-.08,y:.26}],color:"primary",fill:!1},"path29-2-7-6":{type:"path",points:[{x:.07,y:-.28},{x:-.08,y:-.28}],color:"primary",fill:!1},path43:{type:"path",points:[{x:-.21,y:.32},{x:.2,y:.32}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:0,y:.71},{x:0,y:.33},{x:0,y:.32}],color:"primary",fill:!1},"path43-8":{type:"path",points:[{x:-.21,y:.32},{x:-.21,y:.25}],color:"primary",fill:!1},"path43-8-8":{type:"path",points:[{x:.2,y:.32},{x:.2,y:.25}],color:"primary",fill:!1},"path43-9":{type:"path",points:[{x:.19,y:-.35},{x:-.22,y:-.35}],color:"primary",fill:!1},"path44-0-5":{type:"path",points:[{x:-.02,y:-.71},{x:-.02,y:-.36},{x:-.02,y:-.35}],color:"primary",fill:!1},"path43-8-1":{type:"path",points:[{x:.19,y:-.35},{x:.19,y:-.28}],color:"primary",fill:!1},"path43-8-8-9":{type:"path",points:[{x:-.22,y:-.35},{x:-.22,y:-.28}],color:"primary",fill:!1},path28:{type:"path",points:[{x:-.14,y:-.01},{x:-.54,y:-.01}],color:"primary",fill:!1}},texts:{left1:{type:"text",text:"{REF}",x:.53,y:.28},right1:{type:"text",text:"{VAL}",x:.54,y:-.28}},refblocks:{top1:{x:0,y:.71},bottom1:{x:-.02,y:-.71},left1:{x:-.54,y:-.01},right1:{x:.54,y:-.01}},bounds:{minX:-.57,maxX:.57,minY:-.74,maxY:.74,width:1.14,height:1.48,centerX:0,centerY:0},circles:{}},{paths:N8t,texts:Kro,bounds:QO,refblocks:ZO,circles:H8t}=KO,I8t=cn({primitives:[...Object.values(N8t),...Object.values(H8t),{type:"text",text:"{REF}",x:-.4,y:.4094554499999995},{type:"text",text:"{VAL}",x:.4,y:.4094553499999995}],ports:[{...ZO.left1,labels:["1"]},{...ZO.right1,labels:["3"]},{...ZO.bottom1,labels:["2"]},{...ZO.top1,labels:["4"]}],size:{width:QO.width,height:QO.height},center:{x:QO.centerX,y:QO.centerY}}).rotateRightFacingSymbol("down").changeTextAnchor("{REF}","bottom_left").changeTextAnchor("{VAL}","top_left").build(),L8t=cn(KO).labelPort("top1",["2","gnd1"]).labelPort("bottom1",["4","gnd2"]).labelPort("left1",["3"]).labelPort("right1",["1"]).changeTextAnchor("{REF}","bottom_left").changeTextAnchor("{VAL}","top_left").build(),O8t=cn(KO).labelPort("top1",["4","gnd1"]).labelPort("bottom1",["2","gnd2"]).labelPort("left1",["1"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","bottom_left").changeTextAnchor("{VAL}","top_left").build(),{paths:F8t,texts:Qro,bounds:eF,refblocks:tF,circles:B8t}=KO,z8t=cn({primitives:[...Object.values(F8t),...Object.values(B8t),{type:"text",text:"{VAL}",x:-.4,y:-.4094554499999995},{type:"text",text:"{REF}",x:.4,y:-.4094553499999995}],ports:[{...tF.left1,labels:["1"]},{...tF.right1,labels:["3"]},{...tF.bottom1,labels:["2"]},{...tF.top1,labels:["4"]}],size:{width:eF.width,height:eF.height},center:{x:eF.centerX,y:eF.centerY}}).rotateRightFacingSymbol("up").changeTextAnchor("{REF}","bottom_left").changeTextAnchor("{VAL}","top_left").build(),nF={paths:{path27:{type:"path",points:[{x:.55,y:-.01},{x:.13,y:-.01}],color:"primary",fill:!1},path28:{type:"path",points:[{x:-.14,y:-.01},{x:-.55,y:-.01}],color:"primary",fill:!1},path29:{type:"path",points:[{x:.13,y:-.28},{x:.13,y:.25}],color:"primary",fill:!1},"path29-2":{type:"path",points:[{x:.07,y:-.28},{x:.07,y:.25}],color:"primary",fill:!1},path30:{type:"path",points:[{x:-.14,y:-.28},{x:-.14,y:.25}],color:"primary",fill:!1},"path29-5":{type:"path",points:[{x:-.08,y:-.28},{x:-.08,y:.25}],color:"primary",fill:!1},"path29-2-7":{type:"path",points:[{x:.07,y:-.28},{x:-.08,y:-.28}],color:"primary",fill:!1},"path29-2-7-6":{type:"path",points:[{x:.07,y:.26},{x:-.08,y:.26}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{VAL}",x:-.01,y:-.42},bottom1:{type:"text",text:"{REF}",x:0,y:.43}},refblocks:{left1:{x:-.55,y:-.01},right1:{x:.55,y:-.01}},bounds:{minX:-.58,maxX:.58,minY:-.52,maxY:.43,width:1.16,height:1,centerX:0,centerY:-.04},circles:{}},{paths:V8t,texts:Zro,bounds:oF,refblocks:m7e,circles:$8t}=nF,W8t=cn({primitives:[...Object.values(V8t),...Object.values($8t),{type:"text",text:"{REF}",x:-.3,y:.3094553499999995},{type:"text",text:"{VAL}",x:.3,y:.3094553499999995}],ports:[{...m7e.left1,labels:["1"]},{...m7e.right1,labels:["2"]}],size:{width:oF.width,height:oF.height},center:{x:oF.centerX,y:oF.centerY}}).changeTextAnchor("{VAL}","top_left").rotateRightFacingSymbol("down").labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{REF}","bottom_left").build(),U8t=cn(nF).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["2","neg"]).labelPort("right1",["1","pos"]).changeTextAnchor("{REF}","middle_bottom").build(),X8t=cn(nF).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:j8t,texts:eio,bounds:rF,refblocks:p7e,circles:G8t}=nF,Y8t=cn({primitives:[...Object.values(j8t),...Object.values(G8t),{type:"text",text:"{REF}",x:.3,y:-.3094553499999995},{type:"text",text:"{VAL}",x:-.3,y:-.3094553499999995}],ports:[{...p7e.left1,labels:["1"]},{...p7e.right1,labels:["2"]}],size:{width:rF.width,height:rF.height},center:{x:rF.centerX,y:rF.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("up").labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{REF}","bottom_left").build(),eM={paths:{path11:{type:"path",points:[{x:1.99,y:-1.64},{x:2.1,y:-1.64}],color:"primary",fill:!1},"path40-0":{type:"path",points:[{x:2.1,y:-1.48},{x:2.1,y:-1.8}],color:"primary",fill:!1},"path40-0-5":{type:"path",points:[{x:2.22,y:-1.5},{x:2.11,y:-1.58}],color:"primary",fill:!1},"path40-0-5-0":{type:"path",points:[{x:2.23,y:-1.78},{x:2.11,y:-1.7}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:2.23,y:-1.49},{x:2.23,y:-1.14}],color:"primary",fill:!1},"path12-1-5-3":{type:"path",points:[{x:2.23,y:-1.97},{x:2.23,y:-1.79}],color:"primary",fill:!1},"arrow-2":{type:"path",points:[{x:2.17,y:-1.7},{x:2.13,y:-1.76},{x:2.19,y:-1.76},{x:2.17,y:-1.7}],color:"primary",fill:!0},path1:{type:"path",points:[{x:1.6,y:-1.5},{x:1.86,y:-1.5}],color:"primary",fill:!1},path2:{type:"path",points:[{x:1.87,y:-1.34},{x:1.87,y:-1.66}],color:"primary",fill:!1},path3:{type:"path",points:[{x:1.99,y:-1.36},{x:1.87,y:-1.44}],color:"primary",fill:!1},path4:{type:"path",points:[{x:1.99,y:-1.64},{x:1.88,y:-1.56}],color:"primary",fill:!1},"arrow-1":{type:"path",points:[{x:1.94,y:-1.56},{x:1.89,y:-1.62},{x:1.96,y:-1.62},{x:1.94,y:-1.56}],color:"primary",fill:!0},path9:{type:"path",points:[{x:1.99,y:-1.35},{x:2.23,y:-1.36}],color:"primary",fill:!1}},texts:{bottom1:{type:"text",text:"{VAL}",x:1.88,y:-1.94},right1:{type:"text",text:"{REF}",x:1.88,y:-1.14}},refblocks:{right1:{x:2.23,y:-1.97},right2:{x:1.6,y:-1.5},right3:{x:2.23,y:-1.14}},bounds:{minX:1.58,maxX:2.35,minY:-1.98,maxY:-1.12,width:.77,height:.86,centerX:1.96,centerY:-1.55},circles:{"path1-0":{type:"circle",x:2.05,y:-1.54,radius:.3,color:"primary",fill:!1}}},q8t=cn(eM).rotateRightFacingSymbol("down").labelPort("right2",["1"]).labelPort("right1",["2"]).labelPort("right3",["3"]).changeTextAnchor("{VAL}","middle_left",{x:.8,y:-.15}).changeTextAnchor("{REF}","middle_left",{x:0,y:.15}).build(),J8t=cn(eM).rotateRightFacingSymbol("right").labelPort("right2",["1"]).labelPort("right1",["2"]).labelPort("right3",["3"]).changeTextAnchor("{VAL}","middle_right").changeTextAnchor("{REF}","middle_right").build(),K8t=cn(eM).rotateRightFacingSymbol("left").labelPort("right2",["1"]).labelPort("right1",["2"]).labelPort("right3",["3"]).changeTextAnchor("{VAL}","middle_left",{x:0,y:-.8}).changeTextAnchor("{REF}","middle_left",{x:0,y:.8}).build(),Q8t=cn(eM).rotateRightFacingSymbol("right").labelPort("right2",["1"]).labelPort("right1",["2"]).labelPort("right3",["3"]).changeTextAnchor("{VAL}","middle_right").changeTextAnchor("{REF}","middle_right").build(),Z8t=cn(eM).rotateRightFacingSymbol("up").labelPort("right2",["1"]).labelPort("right1",["2"]).labelPort("right3",["3"]).changeTextAnchor("{VAL}","middle_left",{x:0,y:-.15}).changeTextAnchor("{REF}","middle_left",{x:.8,y:.15}).build(),eCt=cn(eM).rotateRightFacingSymbol("up").labelPort("right2",["1"]).labelPort("right1",["2"]).labelPort("right3",["3"]).changeTextAnchor("{VAL}","middle_left",{x:0,y:-.15}).changeTextAnchor("{REF}","middle_left",{x:.8,y:.15}).build(),tCt={paths:{path11:{type:"path",points:[{x:-.54,y:0},{x:-.3,y:0}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.29,y:0},{x:.54,y:0}],color:"primary",fill:!1},path2:{type:"path",points:[{x:-.12,y:.09},{x:.12,y:.09}],color:"primary",fill:!1}},texts:{left1:{type:"text",text:"A",x:0,y:-.1}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:0}},bounds:{width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:0,radius:.29,color:"primary",fill:!1}}},{paths:nCt,texts:oCt,bounds:iF,refblocks:f7e,circles:rCt}=tCt,NK=za({primitives:[...Object.values(nCt),...Object.values(rCt),{type:"text",text:"{REF}",x:0,y:-.3594553499999995,anchor:"middle_top"},{type:"text",text:"{VAL}",x:0,y:.35,anchor:"middle_bottom"},{...oCt.left1,x:0,y:.01,anchor:"center",fontSize:.3}],ports:[{...f7e.left1,labels:["1"]},{...f7e.right1,labels:["2"]}],size:{width:iF.width,height:iF.height},center:{x:iF.centerX,y:iF.centerY}});function iCt(t){return typeof t=="object"&&t!==null&&t.type==="path"&&Array.isArray(t.points)&&typeof t.color=="string"}function sCt(t){return typeof t=="object"&&t!==null&&t.type==="text"&&typeof t.text=="string"&&typeof t.x=="number"&&typeof t.y=="number"&&typeof t.anchor=="string"}var{6:HK,2:IK,...aCt}=NK.primitives;iCt(IK)&&IK.points.map(t=>{t.y+=.05}),sCt(HK)&&(HK.y+=.025);function cCt(t){return typeof t=="object"}var x7e=ro({...NK,primitives:Object.values(aCt).filter(cCt)}),lCt={...x7e,primitives:[...x7e.primitives,HK,IK]},tM={paths:{path11:{type:"path",points:[{x:-.54,y:.03},{x:-.3,y:.04}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.29,y:.04},{x:.54,y:.04}],color:"primary",fill:!1},"path11-5-5":{type:"path",points:[{x:.1,y:.13},{x:0,y:-.06},{x:-.11,y:.13}],color:"primary",fill:!1},path2:{type:"path",points:[{x:-.12,y:-.14},{x:.12,y:-.14}],color:"primary",fill:!1}},refblocks:{left1:{x:-.54,y:.03},right1:{x:.54,y:.04}},bounds:{width:1.14,height:.79,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:.04,radius:.29,color:"primary",fill:!1}}},{paths:uCt,bounds:sF,refblocks:g7e,circles:_Ct}=tM,dCt=cn({primitives:[...Object.values(uCt),...Object.values(_Ct),{type:"text",text:"{REF}",x:-.15,y:.3894553499999995},{type:"text",text:"{VAL}",x:.15,y:.3894553499999995}],ports:[{...g7e.left1,labels:["1"]},{...g7e.right1,labels:["2"]}],size:{width:sF.width,height:sF.height},center:{x:sF.centerX,y:sF.centerY}}).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:hCt,bounds:aF,refblocks:y7e,circles:mCt}=tM,pCt=cn({primitives:[...Object.values(hCt),...Object.values(mCt),{type:"text",text:"{REF}",x:-0,y:.3894553499999995},{type:"text",text:"{VAL}",x:0,y:-.3294553499999995}],ports:[{...y7e.left1,labels:["1"]},{...y7e.right1,labels:["2"]}],size:{width:aF.width,height:aF.height},center:{x:aF.centerX,y:aF.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:fCt,bounds:cF,refblocks:b7e,circles:xCt}=tM,gCt=cn({primitives:[...Object.values(fCt),...Object.values(xCt),{type:"text",text:"{REF}",x:-0,y:-.3294553499999995},{type:"text",text:"{VAL}",x:0,y:.4294553499999995}],ports:[{...b7e.left1,labels:["1"]},{...b7e.right1,labels:["2"]}],size:{width:cF.width,height:cF.height},center:{x:cF.centerX,y:cF.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:yCt,bounds:lF,refblocks:P7e,circles:bCt}=tM,PCt=cn({primitives:[...Object.values(yCt),...Object.values(bCt),{type:"text",text:"{REF}",x:-0,y:.3894553499999995},{type:"text",text:"{VAL}",x:0,y:-.3294553499999995}],ports:[{...P7e.left1,labels:["1"]},{...P7e.right1,labels:["2"]}],size:{width:lF.width,height:lF.height},center:{x:lF.centerX,y:lF.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:vCt,bounds:uF,refblocks:v7e,circles:SCt}=tM,CCt=cn({primitives:[...Object.values(vCt),...Object.values(SCt),{type:"text",text:"{REF}",x:.15,y:-.2894553499999995},{type:"text",text:"{VAL}",x:-.15,y:-.2894553499999995}],ports:[{...v7e.left1,labels:["1"]},{...v7e.right1,labels:["2"]}],size:{width:uF.width,height:uF.height},center:{x:uF.centerX,y:uF.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:MCt,bounds:_F,refblocks:S7e,circles:TCt}=tM,wCt=cn({primitives:[...Object.values(MCt),...Object.values(TCt),{type:"text",text:"{REF}",x:.15,y:-.2894553499999995},{type:"text",text:"{VAL}",x:-.15,y:-.2894553499999995}],ports:[{...S7e.left1,labels:["1"]},{...S7e.right1,labels:["2"]}],size:{width:_F.width,height:_F.height},center:{x:_F.centerX,y:_F.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),nM={paths:{path11:{type:"path",points:[{x:-.54,y:.04},{x:-.11,y:.04}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.1,y:.04},{x:.54,y:.04}],color:"primary",fill:!1},"path11-0":{type:"path",points:[{x:-.09,y:-.15},{x:-.09,y:.26}],color:"primary",fill:!1},"path11-0-3":{type:"path",points:[{x:.09,y:-.15},{x:.09,y:.26}],color:"primary",fill:!1},"path11-0-9":{type:"path",points:[{x:-.08,y:.06},{x:-.08,y:-.15},{x:.09,y:-.05},{x:-.08,y:.06}],color:"primary",fill:!0},"path11-0-9-0":{type:"path",points:[{x:.08,y:.26},{x:.08,y:.05},{x:-.09,y:.15},{x:.07,y:.26}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.03,y:.42},bottom1:{type:"text",text:"{VAL}",x:-.03,y:-.42}},refblocks:{left1:{x:-.54,y:.04},right1:{x:.54,y:.04}},bounds:{minX:-.57,maxX:.57,minY:-.42,maxY:.42,width:1.14,height:.83,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:.05,radius:.29,color:"primary",fill:!1}}},ECt=cn(nM).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left",{x:-.03,y:.2}).changeTextAnchor("{VAL}","middle_left",{x:.8,y:-.2}).build(),DCt=cn(nM).rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom",{x:0,y:.1}).changeTextAnchor("{VAL}","middle_top").build(),ACt=cn(nM).rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom",{x:0,y:.8}).changeTextAnchor("{VAL}","middle_top",{x:0,y:-.9}).build(),RCt=cn(nM).rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom",{x:0,y:.1}).changeTextAnchor("{VAL}","middle_top").build(),kCt=cn(nM).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left",{x:.7,y:.2}).changeTextAnchor("{VAL}","middle_left",{x:-.13,y:-.2}).build(),NCt=cn(nM).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left",{x:.7,y:.2}).changeTextAnchor("{VAL}","middle_left",{x:-.13,y:-.2}).build(),dF={paths:{triangle:{type:"path",points:[{x:-.06,y:-.09},{x:-.06,y:.09},{x:.06,y:0},{x:-.06,y:-.09}],color:"primary",fill:!1},stem:{type:"path",points:[{x:-.11,y:0},{x:-.06,y:0}],color:"primary",fill:!1}},refblocks:{left1:{x:-.11,y:0}},bounds:{centerX:0,centerY:0}},{paths:HCt,bounds:C7e,refblocks:ICt}=dF,LCt=cn({primitives:[...Object.values(HCt),{type:"text",text:"{REF}",x:-.13,y:-0}],ports:[{...ICt.left1,labels:["1"]}],center:{x:C7e.centerX,y:C7e.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_top").build(),{paths:OCt,bounds:M7e,refblocks:FCt}=dF,BCt=cn({primitives:[...Object.values(OCt),{type:"text",text:"{REF}",x:-.13,y:0}],ports:[{...FCt.left1,labels:["1"]}],center:{x:M7e.centerX,y:M7e.centerY}}).rotateRightFacingSymbol("right").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_right").build(),{paths:zCt,bounds:T7e,refblocks:VCt}=dF,$Ct=cn({primitives:[...Object.values(zCt),{type:"text",text:"{REF}",x:-.13,y:-0}],ports:[{...VCt.left1,labels:["1"]}],center:{x:T7e.centerX,y:T7e.centerY}}).rotateRightFacingSymbol("left").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_left").build(),{paths:WCt,bounds:w7e,refblocks:UCt}=dF,XCt=cn({primitives:[...Object.values(WCt),{type:"text",text:"{REF}",x:-.13,y:0}],ports:[{...UCt.left1,labels:["1"]}],center:{x:w7e.centerX,y:w7e.centerY}}).rotateRightFacingSymbol("down").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_bottom").build(),jCt={paths:{path40:{type:"path",points:[{x:.14,y:.04},{x:-.12,y:-.09}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.12,y:.18},{x:.14,y:.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.12,y:-.09},{x:-.12,y:.18}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.14,y:.18},{x:.14,y:-.09}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.12,y:.04},{x:-.52,y:.04}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.52,y:.04},{x:.15,y:.04}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.01,y:.27},bottom1:{type:"text",text:"{VAL}",x:0,y:-.27}},refblocks:{left1:{x:-.52,y:.04},right1:{x:.52,y:.04}},bounds:{minX:-.55,maxX:.55,minY:-.27,maxY:.27,width:1.09,height:.55,centerX:0,centerY:0},circles:{}},hF=cn(jCt).labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),GCt=ro(hF,"down"),YCt=ro(hF,"left"),qCt=ro(hF,"up"),JCt={paths:{path1:{type:"path",points:[{x:-.37,y:.22},{x:-.13,y:.22}],color:"primary",fill:!1},"path-1-2":{type:"path",points:[{x:-.07,y:.22},{x:.11,y:.16}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.1,y:.13},{x:.37,y:.13}],color:"primary",fill:!1},path3:{type:"path",points:[{x:.12,y:.36},{x:.37,y:.36}],color:"primary",fill:!1},path4:{type:"path",points:[{x:-.37,y:-.18},{x:-.13,y:-.18}],color:"primary",fill:!1},"path4-5":{type:"path",points:[{x:-.07,y:-.19},{x:.1,y:-.24}],color:"primary",fill:!1},path5:{type:"path",points:[{x:.1,y:-.27},{x:.37,y:-.27}],color:"primary",fill:!1},path6:{type:"path",points:[{x:.12,y:-.04},{x:.37,y:-.04}],color:"primary",fill:!1},"path1-4-join":{type:"path",points:[{x:0,y:-.2},{x:0,y:.19}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.56},bottom1:{type:"text",text:"{VAL}",x:0,y:-.42}},refblocks:{left1:{x:-.37,y:.22},left2:{x:-.37,y:-.18},right1:{x:.37,y:.36},right2:{x:.37,y:.13},right3:{x:.37,y:-.04},right5:{x:.37,y:-.27}},bounds:{minX:-.4,maxX:.4,minY:-.47,maxY:.56,width:1,height:1.04,centerX:0,centerY:.05},circles:{"circle-2":{type:"circle",x:.08,y:.13,radius:.02,color:"primary",fill:!1},"circle-5":{type:"circle",x:.08,y:-.27,radius:.02,color:"primary",fill:!1},"circle-3":{type:"circle",x:.08,y:.37,radius:.02,color:"primary",fill:!1},"circle-6":{type:"circle",x:.08,y:-.04,radius:.02,color:"primary",fill:!1},"circle-1":{type:"circle",x:-.1,y:.22,radius:.02,color:"primary",fill:!1},"circle-4":{type:"circle",x:-.1,y:-.18,radius:.02,color:"primary",fill:!1}}},mF=cn(JCt).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(),LK=ro(mF,"down"),OK=LK.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),FK=LK.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");OK.anchor="middle_bottom",FK.anchor="middle_top",OK.x=0,OK.y+=.537,FK.y-=.5375,FK.x=0;var KCt=LK,BK=ro(mF,"left"),zK=BK.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),VK=BK.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");zK.anchor="middle_bottom",VK.anchor="middle_top",zK.x=0,zK.y+=1,VK.y-=1,VK.x=0;var QCt=BK,$K=ro(mF,"up"),WK=$K.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),UK=$K.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");WK.anchor="middle_bottom",UK.anchor="middle_top",WK.x=0,WK.y+=.537,UK.y-=.5375,UK.x=0;var ZCt=$K,eMt={paths:{path1:{type:"path",points:[{x:-.37,y:.22},{x:-.13,y:.22}],color:"primary",fill:!1},"path-1-3":{type:"path",points:[{x:-.07,y:.23},{x:.11,y:.33}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.1,y:.13},{x:.37,y:.13}],color:"primary",fill:!1},path3:{type:"path",points:[{x:.12,y:.36},{x:.37,y:.36}],color:"primary",fill:!1},path4:{type:"path",points:[{x:-.37,y:-.18},{x:-.13,y:-.18}],color:"primary",fill:!1},"path4-6":{type:"path",points:[{x:-.07,y:-.18},{x:.11,y:-.07}],color:"primary",fill:!1},path5:{type:"path",points:[{x:.1,y:-.27},{x:.37,y:-.27}],color:"primary",fill:!1},path6:{type:"path",points:[{x:.12,y:-.04},{x:.37,y:-.04}],color:"primary",fill:!1},"path1-4-join":{type:"path",points:[{x:0,y:-.12},{x:0,y:.27}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.61},bottom1:{type:"text",text:"{VAL}",x:0,y:-.52}},refblocks:{left1:{x:-.37,y:.22},left2:{x:-.37,y:-.18},right1:{x:.37,y:.36},right2:{x:.37,y:.13},right3:{x:.37,y:-.04},right5:{x:.37,y:-.27}},bounds:{minX:-.4,maxX:.4,minY:-.47,maxY:.56,width:1,height:1.04,centerX:0,centerY:.05},circles:{"circle-2":{type:"circle",x:.08,y:.13,radius:.02,color:"primary",fill:!1},"circle-5":{type:"circle",x:.08,y:-.27,radius:.02,color:"primary",fill:!1},"circle-3":{type:"circle",x:.08,y:.37,radius:.02,color:"primary",fill:!1},"circle-6":{type:"circle",x:.08,y:-.04,radius:.02,color:"primary",fill:!1},"circle-1":{type:"circle",x:-.1,y:.22,radius:.02,color:"primary",fill:!1},"circle-4":{type:"circle",x:-.1,y:-.18,radius:.02,color:"primary",fill:!1}}},pF=cn(eMt).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(),XK=ro(pF,"down"),jK=XK.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),GK=XK.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");jK.anchor="middle_bottom",GK.anchor="middle_top",jK.x=0,jK.y+=.565,GK.y-=.555,GK.x=0;var tMt=XK,YK=ro(pF,"left"),qK=YK.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),JK=YK.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");qK.anchor="middle_bottom",JK.anchor="middle_top",qK.x=0,qK.y+=1.09,JK.y-=1.09,JK.x=0;var nMt=YK,KK=ro(pF,"up"),QK=KK.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),ZK=KK.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");QK.anchor="middle_bottom",ZK.anchor="middle_top",QK.x=0,QK.y+=.565,ZK.y-=.555,ZK.x=0;var oMt=KK,rMt={paths:{path11:{type:"path",points:[{x:-.38,y:.06},{x:-.14,y:.06}],color:"primary",fill:!1},"path11-0":{type:"path",points:[{x:-.09,y:.07},{x:.11,y:.11}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.13,y:.06},{x:.38,y:.06}],color:"primary",fill:!1},"path11-5":{type:"path",points:[{x:-.38,y:-.17},{x:-.14,y:-.17}],color:"primary",fill:!1},"path11-0-3":{type:"path",points:[{x:-.09,y:-.17},{x:.11,y:-.12}],color:"primary",fill:!1},"path12-0":{type:"path",points:[{x:.13,y:-.17},{x:.38,y:-.17}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.31},bottom1:{type:"text",text:"{VAL}",x:0,y:-.31}},refblocks:{left1:{x:-.38,y:-.17},left3:{x:-.38,y:.06},right1:{x:.38,y:-.17},right3:{x:.38,y:.06}},bounds:{minX:-.4,maxX:.4,minY:-.4,maxY:.4,width:.81,height:.79,centerX:0,centerY:0},circles:{"circle-4":{type:"circle",x:.1,y:.06,radius:.02,color:"primary",fill:!1},"circle-2":{type:"circle",x:.1,y:-.17,radius:.02,color:"primary",fill:!1},"circle-3":{type:"circle",x:-.11,y:.06,radius:.02,color:"primary",fill:!1},"circle-1":{type:"circle",x:-.11,y:-.17,radius:.02,color:"primary",fill:!1}}},fF=cn(rMt).labelPort("left1",["1"]).labelPort("right1",["2"]).labelPort("right3",["4"]).labelPort("left3",["3"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),eQ=ro(fF,"down"),tQ=eQ.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),nQ=eQ.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");tQ.anchor="middle_bottom",nQ.anchor="middle_top",tQ.x=.4,tQ.y+=.265,nQ.y-=.265,nQ.x=.4;var iMt=eQ,oQ=ro(fF,"left"),rQ=oQ.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),iQ=oQ.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");rQ.anchor="middle_bottom",iQ.anchor="middle_top",rQ.x=0,rQ.y+=.67,iQ.y-=.67,iQ.x=0;var sMt=oQ,sQ=ro(fF,"up"),aQ=sQ.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),cQ=sQ.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");aQ.anchor="middle_bottom",cQ.anchor="middle_top",aQ.x=.46,aQ.y+=.265,cQ.y-=.265,cQ.x=.46;var aMt=sQ,cMt={paths:{path11:{type:"path",points:[{x:-.38,y:.06},{x:-.14,y:.06}],color:"primary",fill:!1},"path11-0":{type:"path",points:[{x:-.09,y:.07},{x:.1,y:.2}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.13,y:.06},{x:.38,y:.06}],color:"primary",fill:!1},"path11-5":{type:"path",points:[{x:-.38,y:-.17},{x:-.14,y:-.17}],color:"primary",fill:!1},"path11-0-3":{type:"path",points:[{x:-.09,y:-.16},{x:.1,y:-.03}],color:"primary",fill:!1},"path12-0":{type:"path",points:[{x:.13,y:-.17},{x:.38,y:-.17}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.42},bottom1:{type:"text",text:"{VAL}",x:0,y:-.42}},refblocks:{left1:{x:-.38,y:-.17},left3:{x:-.38,y:.06},right1:{x:.38,y:-.17},right3:{x:.38,y:.06}},bounds:{minX:-.4,maxX:.4,minY:-.4,maxY:.4,width:.81,height:.79,centerX:0,centerY:0},circles:{"circle-4":{type:"circle",x:.1,y:.06,radius:.02,color:"primary",fill:!1},"circle-2":{type:"circle",x:.1,y:-.17,radius:.02,color:"primary",fill:!1},"circle-3":{type:"circle",x:-.11,y:.06,radius:.02,color:"primary",fill:!1},"circle-1":{type:"circle",x:-.11,y:-.17,radius:.02,color:"primary",fill:!1}}},xF=cn(cMt).labelPort("left1",["1"]).labelPort("right1",["2"]).labelPort("right3",["4"]).labelPort("left3",["3"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),lQ=ro(xF,"down"),uQ=lQ.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),_Q=lQ.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");uQ.anchor="middle_bottom",_Q.anchor="middle_top",uQ.x=.4,uQ.y+=.295,_Q.y-=.295,_Q.x=.42;var lMt=lQ,dQ=ro(xF,"left"),hQ=dQ.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),mQ=dQ.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");hQ.anchor="middle_bottom",mQ.anchor="middle_top",hQ.x=0,hQ.y+=.795,mQ.y-=.795,mQ.x=0;var uMt=dQ,pQ=ro(xF,"up"),fQ=pQ.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),xQ=pQ.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");fQ.anchor="middle_bottom",xQ.anchor="middle_top",fQ.x=.46,fQ.y+=.315,xQ.y-=.315,xQ.x=.46;var _Mt=pQ,E7e={paths:{path5:{type:"path",points:[{x:-.44,y:0},{x:-.16,y:0}],color:"primary",fill:!1},path6:{type:"path",points:[{x:.17,y:0},{x:.44,y:.01}],color:"primary",fill:!1},path9:{type:"path",points:[{x:-.25,y:-.16},{x:.02,y:.3},{x:.25,y:.17},{x:-.02,y:-.29},{x:-.25,y:-.16}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.37},bottom1:{type:"text",text:"{VAL}",x:0,y:-.37}},refblocks:{left1:{x:-.44,y:0},right1:{x:.44,y:.01}},bounds:{minX:-.57,maxX:.57,minY:-.25,maxY:.25,width:1.13,height:.5,centerX:0,centerY:0},circles:{}},{paths:dMt,texts:tio,bounds:gF,refblocks:D7e,circles:hMt}=E7e,A7e=cn({primitives:[...Object.values(dMt),...Object.values(hMt),{type:"text",text:"{REF}",x:.18,y:-.3204553499999995},{type:"text",text:"{VAL}",x:-.25,y:-.3294553499999995}],ports:[{...D7e.left1,labels:["1"]},{...D7e.right1,labels:["2"]}],size:{width:gF.width,height:gF.height},center:{x:gF.centerX,y:gF.centerY}}).rotateRightFacingSymbol("up").labelPort("left",["1"]).labelPort("right",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),gQ=yO(A7e),yQ=gQ.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),bQ=gQ.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");yQ.anchor="middle_left",bQ.anchor="middle_left",yQ.y+=.4,yQ.x=.32,bQ.y-=.45,bQ.x=.32;var mMt=gQ,R7e=cn(E7e).labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),pMt=cA(R7e),oM={paths:{path11:{type:"path",points:[{x:-.56,y:.04},{x:-.22,y:.04}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.14,y:.05},{x:.48,y:.05}],color:"primary",fill:!1},"path12-6":{type:"path",points:[{x:.14,y:-.15},{x:.14,y:.25}],color:"primary",fill:!1},"path11-0-9":{type:"path",points:[{x:-.22,y:.25},{x:-.21,y:-.15},{x:.14,y:.05},{x:-.22,y:.25}],color:"primary",fill:!0}},refblocks:{left1:{x:-.56,y:.04},right1:{x:.48,y:.05}},bounds:{width:1.18,height:.76,centerX:0,centerY:0},circles:{}},{paths:fMt,bounds:yF,refblocks:k7e,circles:xMt}=oM,gMt=cn({primitives:[...Object.values(fMt),...Object.values(xMt),{type:"text",text:"{REF}",x:-.15,y:.3294553499999995},{type:"text",text:"{VAL}",x:.15,y:.3294553499999995}],ports:[{...k7e.left1,labels:["1"]},{...k7e.right1,labels:["2"]}],size:{width:yF.width,height:yF.height},center:{x:yF.centerX,y:yF.centerY}}).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:yMt,bounds:bF,refblocks:N7e,circles:bMt}=oM,PMt=cn({primitives:[...Object.values(yMt),...Object.values(bMt),{type:"text",text:"{REF}",x:-0,y:.4094553499999995},{type:"text",text:"{VAL}",x:0,y:-.4094553499999995}],ports:[{...N7e.left1,labels:["1"]},{...N7e.right1,labels:["2"]}],size:{width:bF.width,height:bF.height},center:{x:bF.centerX,y:bF.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:vMt,bounds:PF,refblocks:H7e,circles:SMt}=oM,CMt=cn({primitives:[...Object.values(vMt),...Object.values(SMt),{type:"text",text:"{REF}",x:-0,y:-.3094553499999995},{type:"text",text:"{VAL}",x:0,y:.4094553499999995}],ports:[{...H7e.left1,labels:["1"]},{...H7e.right1,labels:["2"]}],size:{width:PF.width,height:PF.height},center:{x:PF.centerX,y:PF.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:MMt,bounds:vF,refblocks:I7e,circles:TMt}=oM,wMt=cn({primitives:[...Object.values(MMt),...Object.values(TMt),{type:"text",text:"{REF}",x:-0,y:.4094553499999995},{type:"text",text:"{VAL}",x:0,y:-.4094553499999995}],ports:[{...I7e.left1,labels:["1"]},{...I7e.right1,labels:["2"]}],size:{width:vF.width,height:vF.height},center:{x:vF.centerX,y:vF.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:EMt,bounds:SF,refblocks:L7e,circles:DMt}=oM,AMt=cn({primitives:[...Object.values(EMt),...Object.values(DMt),{type:"text",text:"{REF}",x:.15,y:-.2894553499999995},{type:"text",text:"{VAL}",x:-.15,y:-.2894553499999995}],ports:[{...L7e.left1,labels:["1"]},{...L7e.right1,labels:["2"]}],size:{width:SF.width,height:SF.height},center:{x:SF.centerX,y:SF.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:RMt,bounds:CF,refblocks:O7e,circles:kMt}=oM,NMt=cn({primitives:[...Object.values(RMt),...Object.values(kMt),{type:"text",text:"{REF}",x:.15,y:-.2894553499999995},{type:"text",text:"{VAL}",x:-.15,y:-.2894553499999995}],ports:[{...O7e.left1,labels:["1"]},{...O7e.right1,labels:["2"]}],size:{width:CF.width,height:CF.height},center:{x:CF.centerX,y:CF.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),HMt={paths:{path11:{type:"path",points:[{x:-.54,y:0},{x:-.3,y:0}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.29,y:0},{x:.54,y:0}],color:"primary",fill:!1}},texts:{left1:{type:"text",text:"Hz",x:0,y:-.04}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:0}},bounds:{width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:"circle",x:-.01,y:-.01,radius:.29,color:"primary",fill:!1}}},{paths:IMt,texts:LMt,bounds:MF,refblocks:F7e,circles:OMt}=HMt,PQ=za({primitives:[...Object.values(IMt),...Object.values(OMt),{type:"text",text:"{REF}",x:0,y:-.3594553499999995,anchor:"middle_top"},{type:"text",text:"{VAL}",x:0,y:.35,anchor:"middle_bottom"},{...LMt.left1,x:0,y:.01,anchor:"center",fontSize:.2}],ports:[{...F7e.left1,labels:["1"]},{...F7e.right1,labels:["2"]}],size:{width:MF.width,height:MF.height},center:{x:MF.centerX,y:MF.centerY}}),{5:FMt,...BMt}=PQ.primitives;function zMt(t){return typeof t=="object"}var B7e=ro({...PQ,primitives:Object.values(BMt).filter(zMt)}),VMt={...B7e,primitives:[...B7e.primitives,FMt]},$Mt={paths:{path10:{type:"path",points:[{x:-.53,y:.04},{x:.53,y:.04}],color:"primary",fill:!1},path14:{type:"path",points:[{x:0,y:.17},{x:.27,y:.17},{x:.27,y:-.1},{x:-.26,y:-.1},{x:-.26,y:.17},{x:0,y:.17}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.01,y:.24}},refblocks:{left1:{x:-.53,y:.04},right1:{x:.53,y:.04}},bounds:{width:1.13,height:.47,centerX:0,centerY:0}},{paths:WMt,texts:UMt,bounds:TF,refblocks:z7e}=$Mt,V7e=za({primitives:[...Object.values(WMt),{...UMt.top1,anchor:"middle_bottom"},{type:"text",text:"{VAL}",x:0,y:-.2,anchor:"middle_top"}],ports:[{...z7e.left1,labels:["1"]},{...z7e.right1,labels:["2"]}],size:{width:TF.width,height:TF.height},center:{x:TF.centerX,y:TF.centerY}}),XMt=ro(V7e),rM={paths:{path1:{type:"path",points:[{x:-.29,y:.01},{x:.04,y:0}],color:"primary",fill:!0},path2:{type:"path",points:[{x:.04,y:-.22},{x:.04,y:.22}],color:"primary",fill:!0},path3:{type:"path",points:[{x:.12,y:-.17},{x:.12,y:.17}],color:"primary",fill:!0},path4:{type:"path",points:[{x:.19,y:-.06},{x:.19,y:.06}],color:"primary",fill:!0}},texts:{right1:{type:"text",text:"{REF}",x:.31,y:-.02}},refblocks:{left1:{x:-.29,y:.01}},bounds:{minX:-.31,maxX:.31,minY:-.22,maxY:.22,width:.62,height:.45,centerX:0,centerY:0},circles:{}},jMt=cn(rM).rotateRightFacingSymbol("down").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_top").build(),GMt=cn(rM).rotateRightFacingSymbol("right").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_left").build(),YMt=cn(rM).rotateRightFacingSymbol("left").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_right").build(),qMt=cn(rM).rotateRightFacingSymbol("right").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_left").build(),JMt=cn(rM).rotateRightFacingSymbol("up").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_bottom").build(),KMt=cn(rM).rotateRightFacingSymbol("up").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_bottom").build(),vQ={paths:{path11:{type:"path",points:[{x:-.52,y:.03},{x:-.18,y:.04}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.19,y:.04},{x:.52,y:.04}],color:"primary",fill:!1},"path11-0-9":{type:"path",points:[{x:-.31,y:.2},{x:-.31,y:-.11},{x:-.01,y:.04},{x:-.3,y:.2}],color:"primary",fill:!0},"path11-0-9-5":{type:"path",points:[{x:.33,y:.2},{x:.33,y:-.1},{x:.04,y:.04},{x:.33,y:.2}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:.04,y:.32},bottom1:{type:"text",text:"{VAL}",x:.04,y:-.32}},refblocks:{left1:{x:-.52,y:.03},right1:{x:.52,y:.04}},bounds:{minX:-.55,maxX:.55,minY:-.32,maxY:.32,width:1.09,height:.63,centerX:0,centerY:0},circles:{}},{paths:nio,texts:oio,bounds:rio,refblocks:iio,circles:sio}=vQ,QMt=cn(vQ).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),ZMt=cn(vQ).rotateRightFacingSymbol("down").changeTextAnchor("{VAL}","middle_right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").build(),eTt={paths:{path45:{type:"path",points:[{x:.14,y:0},{x:-.13,y:-.14}],color:"primary",fill:!1},"path1-8":{type:"path",points:[{x:.13,y:0},{x:.3,y:0}],color:"primary",fill:!1},path46:{type:"path",points:[{x:-.13,y:.13},{x:.14,y:0}],color:"primary",fill:!1},path47:{type:"path",points:[{x:-.13,y:-.14},{x:-.13,y:.13}],color:"primary",fill:!1},path48:{type:"path",points:[{x:.14,y:.13},{x:.14,y:-.14}],color:"primary",fill:!1},path49:{type:"path",points:[{x:-.13,y:0},{x:-.3,y:0}],color:"primary",fill:!1},path25:{type:"path",points:[{x:.16,y:.29},{x:.25,y:.3},{x:.22,y:.21}],color:"primary",fill:!0},path78:{type:"path",points:[{x:.08,y:.17},{x:.09,y:.17},{x:.21,y:.27},{x:.21,y:.27}],color:"primary",fill:!1},"path25-0":{type:"path",points:[{x:-.02,y:.31},{x:.08,y:.32},{x:.04,y:.23}],color:"primary",fill:!0},"path78-6":{type:"path",points:[{x:-.1,y:.19},{x:-.09,y:.2},{x:.04,y:.29},{x:.04,y:.29}],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:.13},{x:-.54,y:.13}],color:"primary",fill:!1},"path48-2":{type:"path",points:[{x:-.3,y:-.13},{x:-.54,y:-.13}],color:"primary",fill:!1},"path48-3":{type:"path",points:[{x:.3,y:-.13},{x:.54,y:-.13}],color:"primary",fill:!1},"path48-4":{type:"path",points:[{x:.3,y:.13},{x:.54,y:.13}],color:"primary",fill:!1}},texts:{bottom1:{type:"text",text:"{VAL}",x:0,y:-.43},right1:{type:"text",text:"{REF}",x:0,y:.43}},refblocks:{left1:{x:-.54,y:.13},left2:{x:-.54,y:-.13},right1:{x:.54,y:-.13},right2:{x:.54,y:.13}},bounds:{minX:-.56,maxX:.56,minY:-.32,maxY:.32,width:1.13,height:.65,centerX:0,centerY:0},circles:{}},wF=cn(eTt).labelPort("left1",["1","DIN"]).labelPort("left2",["2","POWER"]).labelPort("right1",["3","GND"]).labelPort("right2",["4","DOUT"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),tTt=ro(wF,"down"),nTt=cA(wF),SQ=ro(wF,"up"),CQ=SQ.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),MQ=SQ.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");CQ.anchor="middle_left",MQ.anchor="middle_left",CQ.y+=.21,CQ.x=.44,MQ.y-=.21,MQ.x=.44;var oTt=SQ,rTt={paths:{path11:{type:"path",points:[{x:-.4,y:0},{x:-.01,y:0}],color:"primary",fill:!1},path40:{type:"path",points:[{x:.07,y:.19},{x:.07,y:-.18}],color:"primary",fill:!1},path42:{type:"path",points:[{x:.01,y:-.12},{x:.01,y:.14}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.28,y:-.25},{x:.28,y:-.56}],color:"primary",fill:!1},"path12-1":{type:"path",points:[{x:.28,y:.56},{x:.28,y:.27}],color:"primary",fill:!1},path15:{type:"path",points:[{x:.17,y:-.22},{x:.28,y:-.23},{x:.23,y:-.14}],color:"primary",fill:!0},path17:{type:"path",points:[{x:.08,y:-.09},{x:.23,y:-.2}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.07,y:.11},{x:.28,y:.26}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.01,y:.36},bottom1:{type:"text",text:"{VAL}",x:.02,y:-.42}},refblocks:{top1:{x:.28,y:.56},bottom1:{x:.28,y:-.56},left1:{x:-.4,y:0}},bounds:{minX:-.43,maxX:.43,minY:-.58,maxY:.58,width:.85,height:1.17,centerX:0,centerY:0},circles:{path1:{type:"circle",x:.14,y:.01,radius:.29,color:"primary",fill:!1}}},$7e=cn(rTt).changeTextAnchor("{VAL}","middle_right").labelPort("left1",["3"]).labelPort("top1",["2"]).labelPort("bottom1",["1"]).changeTextAnchor("{REF}","middle_right").build(),TQ=ro($7e),wQ=TQ.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),W7e=TQ.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");wQ.anchor="middle_left",W7e.anchor="middle_right",wQ.x=.45,wQ.y+=.065,W7e.y+=.065;var iTt=TQ,sTt={paths:{"path12-1-8-6-9":{type:"path",points:[{x:.02,y:-.02},{x:.02,y:-.1}],color:"primary",fill:!1},"path12-1-5-6":{type:"path",points:[{x:-.47,y:-.19},{x:-.17,y:-.19}],color:"primary",fill:!1},"path12-1-5-6-8":{type:"path",points:[{x:.02,y:.17},{x:.02,y:.11}],color:"primary",fill:!1},"path12-1-8-0":{type:"path",points:[{x:-.15,y:-.03},{x:.2,y:-.19}],color:"primary",fill:!1},"path12-1-0":{type:"path",points:[{x:.2,y:-.19},{x:.47,y:-.19}],color:"primary",fill:!1},"path12-1-8-6-9-4":{type:"path",points:[{x:.02,y:.12},{x:.02,y:.02}],color:"primary",fill:!1},"path12-1-8-6-9-4-3":{type:"path",points:[{x:.08,y:.11},{x:.08,y:.05}],color:"primary",fill:!1},"path12-1-8-6-9-4-3-1":{type:"path",points:[{x:-.04,y:.11},{x:-.04,y:.05}],color:"primary",fill:!1},"path12-1-8-6-9-4-4":{type:"path",points:[{x:.08,y:.11},{x:-.04,y:.11}],color:"primary",fill:!1},"path14-5":{type:"path",points:[{x:-.01,y:.28},{x:.01,y:.25},{x:.04,y:.23},{x:.06,y:.2}],color:"primary",fill:!0},"path14-5-3":{type:"path",points:[{x:-.01,y:.2},{x:.01,y:.23},{x:.04,y:.25},{x:.06,y:.28}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:.01,y:.38},bottom1:{type:"text",text:"{VAL}",x:.06,y:-.38}},refblocks:{left1:{x:-.47,y:-.19},right1:{x:.47,y:-.19}},bounds:{minX:-.5,maxX:.5,minY:-.38,maxY:.38,width:1,height:.76,centerX:0,centerY:0},circles:{path9:{type:"circle",x:.02,y:.24,radius:.06,color:"primary",fill:!1}}},U7e=cn(sTt).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),X7e=ro(U7e),j7e=X7e.primitives.filter(t=>t.type==="text"),EQ=j7e.find(t=>t.text==="{VAL}");EQ.x=-.35,EQ.y=0,EQ.anchor="middle_right";var DQ=j7e.find(t=>t.text==="{REF}");DQ.y=0,DQ.x=.35,DQ.anchor="middle_left";var aTt=X7e,cTt={paths:{path8698:{type:"path",points:[{x:-.2,y:-.02},{x:-.2,y:-.02},{x:-.21,y:-.01},{x:-.21,y:-.01},{x:-.21,y:0},{x:-.21,y:0},{x:-.21,y:0},{x:-.22,y:.01},{x:-.22,y:.01},{x:-.22,y:.02},{x:-.22,y:.02},{x:-.23,y:.03},{x:-.23,y:.03},{x:-.23,y:.03},{x:-.23,y:.04},{x:-.24,y:.04},{x:-.24,y:.04},{x:-.24,y:.05},{x:-.24,y:.05},{x:-.25,y:.05},{x:-.25,y:.06},{x:-.25,y:.06},{x:-.25,y:.06},{x:-.26,y:.06},{x:-.26,y:.06},{x:-.26,y:.07},{x:-.26,y:.07},{x:-.27,y:.07},{x:-.27,y:.07},{x:-.27,y:.07},{x:-.27,y:.07},{x:-.28,y:.07},{x:-.28,y:.07},{x:-.28,y:.07},{x:-.28,y:.07},{x:-.29,y:.07},{x:-.29,y:.08},{x:-.29,y:.08},{x:-.29,y:.08},{x:-.3,y:.08},{x:-.3,y:.08},{x:-.3,y:.08},{x:-.3,y:.08},{x:-.31,y:.08},{x:-.31,y:.08},{x:-.31,y:.07},{x:-.31,y:.07},{x:-.32,y:.07},{x:-.32,y:.07},{x:-.32,y:.07},{x:-.32,y:.07},{x:-.33,y:.07},{x:-.33,y:.07},{x:-.33,y:.07},{x:-.33,y:.07},{x:-.34,y:.07},{x:-.34,y:.06},{x:-.34,y:.06},{x:-.34,y:.06},{x:-.35,y:.06},{x:-.35,y:.06},{x:-.35,y:.05},{x:-.35,y:.05},{x:-.36,y:.05},{x:-.36,y:.04},{x:-.36,y:.04},{x:-.36,y:.04},{x:-.37,y:.03},{x:-.37,y:.03},{x:-.37,y:.03},{x:-.37,y:.02},{x:-.38,y:.02},{x:-.38,y:.01},{x:-.38,y:.01},{x:-.38,y:0},{x:-.39,y:0},{x:-.39,y:0},{x:-.39,y:-.01},{x:-.39,y:-.01},{x:-.4,y:-.02},{x:-.4,y:-.02}],color:"primary",fill:!1},path8700:{type:"path",points:[{x:0,y:-.02},{x:0,y:-.02},{x:-.01,y:-.01},{x:-.01,y:-.01},{x:-.01,y:0},{x:-.01,y:0},{x:-.02,y:0},{x:-.02,y:.01},{x:-.02,y:.01},{x:-.02,y:.02},{x:-.03,y:.02},{x:-.03,y:.03},{x:-.03,y:.03},{x:-.03,y:.03},{x:-.04,y:.04},{x:-.04,y:.04},{x:-.04,y:.04},{x:-.04,y:.05},{x:-.05,y:.05},{x:-.05,y:.05},{x:-.05,y:.06},{x:-.05,y:.06},{x:-.06,y:.06},{x:-.06,y:.06},{x:-.06,y:.06},{x:-.06,y:.07},{x:-.07,y:.07},{x:-.07,y:.07},{x:-.07,y:.07},{x:-.07,y:.07},{x:-.08,y:.07},{x:-.08,y:.07},{x:-.08,y:.07},{x:-.08,y:.07},{x:-.09,y:.07},{x:-.09,y:.07},{x:-.09,y:.08},{x:-.09,y:.08},{x:-.1,y:.08},{x:-.1,y:.08},{x:-.1,y:.08},{x:-.1,y:.08},{x:-.11,y:.08},{x:-.11,y:.08},{x:-.11,y:.08},{x:-.11,y:.07},{x:-.12,y:.07},{x:-.12,y:.07},{x:-.12,y:.07},{x:-.12,y:.07},{x:-.13,y:.07},{x:-.13,y:.07},{x:-.13,y:.07},{x:-.13,y:.07},{x:-.14,y:.07},{x:-.14,y:.07},{x:-.14,y:.06},{x:-.14,y:.06},{x:-.15,y:.06},{x:-.15,y:.06},{x:-.15,y:.06},{x:-.15,y:.05},{x:-.16,y:.05},{x:-.16,y:.05},{x:-.16,y:.04},{x:-.16,y:.04},{x:-.17,y:.04},{x:-.17,y:.03},{x:-.17,y:.03},{x:-.17,y:.03},{x:-.18,y:.02},{x:-.18,y:.02},{x:-.18,y:.01},{x:-.18,y:.01},{x:-.19,y:0},{x:-.19,y:0},{x:-.19,y:0},{x:-.19,y:-.01},{x:-.2,y:-.01},{x:-.2,y:-.02},{x:-.2,y:-.02}],color:"primary",fill:!1},path8702:{type:"path",points:[{x:.2,y:-.02},{x:.2,y:-.02},{x:.19,y:-.01},{x:.19,y:-.01},{x:.19,y:0},{x:.19,y:0},{x:.18,y:0},{x:.18,y:.01},{x:.18,y:.01},{x:.18,y:.02},{x:.17,y:.02},{x:.17,y:.03},{x:.17,y:.03},{x:.17,y:.03},{x:.16,y:.04},{x:.16,y:.04},{x:.16,y:.04},{x:.16,y:.05},{x:.15,y:.05},{x:.15,y:.05},{x:.15,y:.06},{x:.15,y:.06},{x:.14,y:.06},{x:.14,y:.06},{x:.14,y:.06},{x:.14,y:.07},{x:.13,y:.07},{x:.13,y:.07},{x:.13,y:.07},{x:.13,y:.07},{x:.12,y:.07},{x:.12,y:.07},{x:.12,y:.07},{x:.12,y:.07},{x:.11,y:.07},{x:.11,y:.07},{x:.11,y:.08},{x:.11,y:.08},{x:.1,y:.08},{x:.1,y:.08},{x:.1,y:.08},{x:.1,y:.08},{x:.09,y:.08},{x:.09,y:.08},{x:.09,y:.08},{x:.09,y:.07},{x:.08,y:.07},{x:.08,y:.07},{x:.08,y:.07},{x:.08,y:.07},{x:.07,y:.07},{x:.07,y:.07},{x:.07,y:.07},{x:.07,y:.07},{x:.06,y:.07},{x:.06,y:.07},{x:.06,y:.06},{x:.06,y:.06},{x:.05,y:.06},{x:.05,y:.06},{x:.05,y:.06},{x:.05,y:.05},{x:.04,y:.05},{x:.04,y:.05},{x:.04,y:.04},{x:.04,y:.04},{x:.03,y:.04},{x:.03,y:.03},{x:.03,y:.03},{x:.03,y:.03},{x:.02,y:.02},{x:.02,y:.02},{x:.02,y:.01},{x:.02,y:.01},{x:.01,y:0},{x:.01,y:0},{x:.01,y:0},{x:.01,y:-.01},{x:0,y:-.01},{x:0,y:-.02},{x:0,y:-.02}],color:"primary",fill:!1},path8704:{type:"path",points:[{x:.4,y:-.02},{x:.39,y:-.02},{x:.39,y:-.01},{x:.39,y:-.01},{x:.39,y:0},{x:.39,y:0},{x:.38,y:0},{x:.38,y:.01},{x:.38,y:.01},{x:.38,y:.02},{x:.37,y:.02},{x:.37,y:.03},{x:.37,y:.03},{x:.37,y:.03},{x:.36,y:.04},{x:.36,y:.04},{x:.36,y:.04},{x:.36,y:.05},{x:.35,y:.05},{x:.35,y:.05},{x:.35,y:.06},{x:.35,y:.06},{x:.34,y:.06},{x:.34,y:.06},{x:.34,y:.06},{x:.34,y:.07},{x:.33,y:.07},{x:.33,y:.07},{x:.33,y:.07},{x:.33,y:.07},{x:.32,y:.07},{x:.32,y:.07},{x:.32,y:.07},{x:.32,y:.07},{x:.31,y:.07},{x:.31,y:.07},{x:.31,y:.08},{x:.31,y:.08},{x:.3,y:.08},{x:.3,y:.08},{x:.3,y:.08},{x:.3,y:.08},{x:.29,y:.08},{x:.29,y:.08},{x:.29,y:.08},{x:.29,y:.07},{x:.28,y:.07},{x:.28,y:.07},{x:.28,y:.07},{x:.28,y:.07},{x:.27,y:.07},{x:.27,y:.07},{x:.27,y:.07},{x:.27,y:.07},{x:.26,y:.07},{x:.26,y:.07},{x:.26,y:.06},{x:.26,y:.06},{x:.25,y:.06},{x:.25,y:.06},{x:.25,y:.06},{x:.25,y:.05},{x:.24,y:.05},{x:.24,y:.05},{x:.24,y:.04},{x:.24,y:.04},{x:.23,y:.04},{x:.23,y:.03},{x:.23,y:.03},{x:.23,y:.03},{x:.22,y:.02},{x:.22,y:.02},{x:.22,y:.01},{x:.22,y:.01},{x:.21,y:0},{x:.21,y:0},{x:.21,y:0},{x:.21,y:-.01},{x:.2,y:-.01},{x:.2,y:-.02},{x:.2,y:-.02}],color:"primary",fill:!1},path8706:{type:"path",points:[{x:-.4,y:-.02},{x:-.55,y:-.02}],color:"primary",fill:!1},"path8706-5":{type:"path",points:[{x:.55,y:-.03},{x:.4,y:-.03}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.23},bottom1:{type:"text",text:"{VAL}",x:0,y:-.23}},refblocks:{left1:{x:-.55,y:-.02},right1:{x:.55,y:-.03}},bounds:{width:1.16,height:.46,centerX:0,centerY:0},circles:{}},{paths:lTt,texts:G7e,bounds:EF,refblocks:Y7e,circles:uTt}=cTt,AQ=za({primitives:[...Object.values(lTt),...Object.values(uTt),{...G7e.top1,anchor:"middle_bottom"},{...G7e.bottom1,anchor:"middle_top"}],ports:[{...Y7e.left1,labels:["1"]},{...Y7e.right1,labels:["2"]}],size:{width:EF.width,height:EF.height},center:{x:EF.centerX,y:EF.centerY}}),q7e=ro(AQ,"up"),_Tt=yO(q7e),dTt=cA(AQ),J7e={paths:{path11:{type:"path",points:[{x:-.54,y:-.06},{x:-.15,y:-.06}],color:"primary",fill:!1},path40:{type:"path",points:[{x:.13,y:-.05},{x:-.13,y:-.18}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.13,y:.08},{x:.13,y:-.05}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.13,y:-.18},{x:-.13,y:.08}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.13,y:.08},{x:.13,y:-.18}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.14,y:-.05},{x:.54,y:-.06}],color:"primary",fill:!1},"path25-0-9-8":{type:"path",points:[{x:-.03,y:.39},{x:-.05,y:.47},{x:-.08,y:.39}],color:"primary",fill:!0},"path78-6-5-5":{type:"path",points:[{x:-.05,y:.27},{x:-.05,y:.29},{x:-.05,y:.41},{x:-.05,y:.42}],color:"primary",fill:!1},"path25-0-9-8-2":{type:"path",points:[{x:.07,y:.39},{x:.04,y:.47},{x:.02,y:.39}],color:"primary",fill:!0},"path78-6-5-5-7":{type:"path",points:[{x:.04,y:.27},{x:.04,y:.29},{x:.04,y:.41},{x:.04,y:.42}],color:"primary",fill:!1},"path43-1":{type:"path",points:[{x:.03,y:.06},{x:.03,y:-.16}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:.38,y:.38},bottom1:{type:"text",text:"{VAL}",x:.38,y:-.47}},refblocks:{left1:{x:-.54,y:-.06},right1:{x:.54,y:-.06}},bounds:{minX:-.57,maxX:.57,minY:-.47,maxY:.47,width:1.14,height:.93,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:-.05,radius:.29,color:"primary",fill:!1}}};J7e.bounds.width+=.2;var DF=cn(J7e).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),RQ=ro(DF,"down"),kQ=RQ.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),NQ=RQ.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");kQ.anchor="middle_left",NQ.anchor="middle_left",kQ.y+=.9,kQ.x=.3,NQ.y-=.1,NQ.x=.3;var hTt=RQ,HQ=ro(DF,"left"),IQ=HQ.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),LQ=HQ.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");IQ.anchor="middle_left",LQ.anchor="middle_left",IQ.y+=.71,IQ.x=.44,LQ.y-=.71,LQ.x=.44;var mTt=HQ,OQ=ro(DF,"up"),FQ=OQ.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),BQ=OQ.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");FQ.anchor="middle_left",BQ.anchor="middle_left",FQ.y+=.1,FQ.x=.3,BQ.y-=.71,BQ.x=.3;var pTt=OQ,fTt={paths:{path45:{type:"path",points:[{x:.14,y:0},{x:-.13,y:-.14}],color:"primary",fill:!1},"path1-8":{type:"path",points:[{x:.13,y:0},{x:.54,y:0}],color:"primary",fill:!1},path46:{type:"path",points:[{x:-.13,y:.13},{x:.14,y:0}],color:"primary",fill:!1},path47:{type:"path",points:[{x:-.13,y:-.14},{x:-.13,y:.13}],color:"primary",fill:!1},path48:{type:"path",points:[{x:.14,y:.13},{x:.14,y:-.14}],color:"primary",fill:!1},path49:{type:"path",points:[{x:-.13,y:0},{x:-.54,y:0}],color:"primary",fill:!1},path25:{type:"path",points:[{x:.16,y:.29},{x:.25,y:.3},{x:.22,y:.21}],color:"primary",fill:!0},path78:{type:"path",points:[{x:.08,y:.17},{x:.09,y:.17},{x:.21,y:.27},{x:.21,y:.27}],color:"primary",fill:!1},"path25-0":{type:"path",points:[{x:-.02,y:.31},{x:.08,y:.32},{x:.04,y:.23}],color:"primary",fill:!0},"path78-6":{type:"path",points:[{x:-.1,y:.19},{x:-.09,y:.2},{x:.04,y:.29},{x:.04,y:.29}],color:"primary",fill:!1}},texts:{bottom1:{type:"text",text:"{VAL}",x:0,y:-.21},right1:{type:"text",text:"{REF}",x:0,y:.41}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:0}},bounds:{width:1.13,height:.65,centerX:0,centerY:0},circles:{}},{paths:xTt,texts:K7e,bounds:AF,refblocks:Q7e,circles:gTt}=fTt,zQ=za({primitives:[...Object.values(xTt),...Object.values(gTt),{...K7e.bottom1,anchor:"middle_top"},{...K7e.right1,anchor:"middle_bottom"}],ports:[{...Q7e.left1,labels:["1"]},{...Q7e.right1,labels:["2"]}],size:{width:AF.width,height:AF.height},center:{x:AF.centerX,y:AF.centerY}}),VQ=ro(zQ,"up"),$Q=VQ.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),WQ=VQ.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");$Q.anchor="middle_left",WQ.anchor="middle_left",$Q.y+=.21,$Q.x=.21,WQ.y-=.21,WQ.x=.21;var Z7e=VQ,UQ=yO(Z7e),XQ=UQ.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),jQ=UQ.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");XQ.anchor="middle_left",jQ.anchor="middle_left",XQ.y+=.4,XQ.x=.2,jQ.y-=.41,jQ.x=.2;var yTt=UQ,bTt=cA(zQ),PTt={paths:{path11:{type:"path",points:[{x:-.52,y:-.01},{x:-.18,y:-.01}],color:"primary",fill:!1},"path11-2":{type:"path",points:[{x:-.17,y:-.11},{x:-.17,y:.08}],color:"primary",fill:!1},"path11-5":{type:"path",points:[{x:-.17,y:-.12},{x:.16,y:-.12}],color:"primary",fill:!1},"path11-5-5":{type:"path",points:[{x:-.17,y:.08},{x:.16,y:.08}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.17,y:-.01},{x:.52,y:-.01}],color:"primary",fill:!1},"path11-2-1":{type:"path",points:[{x:.16,y:-.12},{x:.16,y:.08}],color:"primary",fill:!1},"path25-0-9":{type:"path",points:[{x:-.4,y:-.21},{x:-.33,y:-.18},{x:-.34,y:-.27}],color:"primary",fill:!0},"path78-6-5":{type:"path",points:[{x:-.45,y:-.34},{x:-.44,y:-.32},{x:-.35,y:-.22},{x:-.35,y:-.22}],color:"primary",fill:!1},"path25-0-9-0":{type:"path",points:[{x:-.3,y:-.34},{x:-.22,y:-.31},{x:-.24,y:-.4}],color:"primary",fill:!0},"path78-6-5-9":{type:"path",points:[{x:-.35,y:-.46},{x:-.34,y:-.45},{x:-.25,y:-.35},{x:-.25,y:-.35}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.17,y:-.41},bottom1:{type:"text",text:"{VAL}",x:-.01,y:.46}},refblocks:{left1:{x:-.52,y:-.01},right1:{x:.52,y:-.01}},bounds:{width:1.1,height:.62,centerX:0,centerY:-.02},circles:{path1:{type:"circle",x:0,y:-.02,radius:.28,color:"primary",fill:!1}}},{paths:vTt,texts:eSe,bounds:RF,refblocks:tSe,circles:STt}=PTt,nSe=za({primitives:[...Object.values(vTt),...Object.values(STt),{...eSe.top1,anchor:"middle_left",x:0},{...eSe.bottom1,anchor:"middle_left",x:0}],ports:[{...tSe.left1,labels:["1"]},{...tSe.right1,labels:["2"]}],size:{width:RF.width,height:RF.height},center:{x:RF.centerX,y:RF.centerY}}),oSe=ro(nSe),rSe=oSe.primitives.filter(t=>t.type==="text"),GQ=rSe.find(t=>t.text==="{VAL}");GQ.x=-.35,GQ.y=0,GQ.anchor="middle_right";var YQ=rSe.find(t=>t.text==="{REF}");YQ.y=0,YQ.x=.35,YQ.anchor="middle_left";var CTt=oSe,MTt={paths:{path208:{type:"path",points:[{x:.38,y:.13},{x:.52,y:-.13}],color:"primary",fill:!1},path209:{type:"path",points:[{x:.25,y:-.13},{x:.38,y:.13}],color:"primary",fill:!1},path210:{type:"path",points:[{x:.52,y:-.13},{x:.25,y:-.13}],color:"primary",fill:!1},path211:{type:"path",points:[{x:.25,y:.13},{x:.52,y:.13}],color:"primary",fill:!1},path212:{type:"path",points:[{x:.12,y:-.4},{x:.38,y:-.4}],color:"primary",fill:!1},path213:{type:"path",points:[{x:.38,y:.4},{x:.12,y:.4}],color:"primary",fill:!1},path214:{type:"path",points:[{x:.12,y:.54},{x:.12,y:.18}],color:"primary",fill:!1},path215:{type:"path",points:[{x:.12,y:-.54},{x:.12,y:0}],color:"primary",fill:!1},path216:{type:"path",points:[{x:.38,y:-.4},{x:.38,y:.4}],color:"primary",fill:!1},path217:{type:"path",points:[{x:-.14,y:.26},{x:-.14,y:-.27}],color:"primary",fill:!1},path218:{type:"path",points:[{x:-.22,y:-.27},{x:-.22,y:.26}],color:"primary",fill:!1},path219:{type:"path",points:[{x:-.54,y:-.27},{x:-.22,y:-.27}],color:"primary",fill:!1},path220:{type:"path",points:[{x:-.14,y:-.19},{x:.12,y:-.19}],color:"primary",fill:!1},path221:{type:"path",points:[{x:-.14,y:.18},{x:.12,y:.18}],color:"primary",fill:!1},path222:{type:"path",points:[{x:-.07,y:0},{x:.12,y:0}],color:"primary",fill:!1}},texts:{right1:{type:"text",text:"{VAL}",x:.57,y:.02},right2:{type:"text",text:"{REF}",x:.57,y:.21}},refblocks:{top1:{x:.12,y:.54},bottom1:{x:.12,y:-.54},left1:{x:-.54,y:-.27}},bounds:{width:1.14,height:1.14,centerX:0,centerY:0}},{paths:TTt,texts:iSe,bounds:kF,refblocks:qQ}=MTt,sSe=za({primitives:[...Object.values(TTt),{...iSe.right1,anchor:"middle_left"},{...iSe.right2,anchor:"middle_left"}],ports:[{...qQ.top1,labels:["1"]},{...qQ.bottom1,labels:["2"]},{...qQ.left1,labels:["3"]}],size:{width:kF.width+.4,height:kF.height},center:{x:kF.centerX+.2,y:kF.centerY}}),JQ=ro(sSe),aSe=JQ.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),KQ=JQ.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");aSe.anchor="middle_top",KQ.anchor="middle_top",aSe.x=KQ.x,KQ.y+=.15;var wTt=JQ,ETt={paths:{"path12-1-8-6-9":{type:"path",points:[{x:.01,y:.07},{x:.01,y:-.01}],color:"primary",fill:!1},"path12-1-5-6":{type:"path",points:[{x:-.47,y:-.09},{x:-.17,y:-.09}],color:"primary",fill:!1},"path12-1-8-0":{type:"path",points:[{x:-.16,y:-.01},{x:.17,y:-.01}],color:"primary",fill:!1},"path12-1-0":{type:"path",points:[{x:.2,y:-.09},{x:.47,y:-.09}],color:"primary",fill:!1},path2:{type:"path",points:[{x:-.1,y:.06},{x:-.1,y:.06},{x:-.1,y:.07},{x:-.1,y:.07},{x:-.1,y:.07},{x:-.1,y:.08},{x:-.1,y:.08},{x:-.1,y:.08},{x:-.1,y:.09},{x:-.09,y:.09},{x:-.09,y:.09},{x:-.09,y:.1},{x:-.09,y:.1},{x:-.09,y:.1},{x:-.09,y:.1},{x:-.09,y:.11},{x:-.09,y:.11},{x:-.08,y:.11},{x:-.08,y:.12},{x:-.08,y:.12},{x:-.08,y:.12},{x:-.08,y:.12},{x:-.07,y:.13},{x:-.07,y:.13},{x:-.07,y:.13},{x:-.07,y:.13},{x:-.06,y:.14},{x:-.06,y:.14},{x:-.06,y:.14},{x:-.06,y:.14},{x:-.05,y:.14},{x:-.05,y:.15},{x:-.05,y:.15},{x:-.04,y:.15},{x:-.04,y:.15},{x:-.04,y:.15},{x:-.04,y:.15},{x:-.03,y:.16},{x:-.03,y:.16},{x:-.03,y:.16},{x:-.02,y:.16},{x:-.02,y:.16},{x:-.02,y:.16},{x:-.01,y:.16},{x:-.01,y:.16},{x:0,y:.16},{x:0,y:.16},{x:0,y:.16},{x:.01,y:.16},{x:.01,y:.16},{x:.01,y:.16},{x:.02,y:.16},{x:.02,y:.16},{x:.02,y:.16},{x:.03,y:.16},{x:.03,y:.16},{x:.03,y:.16},{x:.04,y:.16},{x:.04,y:.16},{x:.04,y:.16},{x:.05,y:.15},{x:.05,y:.15},{x:.05,y:.15},{x:.06,y:.15},{x:.06,y:.15},{x:.06,y:.15},{x:.06,y:.14},{x:.07,y:.14},{x:.07,y:.14},{x:.07,y:.14},{x:.08,y:.14},{x:.08,y:.13},{x:.08,y:.13},{x:.08,y:.13},{x:.09,y:.13},{x:.09,y:.12},{x:.09,y:.12},{x:.09,y:.12},{x:.09,y:.12},{x:.1,y:.11},{x:.1,y:.11},{x:.1,y:.1},{x:.1,y:.1},{x:.11,y:.09},{x:.11,y:.09},{x:.11,y:.09},{x:.11,y:.08},{x:.11,y:.08},{x:.11,y:.08},{x:.11,y:.07},{x:.11,y:.07},{x:.11,y:.07},{x:.11,y:.06},{x:.11,y:.06},{x:.1,y:.06},{x:.1,y:.06},{x:.09,y:.06},{x:.09,y:.06},{x:.08,y:.06},{x:.07,y:.06},{x:.07,y:.06},{x:.06,y:.06},{x:.05,y:.06},{x:.05,y:.06},{x:.04,y:.06},{x:.03,y:.06},{x:.03,y:.06},{x:.02,y:.06},{x:.01,y:.06},{x:.01,y:.06},{x:0,y:.06},{x:-.01,y:.06},{x:-.01,y:.06},{x:-.02,y:.06},{x:-.03,y:.06},{x:-.03,y:.06},{x:-.04,y:.06},{x:-.05,y:.06},{x:-.05,y:.06},{x:-.06,y:.06},{x:-.07,y:.06},{x:-.07,y:.06},{x:-.08,y:.06},{x:-.09,y:.06},{x:-.09,y:.06}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:.01,y:.27},bottom1:{type:"text",text:"{VAL}",x:-.16,y:-.27}},refblocks:{left1:{x:-.47,y:-.09},right1:{x:.47,y:-.09}},bounds:{width:1,height:.53,centerX:0,centerY:0},circles:{}},{paths:DTt,texts:cSe,bounds:NF,refblocks:lSe,circles:ATt}=ETt,uSe=za({primitives:[...Object.values(DTt),...Object.values(ATt),{...cSe.top1,anchor:"middle_bottom",x:0},{...cSe.bottom1,anchor:"middle_top",x:0}],ports:[{...lSe.left1,labels:["1"]},{...lSe.right1,labels:["2"]}],size:{width:NF.width,height:NF.height},center:{x:NF.centerX+.006,y:NF.centerY+.06}}),QQ=ro(uSe),lA=QQ.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),HF=QQ.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");lA.anchor="middle_left",HF.anchor="middle_right",lA.x=lA.x-.03,lA.y=lA.y,HF.x=HF.x,HF.y=0;var RTt=QQ,kTt={paths:{path11:{type:"path",points:[{x:-.42,y:-.1},{x:.05,y:-.11}],color:"primary",fill:!1},path40:{type:"path",points:[{x:.09,y:.19},{x:.09,y:-.18}],color:"primary",fill:!1},"path12-1":{type:"path",points:[{x:.3,y:.55},{x:.3,y:.11}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:.31,y:-.55},{x:.31,y:-.01}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.09,y:.11},{x:.31,y:.11}],color:"primary",fill:!1},"path2-5":{type:"path",points:[{x:.09,y:-.1},{x:.31,y:-.1}],color:"primary",fill:!1},path15:{type:"path",points:[{x:.27,y:-.04},{x:.27,y:.03},{x:.2,y:0},{x:.27,y:-.04}],color:"primary",fill:!0},"path2-0":{type:"path",points:[{x:.09,y:0},{x:.31,y:-.01}],color:"primary",fill:!1},"path12-1-0":{type:"path",points:[{x:.05,y:.17},{x:.05,y:-.11}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.13,y:.36},bottom1:{type:"text",text:"{VAL}",x:.06,y:-.42}},refblocks:{top1:{x:.3,y:.55},bottom1:{x:.31,y:-.55},left1:{x:-.42,y:-.1}},bounds:{width:.89,height:1.16,centerX:0,centerY:0},circles:{path1:{type:"circle",x:.16,y:0,radius:.29,color:"primary",fill:!1}}},{paths:NTt,texts:_Se,bounds:IF,refblocks:ZQ,circles:HTt}=kTt,dSe=za({primitives:[...Object.values(NTt),...Object.values(HTt),{..._Se.top1,anchor:"middle_right",x:0},{..._Se.bottom1,anchor:"middle_right",x:0}],ports:[{...ZQ.top1,labels:["1","drain"]},{...ZQ.bottom1,labels:["2","source"]},{...ZQ.left1,labels:["3","gate"]}],size:{width:IF.width,height:IF.height},center:{x:IF.centerX,y:IF.centerY}}),hSe=ro(dSe),mSe=hSe.primitives.filter(t=>t.type==="text"),eZ=mSe.find(t=>t.text==="{VAL}");eZ.x=-.35,eZ.y=0,eZ.anchor="middle_right";var tZ=mSe.find(t=>t.text==="{REF}");tZ.y=0,tZ.x=.35,tZ.anchor="middle_left";var ITt=hSe,LTt={paths:{path11:{type:"path",points:[{x:-.42,y:-.1},{x:.05,y:-.11}],color:"primary",fill:!1},"path12-1":{type:"path",points:[{x:.3,y:.55},{x:.3,y:.11}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:.31,y:-.55},{x:.31,y:-.01}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.09,y:.11},{x:.31,y:.11}],color:"primary",fill:!1},"path2-8-3-7":{type:"path",points:[{x:.09,y:.15},{x:.09,y:.07}],color:"primary",fill:!1},"path2-5":{type:"path",points:[{x:.09,y:-.1},{x:.31,y:-.1}],color:"primary",fill:!1},"path2-8-3":{type:"path",points:[{x:.09,y:-.08},{x:.09,y:-.15}],color:"primary",fill:!1},"path2-8-3-2":{type:"path",points:[{x:.09,y:.03},{x:.09,y:-.04}],color:"primary",fill:!1},path15:{type:"path",points:[{x:.27,y:-.04},{x:.27,y:.03},{x:.2,y:0},{x:.27,y:-.04}],color:"primary",fill:!0},"path2-0":{type:"path",points:[{x:.09,y:0},{x:.31,y:-.01}],color:"primary",fill:!1},"path12-1-0":{type:"path",points:[{x:.05,y:.11},{x:.05,y:-.11}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.13,y:.36},bottom1:{type:"text",text:"{VAL}",x:.06,y:-.42}},refblocks:{top1:{x:.3,y:.55},bottom1:{x:.31,y:-.55},left1:{x:-.42,y:-.1}},bounds:{width:.89,height:1.16,centerX:0,centerY:0},circles:{path1:{type:"circle",x:.16,y:0,radius:.29,color:"primary",fill:!1}}},{paths:OTt,texts:pSe,bounds:LF,refblocks:nZ,circles:FTt}=LTt,fSe=za({primitives:[...Object.values(OTt),...Object.values(FTt),{...pSe.top1,anchor:"middle_right",x:0},{...pSe.bottom1,anchor:"middle_right",x:0}],ports:[{...nZ.top1,labels:["1","drain"]},{...nZ.bottom1,labels:["2","source"]},{...nZ.left1,labels:["3","gate"]}],size:{width:LF.width,height:LF.height},center:{x:LF.centerX,y:LF.centerY}}),xSe=ro(fSe),gSe=xSe.primitives.filter(t=>t.type==="text"),oZ=gSe.find(t=>t.text==="{VAL}");oZ.x=-.35,oZ.y=0,oZ.anchor="middle_right";var rZ=gSe.find(t=>t.text==="{REF}");rZ.y=0,rZ.x=.35,rZ.anchor="middle_left";var BTt=xSe,zTt={paths:{path11:{type:"path",points:[{x:-.4,y:0},{x:.06,y:-.01}],color:"primary",fill:!1},path40:{type:"path",points:[{x:.07,y:.19},{x:.07,y:-.18}],color:"primary",fill:!1},"path12-1":{type:"path",points:[{x:.28,y:.55},{x:.28,y:.11}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:.29,y:-.55},{x:.29,y:-.1}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.07,y:.11},{x:.29,y:.11}],color:"primary",fill:!1},"path2-5":{type:"path",points:[{x:.07,y:-.1},{x:.29,y:-.1}],color:"primary",fill:!1},path15:{type:"path",points:[{x:-.08,y:.06},{x:-.08,y:-.07},{x:.01,y:0},{x:-.08,y:.06}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.15,y:.36},bottom1:{type:"text",text:"{VAL}",x:.04,y:-.42}},refblocks:{top1:{x:.28,y:.55},bottom1:{x:.29,y:-.55},left1:{x:-.4,y:0}},bounds:{width:.85,height:1.16,centerX:0,centerY:0},circles:{path1:{type:"circle",x:.14,y:0,radius:.29,color:"primary",fill:!1}}},{paths:VTt,texts:ySe,bounds:OF,refblocks:iZ,circles:$Tt}=zTt,bSe=za({primitives:[...Object.values(VTt),...Object.values($Tt),{...ySe.top1,anchor:"middle_right",x:0},{...ySe.bottom1,anchor:"middle_right",x:0}],ports:[{...iZ.top1,labels:["1","drain"]},{...iZ.bottom1,labels:["2","source"]},{...iZ.left1,labels:["3","gate"]}],size:{width:OF.width,height:OF.height},center:{x:OF.centerX,y:OF.centerY}}),PSe=ro(bSe),vSe=PSe.primitives.filter(t=>t.type==="text"),sZ=vSe.find(t=>t.text==="{VAL}");sZ.x=-.35,sZ.y=0,sZ.anchor="middle_right";var aZ=vSe.find(t=>t.text==="{REF}");aZ.y=0,aZ.x=.35,aZ.anchor="middle_left";var WTt=PSe,UTt={paths:{diag1:{type:"path",points:[{x:-.1,y:-.1},{x:.1,y:.1}],color:"primary",fill:!1},diag2:{type:"path",points:[{x:-.1,y:.1},{x:.1,y:-.1}],color:"primary",fill:!1},stem:{type:"path",points:[{x:-.2,y:0},{x:0,y:0}],color:"primary",fill:!1}},refblocks:{left1:{x:-.2,y:0}},bounds:{centerX:0,centerY:0}},{paths:XTt,bounds:SSe,refblocks:jTt}=UTt,FF=cn({primitives:[...Object.values(XTt)],ports:[{...jTt.left1,labels:["1"]}],center:{x:SSe.centerX,y:SSe.centerY}}).rotateRightFacingSymbol("right").labelPort("left1",["1"]).build(),GTt=ro(FF,"down"),YTt=ro(FF,"left"),qTt=ro(FF,"up"),$7={paths:{path11:{type:"path",points:[{x:-.4,y:0},{x:.06,y:-.01}],color:"primary",fill:!1},"path40-0":{type:"path",points:[{x:.07,y:.27},{x:.07,y:-.28}],color:"primary",fill:!1},"path40-0-5":{type:"path",points:[{x:.28,y:.24},{x:.08,y:.11}],color:"primary",fill:!1},"path40-0-5-0":{type:"path",points:[{x:.29,y:-.24},{x:.09,y:-.11}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:.29,y:.25},{x:.29,y:.55}],color:"primary",fill:!1},"path12-1-5-3":{type:"path",points:[{x:.29,y:-.55},{x:.29,y:-.25}],color:"primary",fill:!1},path15:{type:"path",points:[{x:.19,y:-.1},{x:.12,y:-.2},{x:.22,y:-.2},{x:.19,y:-.1}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.08,y:.36},bottom1:{type:"text",text:"{VAL}",x:-.07,y:-.41}},refblocks:{top1:{x:.29,y:.55},bottom1:{x:.29,y:-.55},left1:{x:-.4,y:0}},bounds:{minX:-.43,maxX:.43,minY:-.58,maxY:.58,width:.85,height:1.16,centerX:0,centerY:0},circles:{"path1-0":{type:"circle",x:.14,y:0,radius:.29,color:"primary",fill:!1}}},{paths:JTt,texts:aio,bounds:BF,refblocks:cZ,circles:KTt}=$7,QTt=cn({primitives:[...Object.values(JTt),...Object.values(KTt),{type:"text",text:"{REF}",x:-.1,y:.3094553499999995},{type:"text",text:"{VAL}",x:-.1,y:-.3094553499999995}],ports:[{...cZ.top1,labels:["1","collector"]},{...cZ.bottom1,labels:["2","emitter"]},{...cZ.left1,labels:["3","base"]}],size:{width:BF.width,height:BF.height},center:{x:BF.centerX,y:BF.centerY}}).rotateRightFacingSymbol("right").changeTextAnchor("{REF}","middle_right").changeTextAnchor("{VAL}","middle_right").build(),{paths:cio,texts:lio,bounds:uio,refblocks:_io,circles:dio}=$7,ZTt=cn($7).rotateRightFacingSymbol("up").changeTextAnchor("{VAL}","middle_left").labelPort("left1",["3","base"]).labelPort("top1",["1","collector"]).labelPort("bottom1",["2","emitter"]).changeTextAnchor("{REF}","middle_right").build(),{paths:ewt,texts:hio,bounds:zF,refblocks:lZ,circles:twt}=$7,nwt=cn({primitives:[...Object.values(ewt),...Object.values(twt),{type:"text",text:"{REF}",x:-.1,y:-.3094553499999995},{type:"text",text:"{VAL}",x:-.1,y:.3094553499999995}],ports:[{...lZ.top1,labels:["1","collector"]},{...lZ.bottom1,labels:["2","emitter"]},{...lZ.left1,labels:["3","base"]}],size:{width:zF.width,height:zF.height},center:{x:zF.centerX,y:zF.centerY}}).rotateRightFacingSymbol("down").changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_bottom").build(),{paths:owt,texts:mio,bounds:VF,refblocks:uZ,circles:rwt}=$7,iwt=cn({primitives:[...Object.values(owt),...Object.values(rwt),{type:"text",text:"{REF}",x:-.1,y:-.3094553499999995},{type:"text",text:"{VAL}",x:-.1,y:.3094553499999995}],ports:[{...uZ.top1,labels:["1","collector"]},{...uZ.bottom1,labels:["2","emitter"]},{...uZ.left1,labels:["3","base"]}],size:{width:VF.width,height:VF.height},center:{x:VF.centerX,y:VF.centerY}}).rotateRightFacingSymbol("up").changeTextAnchor("{REF}","middle_top").changeTextAnchor("{VAL}","middle_top").build(),{paths:swt,texts:pio,bounds:$F,refblocks:_Z,circles:awt}=$7,cwt=cn({primitives:[...Object.values(swt),...Object.values(awt),{type:"text",text:"{REF}",x:-.1,y:-.3094553499999995},{type:"text",text:"{VAL}",x:-.1,y:.3094553499999995}],ports:[{..._Z.top1,labels:["1","collector"]},{..._Z.bottom1,labels:["2","emitter"]},{..._Z.left1,labels:["3","base"]}],size:{width:$F.width,height:$F.height},center:{x:$F.centerX,y:$F.centerY}}).rotateRightFacingSymbol("left").changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:lwt,texts:fio,bounds:WF,refblocks:dZ,circles:uwt}=$7,_wt=cn({primitives:[...Object.values(lwt),...Object.values(uwt),{type:"text",text:"{REF}",x:-.1,y:-.3094553499999995},{type:"text",text:"{VAL}",x:-.1,y:.3094553499999995}],ports:[{...dZ.top1,labels:["1","collector"]},{...dZ.bottom1,labels:["2","emitter"]},{...dZ.left1,labels:["3","base"]}],size:{width:WF.width,height:WF.height},center:{x:WF.centerX,y:WF.centerY}}).rotateRightFacingSymbol("left").changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),dwt={paths:{path40:{type:"path",points:[{x:.14,y:.04},{x:-.32,y:-.21}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.32,y:.31},{x:.14,y:.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.32,y:-.21},{x:-.32,y:.31}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.32,y:.18},{x:-.57,y:.18}],color:"primary",fill:!1},path45:{type:"path",points:[{x:-.32,y:-.09},{x:-.57,y:-.09}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.43,y:.04},{x:.15,y:.04}],color:"primary",fill:!1},"rect1577-3":{type:"path",points:[{x:-.2,y:.18},{x:-.27,y:.18}],color:"primary",fill:!0},"rect1577-4":{type:"path",points:[{x:-.2,y:-.09},{x:-.27,y:-.09}],color:"primary",fill:!0},"rect1577-4-7":{type:"path",points:[{x:-.23,y:-.05},{x:-.23,y:-.12}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.01,y:.42},bottom1:{type:"text",text:"{VAL}",x:0,y:-.3}},refblocks:{left1:{x:-.57,y:.18},left2:{x:-.57,y:-.09},right1:{x:.43,y:.04}},bounds:{minX:-.55,maxX:.55,minY:-.38,maxY:.27,width:1.09,height:.3,centerX:0,centerY:.05},circles:{}},UF=cn(dwt).labelPort("left1",["1","inp1"]).labelPort("left2",["2","inp2"]).labelPort("right1",["3","out"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),hwt=ro(UF,"down"),mwt=ro(UF,"left"),pwt=ro(UF,"up"),fwt={paths:{path40:{type:"path",points:[{x:.14,y:.04},{x:-.32,y:-.21}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.32,y:.31},{x:.14,y:.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.32,y:-.21},{x:-.32,y:.31}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.32,y:.18},{x:-.57,y:.18}],color:"primary",fill:!1},path45:{type:"path",points:[{x:-.32,y:-.09},{x:-.57,y:-.09}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.43,y:.04},{x:.15,y:.04}],color:"primary",fill:!1},"path44-1":{type:"path",points:[{x:-.1,y:.44},{x:-.1,y:.18}],color:"primary",fill:!1},"path44-2":{type:"path",points:[{x:-.09,y:-.34},{x:-.09,y:-.09}],color:"primary",fill:!1},"rect1577-3":{type:"path",points:[{x:-.2,y:.18},{x:-.27,y:.18}],color:"primary",fill:!0},"rect1577-4":{type:"path",points:[{x:-.2,y:-.09},{x:-.27,y:-.09}],color:"primary",fill:!0},"rect1577-4-7":{type:"path",points:[{x:-.23,y:.14},{x:-.23,y:.22}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:.25,y:.32},bottom1:{type:"text",text:"{VAL}",x:.25,y:-.24}},refblocks:{left1:{x:-.57,y:.18},left2:{x:-.57,y:-.09},right1:{x:.43,y:.04},top2:{x:-.1,y:.44},bottom1:{x:-.09,y:-.34}},bounds:{minX:-.55,maxX:.55,minY:-.38,maxY:.27,width:1.09,height:.3,centerX:0,centerY:.05},circles:{}},XF=cn(fwt).labelPort("left1",["1","inp1"]).labelPort("left2",["2","inp2"]).labelPort("right1",["4","out"]).labelPort("top2",["5","V+"]).labelPort("bottom1",["3","V-"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),xwt=ro(XF,"down"),gwt=ro(XF,"left"),ywt=ro(XF,"up"),bwt={paths:{path11:{type:"path",points:[{x:-.42,y:-.1},{x:.05,y:-.11}],color:"primary",fill:!1},path40:{type:"path",points:[{x:.09,y:.19},{x:.09,y:-.18}],color:"primary",fill:!1},"path12-1":{type:"path",points:[{x:.3,y:.55},{x:.3,y:.11}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:.31,y:-.55},{x:.31,y:-.01}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.09,y:.11},{x:.31,y:.11}],color:"primary",fill:!1},"path2-5":{type:"path",points:[{x:.09,y:-.1},{x:.31,y:-.1}],color:"primary",fill:!1},path15:{type:"path",points:[{x:.2,y:.03},{x:.2,y:-.04},{x:.27,y:-.01},{x:.2,y:.03}],color:"primary",fill:!0},"path2-0":{type:"path",points:[{x:.09,y:0},{x:.31,y:-.01}],color:"primary",fill:!1},"path12-1-0":{type:"path",points:[{x:.05,y:.17},{x:.05,y:-.11}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.13,y:.36},bottom1:{type:"text",text:"{VAL}",x:.06,y:-.42}},refblocks:{top1:{x:.3,y:.55},bottom1:{x:.31,y:-.55},left1:{x:-.42,y:-.1}},bounds:{width:.89,height:1.16,centerX:0,centerY:0},circles:{path1:{type:"circle",x:.16,y:0,radius:.29,color:"primary",fill:!1}}},{paths:Pwt,texts:CSe,bounds:jF,refblocks:hZ,circles:vwt}=bwt,MSe=za({primitives:[...Object.values(Pwt),...Object.values(vwt),{...CSe.top1,anchor:"middle_right",x:0},{...CSe.bottom1,anchor:"middle_right",x:0}],ports:[{...hZ.top1,labels:["1","drain"]},{...hZ.bottom1,labels:["2","source"]},{...hZ.left1,labels:["3","gate"]}],size:{width:jF.width,height:jF.height},center:{x:jF.centerX,y:jF.centerY}}),TSe=ro(MSe),wSe=TSe.primitives.filter(t=>t.type==="text"),mZ=wSe.find(t=>t.text==="{VAL}");mZ.x=-.35,mZ.y=0,mZ.anchor="middle_right";var pZ=wSe.find(t=>t.text==="{REF}");pZ.y=0,pZ.x=.35,pZ.anchor="middle_left";var Swt=TSe,Cwt={paths:{path11:{type:"path",points:[{x:-.42,y:-.1},{x:.05,y:-.11}],color:"primary",fill:!1},"path12-1":{type:"path",points:[{x:.3,y:.55},{x:.3,y:.11}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:.31,y:-.55},{x:.31,y:-.01}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.09,y:.11},{x:.31,y:.11}],color:"primary",fill:!1},"path2-8-3-7":{type:"path",points:[{x:.09,y:.15},{x:.09,y:.07}],color:"primary",fill:!1},"path2-5":{type:"path",points:[{x:.09,y:-.1},{x:.31,y:-.1}],color:"primary",fill:!1},"path2-8-3":{type:"path",points:[{x:.09,y:-.08},{x:.09,y:-.15}],color:"primary",fill:!1},"path2-8-3-2":{type:"path",points:[{x:.09,y:.03},{x:.09,y:-.04}],color:"primary",fill:!1},path15:{type:"path",points:[{x:.2,y:.03},{x:.2,y:-.04},{x:.27,y:-.01},{x:.2,y:.03}],color:"primary",fill:!0},"path2-0":{type:"path",points:[{x:.09,y:0},{x:.31,y:-.01}],color:"primary",fill:!1},"path12-1-0":{type:"path",points:[{x:.05,y:.11},{x:.05,y:-.11}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.13,y:.36},bottom1:{type:"text",text:"{VAL}",x:.06,y:-.42}},refblocks:{top1:{x:.3,y:.55},bottom1:{x:.31,y:-.55},left1:{x:-.42,y:-.1}},bounds:{width:.89,height:1.16,centerX:0,centerY:0},circles:{path1:{type:"circle",x:.16,y:0,radius:.29,color:"primary",fill:!1}}},{paths:Mwt,texts:ESe,bounds:GF,refblocks:fZ,circles:Twt}=Cwt,DSe=za({primitives:[...Object.values(Mwt),...Object.values(Twt),{...ESe.top1,anchor:"middle_right",x:0},{...ESe.bottom1,anchor:"middle_right",x:0}],ports:[{...fZ.top1,labels:["1","drain"]},{...fZ.bottom1,labels:["2","source"]},{...fZ.left1,labels:["3","gate"]}],size:{width:GF.width,height:GF.height},center:{x:GF.centerX,y:GF.centerY}}),ASe=ro(DSe),RSe=ASe.primitives.filter(t=>t.type==="text"),xZ=RSe.find(t=>t.text==="{VAL}");xZ.x=-.35,xZ.y=0,xZ.anchor="middle_right";var gZ=RSe.find(t=>t.text==="{REF}");gZ.y=0,gZ.x=.35,gZ.anchor="middle_left";var wwt=ASe,Ewt={paths:{path11:{type:"path",points:[{x:-.54,y:-.01},{x:-.15,y:-.02}],color:"primary",fill:!1},path40:{type:"path",points:[{x:.13,y:0},{x:-.13,y:-.13}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.13,y:.13},{x:.13,y:0}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.13,y:-.13},{x:-.13,y:.13}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.13,y:.13},{x:.13,y:-.13}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.14,y:0},{x:.54,y:-.01}],color:"primary",fill:!1},"path25-0":{type:"path",points:[{x:.2,y:.38},{x:.16,y:.28},{x:.26,y:.3}],color:"primary",fill:!0},"path78-6":{type:"path",points:[{x:.33,y:.43},{x:.32,y:.42},{x:.21,y:.31},{x:.21,y:.31}],color:"primary",fill:!1},"path25-0-9":{type:"path",points:[{x:.35,y:.35},{x:.31,y:.26},{x:.41,y:.27}],color:"primary",fill:!0},"path78-6-5":{type:"path",points:[{x:.48,y:.4},{x:.47,y:.39},{x:.35,y:.29},{x:.35,y:.29}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.1,y:.35},bottom1:{type:"text",text:"{VAL}",x:0,y:-.43}},refblocks:{left1:{x:-.54,y:-.01},right1:{x:.54,y:-.01}},bounds:{minX:-.57,maxX:.57,minY:-.43,maxY:.43,width:1.14,height:.85,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:-.01,radius:.29,color:"primary",fill:!1}}},kSe=cn(Ewt).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),NSe=ro(kSe),Dwt=NSe.primitives.filter(t=>t.type==="text"),HSe=Dwt.find(t=>t.text==="{REF}");HSe.y=0,HSe.anchor="middle_left";var Awt=NSe,Rwt={paths:{path11:{type:"path",points:[{x:-.4,y:0},{x:.06,y:-.01}],color:"primary",fill:!1},path40:{type:"path",points:[{x:.07,y:.19},{x:.07,y:-.18}],color:"primary",fill:!1},"path12-1":{type:"path",points:[{x:.28,y:.55},{x:.28,y:.11}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:.29,y:-.55},{x:.29,y:-.1}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.07,y:.11},{x:.29,y:.11}],color:"primary",fill:!1},"path2-5":{type:"path",points:[{x:.07,y:-.1},{x:.29,y:-.1}],color:"primary",fill:!1},path15:{type:"path",points:[{x:.01,y:-.07},{x:.01,y:.06},{x:-.08,y:0},{x:.01,y:-.07}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.15,y:.36},bottom1:{type:"text",text:"{VAL}",x:.04,y:-.42}},refblocks:{top1:{x:.28,y:.55},bottom1:{x:.29,y:-.55},left1:{x:-.4,y:0}},bounds:{width:.85,height:1.16,centerX:0,centerY:0},circles:{path1:{type:"circle",x:.14,y:0,radius:.29,color:"primary",fill:!1}}},{paths:kwt,texts:ISe,bounds:YF,refblocks:yZ,circles:Nwt}=Rwt,LSe=za({primitives:[...Object.values(kwt),...Object.values(Nwt),{...ISe.top1,anchor:"middle_right",x:0},{...ISe.bottom1,anchor:"middle_right"}],ports:[{...yZ.top1,labels:["1","drain"]},{...yZ.bottom1,labels:["2","source"]},{...yZ.left1,labels:["3","gate"]}],size:{width:YF.width,height:YF.height},center:{x:YF.centerX,y:YF.centerY}}),OSe=ro(LSe),FSe=OSe.primitives.filter(t=>t.type==="text"),bZ=FSe.find(t=>t.text==="{VAL}");bZ.x=-.35,bZ.y=0,bZ.anchor="middle_right";var PZ=FSe.find(t=>t.text==="{REF}");PZ.y=0,PZ.x=.35,PZ.anchor="middle_left";var Hwt=OSe,W7={paths:{path11:{type:"path",points:[{x:-.4,y:0},{x:.06,y:-.01}],color:"primary",fill:!1},"path40-0":{type:"path",points:[{x:.07,y:.27},{x:.07,y:-.28}],color:"primary",fill:!1},"path40-0-5":{type:"path",points:[{x:.28,y:.24},{x:.08,y:.11}],color:"primary",fill:!1},"path40-0-5-0":{type:"path",points:[{x:.29,y:-.24},{x:.09,y:-.11}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:.29,y:.25},{x:.29,y:.55}],color:"primary",fill:!1},"path12-1-5-3":{type:"path",points:[{x:.29,y:-.55},{x:.29,y:-.25}],color:"primary",fill:!1},path15:{type:"path",points:[{x:.15,y:-.23},{x:.22,y:-.12},{x:.12,y:-.12},{x:.15,y:-.23}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.08,y:.37},bottom1:{type:"text",text:"{VAL}",x:-.07,y:-.41}},refblocks:{top1:{x:.29,y:.55},bottom1:{x:.29,y:-.55},left1:{x:-.4,y:0}},bounds:{minX:-.43,maxX:.43,minY:-.58,maxY:.58,width:.85,height:1.16,centerX:0,centerY:0},circles:{"path1-0":{type:"circle",x:.14,y:0,radius:.29,color:"primary",fill:!1}}},{paths:Iwt,texts:xio,bounds:qF,refblocks:vZ,circles:Lwt}=W7,Owt=cn({primitives:[...Object.values(Iwt),...Object.values(Lwt),{type:"text",text:"{REF}",x:-.1,y:.3094553499999995},{type:"text",text:"{VAL}",x:-.1,y:-.3094553499999995}],ports:[{...vZ.top1,labels:["1","collector"]},{...vZ.bottom1,labels:["2","emitter"]},{...vZ.left1,labels:["3","base"]}],size:{width:qF.width,height:qF.height},center:{x:qF.centerX,y:qF.centerY}}).rotateRightFacingSymbol("right").changeTextAnchor("{REF}","middle_right").changeTextAnchor("{VAL}","middle_right").build(),{paths:gio,texts:yio,bounds:bio,refblocks:Pio,circles:vio}=W7,Fwt=cn(W7).rotateRightFacingSymbol("up").changeTextAnchor("{VAL}","middle_left").labelPort("left1",["3","base"]).labelPort("top1",["1","collector"]).labelPort("bottom1",["2","emitter"]).changeTextAnchor("{REF}","middle_right").build(),{paths:Bwt,texts:Sio,bounds:JF,refblocks:SZ,circles:zwt}=W7,Vwt=cn({primitives:[...Object.values(Bwt),...Object.values(zwt),{type:"text",text:"{REF}",x:-.1,y:-.3094553499999995},{type:"text",text:"{VAL}",x:-.1,y:.3094553499999995}],ports:[{...SZ.top1,labels:["1","collector"]},{...SZ.bottom1,labels:["2","emitter"]},{...SZ.left1,labels:["3","base"]}],size:{width:JF.width,height:JF.height},center:{x:JF.centerX,y:JF.centerY}}).rotateRightFacingSymbol("down").changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_bottom").build(),{paths:$wt,texts:Cio,bounds:KF,refblocks:CZ,circles:Wwt}=W7,Uwt=cn({primitives:[...Object.values($wt),...Object.values(Wwt),{type:"text",text:"{REF}",x:-.1,y:-.3094553499999995},{type:"text",text:"{VAL}",x:-.1,y:.3094553499999995}],ports:[{...CZ.top1,labels:["1","collector"]},{...CZ.bottom1,labels:["2","emitter"]},{...CZ.left1,labels:["3","base"]}],size:{width:KF.width,height:KF.height},center:{x:KF.centerX,y:KF.centerY}}).rotateRightFacingSymbol("up").changeTextAnchor("{REF}","middle_top").changeTextAnchor("{VAL}","middle_top").build(),{paths:Xwt,texts:Mio,bounds:QF,refblocks:MZ,circles:jwt}=W7,Gwt=cn({primitives:[...Object.values(Xwt),...Object.values(jwt),{type:"text",text:"{REF}",x:-.1,y:-.3094553499999995},{type:"text",text:"{VAL}",x:-.1,y:.3094553499999995}],ports:[{...MZ.top1,labels:["1","collector"]},{...MZ.bottom1,labels:["2","emitter"]},{...MZ.left1,labels:["3","base"]}],size:{width:QF.width,height:QF.height},center:{x:QF.centerX,y:QF.centerY}}).rotateRightFacingSymbol("left").changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:Ywt,texts:Tio,bounds:ZF,refblocks:TZ,circles:qwt}=W7,Jwt=cn({primitives:[...Object.values(Ywt),...Object.values(qwt),{type:"text",text:"{REF}",x:-.1,y:-.3094553499999995},{type:"text",text:"{VAL}",x:-.1,y:.3094553499999995}],ports:[{...TZ.top1,labels:["1","collector"]},{...TZ.bottom1,labels:["2","emitter"]},{...TZ.left1,labels:["3","base"]}],size:{width:ZF.width,height:ZF.height},center:{x:ZF.centerX,y:ZF.centerY}}).rotateRightFacingSymbol("left").changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),Kwt={paths:{path40:{type:"path",points:[{x:-.19,y:.33},{x:-.26,y:.14}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.38,y:.26},{x:-.19,y:.33}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.26,y:.14},{x:-.38,y:.26}],color:"primary",fill:!1},path43:{type:"path",points:[{x:-.26,y:.39},{x:-.13,y:.26}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.32,y:.2},{x:-.52,y:0}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:0,y:.52},{x:-.19,y:.33}],color:"primary",fill:!1},"path40-4":{type:"path",points:[{x:-.19,y:-.32},{x:-.38,y:-.26}],color:"primary",fill:!1},"path41-1":{type:"path",points:[{x:-.26,y:-.13},{x:-.19,y:-.32}],color:"primary",fill:!1},"path42-7":{type:"path",points:[{x:-.38,y:-.26},{x:-.26,y:-.13}],color:"primary",fill:!1},"path43-1":{type:"path",points:[{x:-.13,y:-.26},{x:-.26,y:-.39}],color:"primary",fill:!1},"path44-8":{type:"path",points:[{x:-.32,y:-.19},{x:-.51,y:-.01}],color:"primary",fill:!1},"path44-0-7":{type:"path",points:[{x:-.01,y:-.5},{x:-.19,y:-.32}],color:"primary",fill:!1},"path40-4-0":{type:"path",points:[{x:.32,y:.19},{x:.13,y:.26}],color:"primary",fill:!1},"path41-1-2":{type:"path",points:[{x:.26,y:.38},{x:.32,y:.19}],color:"primary",fill:!1},"path42-7-1":{type:"path",points:[{x:.13,y:.26},{x:.26,y:.38}],color:"primary",fill:!1},"path43-1-8":{type:"path",points:[{x:.39,y:.26},{x:.26,y:.13}],color:"primary",fill:!1},"path44-8-7":{type:"path",points:[{x:.2,y:.32},{x:.01,y:.51}],color:"primary",fill:!1},"path44-0-7-1":{type:"path",points:[{x:.52,y:0},{x:.32,y:.19}],color:"primary",fill:!1},"path40-4-8":{type:"path",points:[{x:.32,y:-.19},{x:.26,y:-.38}],color:"primary",fill:!1},"path41-1-4":{type:"path",points:[{x:.13,y:-.26},{x:.32,y:-.19}],color:"primary",fill:!1},"path42-7-0":{type:"path",points:[{x:.26,y:-.38},{x:.13,y:-.26}],color:"primary",fill:!1},"path43-1-0":{type:"path",points:[{x:.26,y:-.13},{x:.39,y:-.26}],color:"primary",fill:!1},"path44-8-9":{type:"path",points:[{x:.19,y:-.32},{x:0,y:-.52}],color:"primary",fill:!1},"path44-0-7-3":{type:"path",points:[{x:.5,y:-.01},{x:.32,y:-.19}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.29,y:.46},bottom1:{type:"text",text:"{VAL}",x:-.29,y:-.5}},refblocks:{left1:{x:-.52,y:0},right1:{x:.52,y:0}},bounds:{width:1.09,height:1.09,centerX:0,centerY:0}},{paths:Qwt,texts:BSe,bounds:eB,refblocks:zSe}=Kwt,VSe=za({primitives:[...Object.values(Qwt),{...BSe.bottom1,y:.35,anchor:"middle_top"},{...BSe.top1,anchor:"middle_left"}],ports:[{...zSe.left1,labels:["1"]},{...zSe.right1,labels:["2"]}],size:{width:eB.width+.05,height:eB.height},center:{x:eB.centerX,y:eB.centerY}}),Zwt=ro(VSe),eEt=Zwt,tEt={paths:{path18:{type:"path",points:[{x:-.53,y:0},{x:-.27,y:0}],color:"primary",fill:!1},path19:{type:"path",points:[{x:.26,y:0},{x:.53,y:0}],color:"primary",fill:!1},path20:{type:"path",points:[{x:0,y:.13},{x:.26,y:.13},{x:.26,y:-.13},{x:-.27,y:-.13},{x:-.27,y:.13},{x:0,y:.13}],color:"primary",fill:!1},path23:{type:"path",points:[{x:.28,y:-.28},{x:.18,y:-.25},{x:.25,y:-.18}],color:"primary",fill:!0},path24:{type:"path",points:[{x:.29,y:-.29},{x:.25,y:-.17},{x:.16,y:-.26}],color:"primary",fill:!0},path26:{type:"path",points:[{x:-.3,y:.29},{x:.23,y:-.23}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:.06,y:.2},bottom1:{type:"text",text:"{VAL}",x:-.1,y:-.28}},refblocks:{left1:{x:-.53,y:0},right1:{x:.53,y:0}},bounds:{width:1.13,height:.58,centerX:0,centerY:0}},{paths:nEt,texts:$Se,bounds:tB,refblocks:WSe}=tEt,nB=za({primitives:[...Object.values(nEt),{...$Se.bottom1,x:0,y:-.35,anchor:"middle_top"},{...$Se.top1,x:0,y:.35,anchor:"middle_bottom"}],ports:[{...WSe.left1,labels:["1"]},{...WSe.right1,labels:["2"]}],size:{width:tB.width+.05,height:tB.height},center:{x:tB.centerX,y:tB.centerY}}),wZ=ro(nB,"down"),EZ=wZ.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),DZ=wZ.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");EZ.anchor="middle_left",DZ.anchor="middle_left",EZ.y+=.31,EZ.x=.34,DZ.y-=.31,DZ.x=.34;var oEt=wZ,AZ=ro(nB,"left"),RZ=AZ.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),kZ=AZ.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");RZ.anchor="middle_bottom",kZ.anchor="middle_top",RZ.y+=.73,RZ.x=0,kZ.y-=.7,kZ.x=0;var rEt=AZ,NZ=ro(nB,"up"),HZ=NZ.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),IZ=NZ.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");HZ.anchor="middle_left",IZ.anchor="middle_left",HZ.y+=.21,HZ.x=.34,IZ.y-=.21,IZ.x=.34;var iEt=NZ,oB={paths:{path1:{type:"path",points:[{x:-.42,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:.42,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:{}},{paths:sEt,texts:wio,bounds:rB,refblocks:LZ,circles:aEt}=oB,cEt=cn({primitives:[...Object.values(sEt),...Object.values(aEt),{type:"text",text:"{REF}",x:-.15,y:.2394553499999995},{type:"text",text:"{VAL}",x:.15,y:.2394553499999995}],ports:[{...LZ.left,labels:["1"]},{...LZ.right,labels:["3"]},{...LZ.bottom,labels:["2"]}],size:{width:rB.width,height:rB.height},center:{x:rB.centerX,y:rB.centerY}}).rotateRightFacingSymbol("down").labelPort("left",["1"]).labelPort("right",["2"]).labelPort("bottom",["3"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:lEt,texts:Eio,bounds:iB,refblocks:OZ,circles:uEt}=oB,_Et=cn({primitives:[...Object.values(lEt),...Object.values(uEt),{type:"text",text:"{REF}",x:-.3,y:-.3894553499999995},{type:"text",text:"{VAL}",x:-.3,y:.3194553499999995}],ports:[{...OZ.left,labels:["1"]},{...OZ.right,labels:["3"]},{...OZ.bottom,labels:["2"]}],size:{width:iB.width,height:iB.height},center:{x:iB.centerX,y:iB.centerY}}).rotateRightFacingSymbol("left").labelPort("left",["1"]).labelPort("right",["2"]).labelPort("bottom",["3"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),dEt=cn(oB).labelPort("left",["1"]).labelPort("right",["3"]).labelPort("bottom",["2"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),{paths:hEt,texts:Dio,bounds:sB,refblocks:FZ,circles:mEt}=oB,pEt=cn({primitives:[...Object.values(hEt),...Object.values(mEt),{type:"text",text:"{REF}",x:.3,y:-.2894553499999995},{type:"text",text:"{VAL}",x:-.3,y:-.2894553499999995}],ports:[{...FZ.left,labels:["1"]},{...FZ.right,labels:["3"]},{...FZ.bottom,labels:["2"]}],size:{width:sB.width,height:sB.height},center:{x:sB.centerX,y:sB.centerY}}).rotateRightFacingSymbol("up").labelPort("left",["1"]).labelPort("right",["2"]).labelPort("bottom",["3"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),fEt={paths:{path11:{type:"path",points:[{x:-.54,y:.03},{x:-.3,y:.03}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.29,y:.03},{x:.54,y:.03}],color:"primary",fill:!1}},refblocks:{left1:{x:-.54,y:.03},right1:{x:.54,y:.03}},bounds:{width:1.14,height:.79,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:.04,radius:.29,color:"primary",fill:!1}}},{paths:xEt,bounds:aB,refblocks:USe,circles:gEt}=fEt,XSe=za({primitives:[...Object.values(xEt),...Object.values(gEt),{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:[{...USe.left1,labels:["1"]},{...USe.right1,labels:["2"]}],size:{width:aB.width,height:aB.height},center:{x:aB.centerX,y:aB.centerY}}),jSe=ro(XSe),BZ=jSe.primitives.filter(t=>t.type==="text"),zZ=BZ.find(t=>t.text==="{REF}"),VZ=BZ.find(t=>t.text==="{VAL}"),$Z=BZ.find(t=>t.text==="COS φ");zZ.x=.35,zZ.y=0,zZ.anchor="middle_left",VZ.anchor="middle_right",VZ.x=-.35,VZ.y=0,$Z.x=0,$Z.y=0,$Z.anchor="center";var yEt=jSe,bEt={paths:{"path12-1-8-6-9-9":{type:"path",points:[{x:.01,y:.03},{x:.01,y:-.09}],color:"primary",fill:!1},"path12-1-5-6-4":{type:"path",points:[{x:-.47,y:-.05},{x:-.17,y:-.05}],color:"primary",fill:!1},"path12-1-8-0-0":{type:"path",points:[{x:-.16,y:-.09},{x:.18,y:-.09}],color:"primary",fill:!1},"path12-1-0-1":{type:"path",points:[{x:.2,y:-.05},{x:.47,y:-.05}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:.01,y:.22},bottom1:{type:"text",text:"{VAL}",x:-.16,y:-.22}},refblocks:{left1:{x:-.47,y:-.05},right1:{x:.47,y:-.05}},bounds:{width:1,height:.45,centerX:0,centerY:0},circles:{"circle-2":{type:"circle",x:-.14,y:-.05,radius:.02,color:"primary",fill:!1},circle:{type:"circle",x:.17,y:-.05,radius:.02,color:"primary",fill:!1}}},{paths:PEt,texts:GSe,bounds:cB,refblocks:YSe,circles:vEt}=bEt,qSe=za({primitives:[...Object.values(PEt),...Object.values(vEt),{...GSe.top1,anchor:"middle_left"},{...GSe.bottom1,anchor:"middle_left"}],ports:[{...YSe.left1,labels:["1"]},{...YSe.right1,labels:["2"]}],size:{width:cB.width,height:cB.height},center:{x:cB.centerX,y:cB.centerY}}),SEt=ro(qSe,"up"),CEt={paths:{"path12-1-8-6-9-9":{type:"path",points:[{x:-.05,y:.09},{x:-.05,y:.04}],color:"primary",fill:!1},"path12-1-8-7-9-9":{type:"path",points:[{x:-.05,y:.09},{x:.07,y:.09}],color:"primary",fill:!1},"path12-1-8-6-9-10":{type:"path",points:[{x:.07,y:.09},{x:.07,y:.04}],color:"primary",fill:!1},"path12-1-5-6-4":{type:"path",points:[{x:-.47,y:-.05},{x:-.17,y:-.05}],color:"primary",fill:!1},"path12-1-8-0-0":{type:"path",points:[{x:-.16,y:.04},{x:.18,y:.04}],color:"primary",fill:!1},"path12-1-0-1":{type:"path",points:[{x:.2,y:-.05},{x:.47,y:-.05}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:.01,y:.29},bottom1:{type:"text",text:"{VAL}",x:-.16,y:-.22}},refblocks:{left1:{x:-.47,y:-.05},right1:{x:.47,y:-.05}},bounds:{width:1,height:.45,centerX:0,centerY:0},circles:{"circle-2":{type:"circle",x:-.14,y:-.05,radius:.02,color:"primary",fill:!1},circle:{type:"circle",x:.17,y:-.05,radius:.02,color:"primary",fill:!1}}},{paths:MEt,texts:JSe,bounds:lB,refblocks:KSe,circles:TEt}=CEt,QSe=za({primitives:[...Object.values(MEt),...Object.values(TEt),{...JSe.top1,anchor:"middle_left"},{...JSe.bottom1,anchor:"middle_left"}],ports:[{...KSe.left1,labels:["1"]},{...KSe.right1,labels:["2"]}],size:{width:lB.width,height:lB.height},center:{x:lB.centerX,y:lB.centerY}}),wEt=ro(QSe,"up"),uB={paths:{path12_rotated:{type:"path",points:[{x:-.09,y:.12},{x:-.09,y:-.12}],color:"primary",fill:!1},path2_rotated:{type:"path",points:[{x:-.09,y:0},{x:.09,y:0}],color:"primary",fill:!1}},refblocks:{left1:{x:.09,y:0}},bounds:{centerX:0,centerY:0},circles:{}},{paths:EEt,bounds:ZSe,refblocks:DEt,circles:AEt}=uB,REt=cn({primitives:[...Object.values(EEt),...Object.values(AEt),{type:"text",text:"{REF}",x:-.14,y:-0}],ports:[{...DEt.left1,labels:["1"]}],center:{x:ZSe.centerX,y:ZSe.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_top").build(),{paths:kEt,bounds:e8e,refblocks:NEt,circles:HEt}=uB,IEt=cn({primitives:[...Object.values(kEt),...Object.values(HEt),{type:"text",text:"{REF}",x:-.13,y:0}],ports:[{...NEt.left1,labels:["1"]}],center:{x:e8e.centerX,y:e8e.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_right").build(),{paths:LEt,bounds:t8e,refblocks:OEt,circles:FEt}=uB,BEt=cn({primitives:[...Object.values(LEt),...Object.values(FEt),{type:"text",text:"{REF}",x:-.14,y:-0}],ports:[{...OEt.left1,labels:["1"]}],center:{x:t8e.centerX,y:t8e.centerY}}).rotateRightFacingSymbol("left").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_left").build(),{paths:zEt,bounds:n8e,refblocks:VEt}=uB,$Et=cn({primitives:[...Object.values(zEt),{type:"text",text:"{REF}",x:-.14,y:0}],ports:[{...VEt.left1,labels:["1"]}],center:{x:n8e.centerX,y:n8e.centerY}}).rotateRightFacingSymbol("down").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_bottom").build(),WEt={paths:{path40:{type:"path",points:[{x:-.19,y:-.33},{x:-.26,y:-.14}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.38,y:-.26},{x:-.19,y:-.33}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.26,y:-.14},{x:-.38,y:-.26}],color:"primary",fill:!1},path43:{type:"path",points:[{x:-.26,y:-.39},{x:-.13,y:-.26}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.32,y:-.2},{x:-.52,y:0}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:0,y:-.52},{x:-.19,y:-.33}],color:"primary",fill:!1},"path40-4":{type:"path",points:[{x:-.19,y:.32},{x:-.38,y:.26}],color:"primary",fill:!1},"path41-1":{type:"path",points:[{x:-.26,y:.13},{x:-.19,y:.32}],color:"primary",fill:!1},"path42-7":{type:"path",points:[{x:-.38,y:.26},{x:-.26,y:.13}],color:"primary",fill:!1},"path43-1":{type:"path",points:[{x:-.13,y:.26},{x:-.26,y:.39}],color:"primary",fill:!1},"path44-8":{type:"path",points:[{x:-.32,y:.19},{x:-.51,y:.01}],color:"primary",fill:!1},"path44-0-7":{type:"path",points:[{x:-.01,y:.5},{x:-.19,y:.32}],color:"primary",fill:!1},"path40-4-0":{type:"path",points:[{x:.32,y:-.19},{x:.13,y:-.26}],color:"primary",fill:!1},"path41-1-2":{type:"path",points:[{x:.26,y:-.38},{x:.32,y:-.19}],color:"primary",fill:!1},"path42-7-1":{type:"path",points:[{x:.13,y:-.26},{x:.26,y:-.38}],color:"primary",fill:!1},"path43-1-8":{type:"path",points:[{x:.39,y:-.26},{x:.26,y:-.13}],color:"primary",fill:!1},"path44-8-7":{type:"path",points:[{x:.2,y:-.32},{x:.01,y:-.51}],color:"primary",fill:!1},"path44-0-7-1":{type:"path",points:[{x:.52,y:0},{x:.32,y:-.19}],color:"primary",fill:!1},"path40-4-8":{type:"path",points:[{x:.32,y:.19},{x:.26,y:.38}],color:"primary",fill:!1},"path41-1-4":{type:"path",points:[{x:.13,y:.26},{x:.32,y:.19}],color:"primary",fill:!1},"path42-7-0":{type:"path",points:[{x:.26,y:.38},{x:.13,y:.26}],color:"primary",fill:!1},"path43-1-0":{type:"path",points:[{x:.26,y:.13},{x:.39,y:.26}],color:"primary",fill:!1},"path44-8-9":{type:"path",points:[{x:.19,y:.32},{x:0,y:.52}],color:"primary",fill:!1},"path44-0-7-3":{type:"path",points:[{x:.5,y:.01},{x:.32,y:.19}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.29,y:-.46},bottom1:{type:"text",text:"{VAL}",x:-.29,y:.5}},refblocks:{top1:{x:0,y:-.52},bottom1:{x:0,y:.52},left1:{x:-.52,y:0},right1:{x:.52,y:0}},bounds:{width:1.09,height:1.1,centerX:0,centerY:0},circles:{}},{paths:UEt,texts:o8e,bounds:_B,refblocks:dB,circles:XEt}=WEt,r8e=za({primitives:[...Object.values(UEt),...Object.values(XEt),{...o8e.top1,anchor:"middle_right"},{...o8e.bottom1,anchor:"middle_right"}],ports:[{...dB.top1,labels:["1"]},{...dB.bottom1,labels:["2"]},{...dB.left1,labels:["3"]},{...dB.right1,labels:["4"]}],size:{width:_B.width,height:_B.height},center:{x:_B.centerX,y:_B.centerY}}),WZ=ro(r8e),jEt=WZ.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),GEt=WZ.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");jEt.anchor="middle_left",GEt.anchor="middle_right";var YEt=WZ,hB={paths:{path27:{type:"path",points:[{x:.47,y:.04},{x:.21,y:.04}],color:"primary",fill:!1},"path27-0":{type:"path",points:[{x:-.21,y:.04},{x:-.47,y:.04}],color:"primary",fill:!1},"path27-8-2-4":{type:"path",points:[{x:.21,y:.04},{x:.19,y:-.05}],color:"primary",fill:!1},"path27-8-2-4-29":{type:"path",points:[{x:-.19,y:.14},{x:-.21,y:.04}],color:"primary",fill:!1},"path27-8-2-4-5":{type:"path",points:[{x:.19,y:-.05},{x:.13,y:.14}],color:"primary",fill:!1},"path27-8-2-4-5-1":{type:"path",points:[{x:.08,y:-.05},{x:.13,y:.14}],color:"primary",fill:!1},"path27-8-2-4-5-1-9":{type:"path",points:[{x:.08,y:-.05},{x:.03,y:.14}],color:"primary",fill:!1},"path27-8-2-4-5-1-9-2":{type:"path",points:[{x:-.03,y:-.05},{x:.03,y:.14}],color:"primary",fill:!1},"path27-8-2-4-5-1-9-2-1":{type:"path",points:[{x:-.03,y:-.05},{x:-.08,y:.14}],color:"primary",fill:!1},"path27-8-2-4-5-1-9-2-1-2":{type:"path",points:[{x:-.13,y:-.05},{x:-.08,y:.14}],color:"primary",fill:!1},"path27-8-2-4-5-1-9-2-1-2-2":{type:"path",points:[{x:-.13,y:-.05},{x:-.19,y:.14}],color:"primary",fill:!1}},refblocks:{left1:{x:-.47,y:.04},right1:{x:.47,y:.04}},bounds:{width:.99,height:.84,centerX:0,centerY:0},circles:{}},{paths:qEt,bounds:mB,refblocks:i8e,circles:JEt}=hB,KEt=cn({primitives:[...Object.values(qEt),...Object.values(JEt),{type:"text",text:"{REF}",x:-.2,y:.2194553499999995},{type:"text",text:"{VAL}",x:.2,y:.2194553499999995}],ports:[{...i8e.left1,labels:["1"]},{...i8e.right1,labels:["2"]}],size:{width:mB.width,height:mB.height},center:{x:mB.centerX,y:mB.centerY}}).rotateRightFacingSymbol("down").labelPort("left",["1"]).labelPort("right",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:QEt,bounds:pB,refblocks:s8e,circles:ZEt}=hB,eDt=cn({primitives:[...Object.values(QEt),...Object.values(ZEt),{type:"text",text:"{REF}",x:0,y:-.1704553499999995},{type:"text",text:"{VAL}",x:0,y:.2294553499999995}],ports:[{...s8e.left1,labels:["1"]},{...s8e.right1,labels:["2"]}],size:{width:pB.width,height:pB.height},center:{x:pB.centerX,y:pB.centerY}}).rotateRightFacingSymbol("left").labelPort("left",["1"]).labelPort("right",["2"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),{paths:tDt,bounds:fB,refblocks:a8e,circles:nDt}=hB,oDt=cn({primitives:[...Object.values(tDt),...Object.values(nDt),{type:"text",text:"{REF}",x:0,y:.2294553499999995},{type:"text",text:"{VAL}",x:0,y:-.1704553499999995}],ports:[{...a8e.left1,labels:["1"]},{...a8e.right1,labels:["2"]}],size:{width:fB.width,height:fB.height},center:{x:fB.centerX,y:fB.centerY}}).rotateRightFacingSymbol("right").labelPort("left",["1"]).labelPort("right",["2"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),{paths:rDt,bounds:xB,refblocks:c8e,circles:iDt}=hB,sDt=cn({primitives:[...Object.values(rDt),...Object.values(iDt),{type:"text",text:"{REF}",x:.2,y:-.1404553499999995},{type:"text",text:"{VAL}",x:-.2,y:-.1494553499999995}],ports:[{...c8e.left1,labels:["1"]},{...c8e.right1,labels:["2"]}],size:{width:xB.width,height:xB.height},center:{x:xB.centerX,y:xB.centerY}}).rotateRightFacingSymbol("up").labelPort("left",["1"]).labelPort("right",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),l8e={paths:{path27:{type:"path",points:[{x:.76,y:-.28},{x:.31,y:-.28}],color:"primary",fill:!1},path28:{type:"path",points:[{x:-.3,y:-.02},{x:-.77,y:-.02}],color:"primary",fill:!1},path30:{type:"path",points:[{x:-.3,y:.35},{x:-.3,y:-.28}],color:"primary",fill:!1},"path27-3":{type:"path",points:[{x:.77,y:.35},{x:.32,y:.35}],color:"primary",fill:!1},"path29-5":{type:"path",points:[{x:-.07,y:-.28},{x:-.3,y:-.28}],color:"primary",fill:!1},"path29-5-7":{type:"path",points:[{x:.33,y:-.28},{x:.11,y:-.28}],color:"primary",fill:!1},"path29-5-7-6":{type:"path",points:[{x:-.06,y:-.17},{x:-.06,y:-.39}],color:"primary",fill:!1},"path29-5-7-6-6":{type:"path",points:[{x:.09,y:-.17},{x:.09,y:-.39}],color:"primary",fill:!1},"path29-5-9":{type:"path",points:[{x:-.07,y:.35},{x:-.3,y:.35}],color:"primary",fill:!1},"path29-5-7-2":{type:"path",points:[{x:.33,y:.35},{x:.11,y:.35}],color:"primary",fill:!1},"path29-5-7-6-0":{type:"path",points:[{x:-.06,y:.46},{x:-.06,y:.24}],color:"primary",fill:!1},"path29-5-7-6-6-2":{type:"path",points:[{x:.09,y:.46},{x:.09,y:.24}],color:"primary",fill:!1},"path29-5-92":{type:"path",points:[{x:.33,y:.13},{x:.33,y:.35}],color:"primary",fill:!1},"path29-5-7-28":{type:"path",points:[{x:.33,y:-.28},{x:.33,y:-.05}],color:"primary",fill:!1},"path29-5-7-6-9":{type:"path",points:[{x:.44,y:.11},{x:.22,y:.11}],color:"primary",fill:!1},"path29-5-7-6-6-7":{type:"path",points:[{x:.44,y:-.04},{x:.22,y:-.04}],color:"primary",fill:!1},"path29-5-7-6-9-2":{type:"path",points:[{x:.44,y:.07},{x:.22,y:.07}],color:"primary",fill:!1},"path29-5-7-6-9-2-4":{type:"path",points:[{x:.44,y:0},{x:.44,y:.07}],color:"primary",fill:!1},"path29-5-7-6-9-2-4-6":{type:"path",points:[{x:.22,y:0},{x:.22,y:.07}],color:"primary",fill:!1},"path29-5-7-6-9-2-9":{type:"path",points:[{x:.44,y:0},{x:.22,y:0}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:.02,y:.53},bottom1:{type:"text",text:"{VAL}",x:.01,y:-.54}},refblocks:{left1:{x:-.77,y:-.02},right1:{x:.76,y:-.28},right2:{x:.77,y:.35}},bounds:{width:1.59,height:1.07,centerX:0,centerY:0},circles:{}},{paths:aDt,texts:u8e,bounds:gB,refblocks:UZ,circles:cDt}=l8e,yB=za({primitives:[...Object.values(aDt),...Object.values(cDt),{...u8e.top1,anchor:"middle_bottom"},{...u8e.bottom1,anchor:"middle_top"}],ports:[{...UZ.left1,labels:["1"]},{...UZ.right1,labels:["2"]},{...UZ.right2,labels:["3"]}],size:{width:gB.width,height:gB.height},center:{x:gB.centerX,y:gB.centerY}}),XZ=ro(yB,"down"),jZ=XZ.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),GZ=XZ.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");jZ.anchor="middle_bottom",GZ.anchor="middle_top",jZ.y+=.3,jZ.x+=.101,GZ.y-=.49999,GZ.x+=1.19999;var lDt=XZ,{paths:uDt,bounds:bB,refblocks:YZ,circles:_Dt}=l8e,_8e=za({primitives:[...Object.values(uDt),...Object.values(_Dt),{type:"text",text:"{REF}",x:.01596175000000022,y:-.5308501500000009,anchor:"middle_top"},{type:"text",text:"{VAL}",x:.013116750000000454,y:.5408501499999989,anchor:"middle_bottom"}],ports:[{...YZ.left1,labels:["1"]},{...YZ.right1,labels:["2"]},{...YZ.right2,labels:["3"]}],size:{width:bB.width,height:bB.height},center:{x:bB.centerX,y:bB.centerY}}),qZ=ro(yB,"left"),JZ=qZ.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),KZ=qZ.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");JZ.anchor="middle_bottom",KZ.anchor="middle_top",JZ.y+=.99,JZ.x-=0,KZ.y-=1.10999,KZ.x=0;var dDt=qZ,QZ=ro(yB,"up"),ZZ=QZ.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),eee=QZ.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");ZZ.anchor="middle_bottom",eee.anchor="middle_top",ZZ.y+=.499,ZZ.x=.62,eee.y-=.29999,eee.x+=.1;var hDt=QZ,mDt=ro(_8e),pDt={paths:{path40:{type:"path",points:[{x:.14,y:.04},{x:-.12,y:-.09}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.12,y:.18},{x:.14,y:.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.12,y:-.09},{x:-.12,y:.18}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.14,y:.18},{x:.14,y:-.09}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.12,y:.04},{x:-.52,y:.04}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.52,y:.04},{x:.15,y:.04}],color:"primary",fill:!1},"path43-7":{type:"path",points:[{x:.21,y:.18},{x:.14,y:.18}],color:"primary",fill:!1},"path43-7-9":{type:"path",points:[{x:.21,y:.13},{x:.21,y:.18}],color:"primary",fill:!1},"path43-7-2":{type:"path",points:[{x:.08,y:-.09},{x:.14,y:-.09}],color:"primary",fill:!1},"path43-7-9-3":{type:"path",points:[{x:.08,y:-.04},{x:.08,y:-.09}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.01,y:.27},bottom1:{type:"text",text:"{VAL}",x:0,y:-.27}},refblocks:{left1:{x:-.52,y:.04},right1:{x:.52,y:.04}},bounds:{minX:-.55,maxX:.55,minY:-.27,maxY:.27,width:1.09,height:.55,centerX:0,centerY:0},circles:{}},PB=cn(pDt).labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{VAL}","middle_top").changeTextAnchor("{REF}","middle_bottom").build(),tee=ro(PB,"down"),nee=tee.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),oee=tee.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");nee.anchor="middle_left",oee.anchor="middle_left",nee.y+=.3,nee.x=.3,oee.y-=.3,oee.x=.3;var fDt=tee,ree=ro(PB,"left"),iee=ree.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),see=ree.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");iee.anchor="middle_bottom",see.anchor="middle_top",iee.y+=.5,iee.x=0,see.y-=.55,see.x=0;var xDt=ree,aee=ro(PB,"up"),cee=aee.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),lee=aee.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");cee.anchor="middle_left",lee.anchor="middle_left",cee.y+=.3,cee.x=.3,lee.y-=.3,lee.x=.3;var gDt=aee,d8e={paths:{path11:{type:"path",points:[{x:-.52,y:.04},{x:-.18,y:.04}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.19,y:.05},{x:.52,y:.05}],color:"primary",fill:!1},"path12-6":{type:"path",points:[{x:.18,y:-.15},{x:.18,y:.25}],color:"primary",fill:!1},"path12-2":{type:"path",points:[{x:.19,y:0},{x:.35,y:-.14}],color:"primary",fill:!1},"path12-2-9":{type:"path",points:[{x:.35,y:-.14},{x:.34,y:-.35}],color:"primary",fill:!1},"path11-0-9":{type:"path",points:[{x:-.17,y:.27},{x:-.17,y:-.15},{x:.18,y:.05},{x:-.17,y:.27}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.22,y:.38},bottom1:{type:"text",text:"{VAL}",x:.11,y:-.38}},refblocks:{bottom1:{x:.34,y:-.35},left1:{x:-.52,y:.04},right1:{x:.52,y:.05}},bounds:{minX:-.55,maxX:.55,minY:-.38,maxY:.38,width:1.09,height:.77,centerX:0,centerY:0},circles:{}},{paths:Aio,texts:Rio,bounds:kio,refblocks:Nio,circles:Hio}=d8e,h8e=cn(d8e).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).labelPort("bottom1",["3"]).changeTextAnchor("{REF}","middle_bottom").build(),m8e=ro(h8e),yDt=m8e.primitives.filter(t=>t.type==="text"),p8e=yDt.find(t=>t.text==="{REF}");p8e.y=0,p8e.anchor="middle_left";var bDt=m8e,vB={paths:{path44:{type:"path",points:[{x:-.18,y:-.03},{x:-.45,y:-.03}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.45,y:-.03},{x:.18,y:-.02}],color:"primary",fill:!1},"path44-0-7":{type:"path",points:[{x:.07,y:-.02},{x:-.07,y:-.02}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.07,y:.1},{x:.07,y:-.15}],color:"primary",fill:!0},"path2-8":{type:"path",points:[{x:-.07,y:.1},{x:-.07,y:-.15}],color:"primary",fill:!0},"path8704-1":{type:"path",points:[{x:-.07,y:-.15},{x:-.07,y:-.15},{x:-.09,y:-.15},{x:-.1,y:-.14},{x:-.11,y:-.13},{x:-.13,y:-.12},{x:-.14,y:-.11},{x:-.14,y:-.1},{x:-.15,y:-.09},{x:-.16,y:-.08},{x:-.16,y:-.07},{x:-.16,y:-.06},{x:-.17,y:-.05},{x:-.17,y:-.04},{x:-.17,y:-.03},{x:-.17,y:-.02},{x:-.17,y:-.01},{x:-.16,y:0},{x:-.16,y:.01},{x:-.16,y:.02},{x:-.15,y:.03},{x:-.15,y:.04},{x:-.14,y:.05},{x:-.14,y:.05},{x:-.13,y:.06},{x:-.12,y:.07},{x:-.11,y:.08},{x:-.11,y:.08},{x:-.1,y:.09},{x:-.09,y:.09},{x:-.08,y:.1},{x:-.07,y:.1},{x:-.07,y:.1}],color:"primary",fill:!1},"path8704-1-7":{type:"path",points:[{x:.07,y:-.15},{x:.07,y:-.15},{x:.09,y:-.15},{x:.1,y:-.14},{x:.12,y:-.13},{x:.13,y:-.12},{x:.14,y:-.11},{x:.14,y:-.1},{x:.15,y:-.09},{x:.16,y:-.08},{x:.16,y:-.07},{x:.17,y:-.06},{x:.17,y:-.05},{x:.17,y:-.04},{x:.17,y:-.03},{x:.17,y:-.02},{x:.17,y:-.01},{x:.16,y:0},{x:.16,y:.01},{x:.16,y:.02},{x:.15,y:.03},{x:.15,y:.04},{x:.14,y:.05},{x:.14,y:.05},{x:.13,y:.06},{x:.12,y:.07},{x:.11,y:.08},{x:.11,y:.08},{x:.1,y:.09},{x:.09,y:.09},{x:.08,y:.1},{x:.07,y:.1},{x:.07,y:.1}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.02,y:.15}},refblocks:{left1:{x:-.45,y:-.03},right1:{x:.45,y:-.03}},bounds:{minX:-.47,maxX:.47,minY:-.15,maxY:.15,width:.95,height:.31,centerX:0,centerY:0},circles:{}},PDt=cn(vB).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").build(),vDt=cn(vB).rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_top").build(),SDt=cn(vB).rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),CDt=cn(vB).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_right").build(),SB={paths:{path44:{type:"path",points:[{x:-.18,y:-.03},{x:-.45,y:-.03}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.45,y:-.03},{x:.18,y:-.02}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.07,y:.1},{x:.07,y:-.15}],color:"primary",fill:!0},"path2-8":{type:"path",points:[{x:-.07,y:.1},{x:-.07,y:-.15}],color:"primary",fill:!0},"path8704-1":{type:"path",points:[{x:-.07,y:-.15},{x:-.07,y:-.15},{x:-.09,y:-.15},{x:-.1,y:-.14},{x:-.11,y:-.13},{x:-.13,y:-.12},{x:-.14,y:-.11},{x:-.14,y:-.1},{x:-.15,y:-.09},{x:-.16,y:-.08},{x:-.16,y:-.07},{x:-.16,y:-.06},{x:-.17,y:-.05},{x:-.17,y:-.04},{x:-.17,y:-.03},{x:-.17,y:-.02},{x:-.17,y:-.01},{x:-.16,y:0},{x:-.16,y:.01},{x:-.16,y:.02},{x:-.15,y:.03},{x:-.15,y:.04},{x:-.14,y:.05},{x:-.14,y:.05},{x:-.13,y:.06},{x:-.12,y:.07},{x:-.11,y:.08},{x:-.11,y:.08},{x:-.1,y:.09},{x:-.09,y:.09},{x:-.08,y:.1},{x:-.07,y:.1},{x:-.07,y:.1}],color:"primary",fill:!1},"path8704-1-7":{type:"path",points:[{x:.07,y:-.15},{x:.07,y:-.15},{x:.09,y:-.15},{x:.1,y:-.14},{x:.12,y:-.13},{x:.13,y:-.12},{x:.14,y:-.11},{x:.14,y:-.1},{x:.15,y:-.09},{x:.16,y:-.08},{x:.16,y:-.07},{x:.17,y:-.06},{x:.17,y:-.05},{x:.17,y:-.04},{x:.17,y:-.03},{x:.17,y:-.02},{x:.17,y:-.01},{x:.16,y:0},{x:.16,y:.01},{x:.16,y:.02},{x:.15,y:.03},{x:.15,y:.04},{x:.14,y:.05},{x:.14,y:.05},{x:.13,y:.06},{x:.12,y:.07},{x:.11,y:.08},{x:.11,y:.08},{x:.1,y:.09},{x:.09,y:.09},{x:.08,y:.1},{x:.07,y:.1},{x:.07,y:.1}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.02,y:.15}},refblocks:{left1:{x:-.45,y:-.03},right1:{x:.45,y:-.03}},bounds:{minX:-.47,maxX:.47,minY:-.15,maxY:.15,width:.95,height:.31,centerX:0,centerY:0},circles:{}},MDt=cn(SB).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").build(),TDt=cn(SB).rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_top").build(),wDt=cn(SB).rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),EDt=cn(SB).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_right").build(),CB={paths:{path44:{type:"path",points:[{x:-.22,y:.1},{x:-.45,y:.1}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.45,y:.1},{x:.22,y:.1}],color:"primary",fill:!1},"path44-5":{type:"path",points:[{x:0,y:-.03},{x:0,y:-.25}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.12,y:.23},{x:.12,y:-.02}],color:"primary",fill:!0},"path2-88":{type:"path",points:[{x:.04,y:.22},{x:.04,y:-.02}],color:"primary",fill:!0},"path2-88-5":{type:"path",points:[{x:-.05,y:.22},{x:-.05,y:-.02}],color:"primary",fill:!0},"path2-88-5-1":{type:"path",points:[{x:.04,y:.22},{x:-.05,y:.22}],color:"primary",fill:!0},"path2-88-5-1-6":{type:"path",points:[{x:.04,y:-.02},{x:-.05,y:-.02}],color:"primary",fill:!0},"path2-8":{type:"path",points:[{x:-.12,y:.23},{x:-.12,y:-.02}],color:"primary",fill:!0},"path8704-1":{type:"path",points:[{x:-.13,y:-.03},{x:-.13,y:-.03},{x:-.14,y:-.02},{x:-.16,y:-.01},{x:-.17,y:0},{x:-.18,y:.01},{x:-.19,y:.02},{x:-.2,y:.03},{x:-.2,y:.04},{x:-.21,y:.05},{x:-.21,y:.06},{x:-.22,y:.07},{x:-.22,y:.08},{x:-.22,y:.09},{x:-.22,y:.1},{x:-.22,y:.11},{x:-.22,y:.12},{x:-.22,y:.13},{x:-.21,y:.14},{x:-.21,y:.15},{x:-.21,y:.15},{x:-.2,y:.16},{x:-.19,y:.17},{x:-.19,y:.18},{x:-.18,y:.19},{x:-.17,y:.2},{x:-.17,y:.2},{x:-.16,y:.21},{x:-.15,y:.22},{x:-.14,y:.22},{x:-.13,y:.23},{x:-.13,y:.23},{x:-.13,y:.23}],color:"primary",fill:!1},"path8704-1-7":{type:"path",points:[{x:.12,y:-.03},{x:.12,y:-.03},{x:.14,y:-.02},{x:.15,y:-.01},{x:.17,y:0},{x:.18,y:.01},{x:.19,y:.02},{x:.2,y:.03},{x:.2,y:.04},{x:.21,y:.05},{x:.21,y:.06},{x:.22,y:.07},{x:.22,y:.08},{x:.22,y:.09},{x:.22,y:.1},{x:.22,y:.11},{x:.22,y:.12},{x:.22,y:.13},{x:.21,y:.14},{x:.21,y:.15},{x:.2,y:.15},{x:.2,y:.16},{x:.19,y:.17},{x:.19,y:.18},{x:.18,y:.19},{x:.17,y:.2},{x:.17,y:.2},{x:.16,y:.21},{x:.15,y:.21},{x:.14,y:.22},{x:.13,y:.23},{x:.12,y:.23},{x:.12,y:.23}],color:"primary",fill:!1},path1:{type:"path",points:[{x:-.05,y:.1},{x:-.12,y:.1}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.02,y:.28}},refblocks:{bottom1:{x:0,y:-.25},left1:{x:-.45,y:.1},right1:{x:.45,y:.1}},bounds:{minX:-.47,maxX:.47,minY:-.28,maxY:.28,width:.95,height:.56,centerX:0,centerY:0},circles:{}},DDt=cn(CB).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_left").build(),ADt=cn(CB).rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_top").build(),RDt=cn(CB).rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_bottom").build(),kDt=cn(CB).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_right").build(),MB={paths:{path44:{type:"path",points:[{x:-.22,y:.1},{x:-.45,y:.1}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.45,y:.1},{x:.22,y:.1}],color:"primary",fill:!1},"path44-0-7":{type:"path",points:[{x:.12,y:.1},{x:.04,y:.1}],color:"primary",fill:!1},"path44-5":{type:"path",points:[{x:0,y:-.03},{x:0,y:-.25}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.12,y:.23},{x:.12,y:-.02}],color:"primary",fill:!0},"path2-88":{type:"path",points:[{x:.04,y:.22},{x:.04,y:-.02}],color:"primary",fill:!0},"path2-88-5":{type:"path",points:[{x:-.05,y:.22},{x:-.05,y:-.02}],color:"primary",fill:!0},"path2-88-5-1":{type:"path",points:[{x:.04,y:.22},{x:-.05,y:.22}],color:"primary",fill:!0},"path2-88-5-1-6":{type:"path",points:[{x:.04,y:-.02},{x:-.05,y:-.02}],color:"primary",fill:!0},"path2-8":{type:"path",points:[{x:-.12,y:.23},{x:-.12,y:-.02}],color:"primary",fill:!0},"path8704-1":{type:"path",points:[{x:-.13,y:-.03},{x:-.13,y:-.03},{x:-.14,y:-.02},{x:-.16,y:-.01},{x:-.17,y:0},{x:-.18,y:.01},{x:-.19,y:.02},{x:-.2,y:.03},{x:-.2,y:.04},{x:-.21,y:.05},{x:-.21,y:.06},{x:-.22,y:.07},{x:-.22,y:.08},{x:-.22,y:.09},{x:-.22,y:.1},{x:-.22,y:.11},{x:-.22,y:.12},{x:-.22,y:.13},{x:-.21,y:.14},{x:-.21,y:.15},{x:-.21,y:.15},{x:-.2,y:.16},{x:-.19,y:.17},{x:-.19,y:.18},{x:-.18,y:.19},{x:-.17,y:.2},{x:-.17,y:.2},{x:-.16,y:.21},{x:-.15,y:.22},{x:-.14,y:.22},{x:-.13,y:.23},{x:-.13,y:.23},{x:-.13,y:.23}],color:"primary",fill:!1},"path8704-1-7":{type:"path",points:[{x:.12,y:-.03},{x:.12,y:-.03},{x:.14,y:-.02},{x:.15,y:-.01},{x:.17,y:0},{x:.18,y:.01},{x:.19,y:.02},{x:.2,y:.03},{x:.2,y:.04},{x:.21,y:.05},{x:.21,y:.06},{x:.22,y:.07},{x:.22,y:.08},{x:.22,y:.09},{x:.22,y:.1},{x:.22,y:.11},{x:.22,y:.12},{x:.22,y:.13},{x:.21,y:.14},{x:.21,y:.15},{x:.2,y:.15},{x:.2,y:.16},{x:.19,y:.17},{x:.19,y:.18},{x:.18,y:.19},{x:.17,y:.2},{x:.17,y:.2},{x:.16,y:.21},{x:.15,y:.21},{x:.14,y:.22},{x:.13,y:.23},{x:.12,y:.23},{x:.12,y:.23}],color:"primary",fill:!1},path1:{type:"path",points:[{x:-.05,y:.1},{x:-.12,y:.1}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.02,y:.28}},refblocks:{bottom1:{x:0,y:-.25},left1:{x:-.45,y:.1},right1:{x:.45,y:.1}},bounds:{minX:-.47,maxX:.47,minY:-.28,maxY:.28,width:.95,height:.56,centerX:0,centerY:0},circles:{}},NDt=cn(MB).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_left").build(),HDt=cn(MB).rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_top").build(),IDt=cn(MB).rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_bottom").build(),LDt=cn(MB).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_right").build(),TB={paths:{path44:{type:"path",points:[{x:-.22,y:.1},{x:-.45,y:.1}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.45,y:.1},{x:.22,y:.1}],color:"primary",fill:!1},"path44-0-7":{type:"path",points:[{x:.12,y:.1},{x:.04,y:.1}],color:"primary",fill:!1},"path44-5":{type:"path",points:[{x:0,y:-.03},{x:0,y:-.25}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.12,y:.23},{x:.12,y:-.02}],color:"primary",fill:!0},"path2-88":{type:"path",points:[{x:.04,y:.22},{x:.04,y:-.02}],color:"primary",fill:!0},"path2-88-5":{type:"path",points:[{x:-.05,y:.22},{x:-.05,y:-.02}],color:"primary",fill:!0},"path2-88-5-1":{type:"path",points:[{x:.04,y:.22},{x:-.05,y:.22}],color:"primary",fill:!0},"path2-88-5-1-6":{type:"path",points:[{x:.04,y:-.02},{x:-.05,y:-.02}],color:"primary",fill:!0},"path2-8":{type:"path",points:[{x:-.12,y:.23},{x:-.12,y:-.02}],color:"primary",fill:!0},"path8704-1":{type:"path",points:[{x:-.13,y:-.03},{x:-.13,y:-.03},{x:-.14,y:-.02},{x:-.16,y:-.01},{x:-.17,y:0},{x:-.18,y:.01},{x:-.19,y:.02},{x:-.2,y:.03},{x:-.2,y:.04},{x:-.21,y:.05},{x:-.21,y:.06},{x:-.22,y:.07},{x:-.22,y:.08},{x:-.22,y:.09},{x:-.22,y:.1},{x:-.22,y:.11},{x:-.22,y:.12},{x:-.22,y:.13},{x:-.21,y:.14},{x:-.21,y:.15},{x:-.21,y:.15},{x:-.2,y:.16},{x:-.19,y:.17},{x:-.19,y:.18},{x:-.18,y:.19},{x:-.17,y:.2},{x:-.17,y:.2},{x:-.16,y:.21},{x:-.15,y:.22},{x:-.14,y:.22},{x:-.13,y:.23},{x:-.13,y:.23},{x:-.13,y:.23}],color:"primary",fill:!1},"path8704-1-7":{type:"path",points:[{x:.12,y:-.03},{x:.12,y:-.03},{x:.14,y:-.02},{x:.15,y:-.01},{x:.17,y:0},{x:.18,y:.01},{x:.19,y:.02},{x:.2,y:.03},{x:.2,y:.04},{x:.21,y:.05},{x:.21,y:.06},{x:.22,y:.07},{x:.22,y:.08},{x:.22,y:.09},{x:.22,y:.1},{x:.22,y:.11},{x:.22,y:.12},{x:.22,y:.13},{x:.21,y:.14},{x:.21,y:.15},{x:.2,y:.15},{x:.2,y:.16},{x:.19,y:.17},{x:.19,y:.18},{x:.18,y:.19},{x:.17,y:.2},{x:.17,y:.2},{x:.16,y:.21},{x:.15,y:.21},{x:.14,y:.22},{x:.13,y:.23},{x:.12,y:.23},{x:.12,y:.23}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.02,y:.28}},refblocks:{bottom1:{x:0,y:-.25},left1:{x:-.45,y:.1},right1:{x:.45,y:.1}},bounds:{minX:-.47,maxX:.47,minY:-.28,maxY:.28,width:.95,height:.56,centerX:0,centerY:0},circles:{}},ODt=cn(TB).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_left").build(),FDt=cn(TB).rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_top").build(),BDt=cn(TB).rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_bottom").build(),zDt=cn(TB).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_right").build(),wB={paths:{path44:{type:"path",points:[{x:-.22,y:.1},{x:-.45,y:.1}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.45,y:.1},{x:.22,y:.1}],color:"primary",fill:!1},"path44-5":{type:"path",points:[{x:0,y:-.03},{x:0,y:-.25}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.12,y:.23},{x:.12,y:-.02}],color:"primary",fill:!0},"path2-88":{type:"path",points:[{x:.04,y:.22},{x:.04,y:-.02}],color:"primary",fill:!0},"path2-88-5":{type:"path",points:[{x:-.05,y:.22},{x:-.05,y:-.02}],color:"primary",fill:!0},"path2-88-5-1":{type:"path",points:[{x:.04,y:.22},{x:-.05,y:.22}],color:"primary",fill:!0},"path2-88-5-1-6":{type:"path",points:[{x:.04,y:-.02},{x:-.05,y:-.02}],color:"primary",fill:!0},"path2-8":{type:"path",points:[{x:-.12,y:.23},{x:-.12,y:-.02}],color:"primary",fill:!0},"path8704-1":{type:"path",points:[{x:-.13,y:-.03},{x:-.13,y:-.03},{x:-.14,y:-.02},{x:-.16,y:-.01},{x:-.17,y:0},{x:-.18,y:.01},{x:-.19,y:.02},{x:-.2,y:.03},{x:-.2,y:.04},{x:-.21,y:.05},{x:-.21,y:.06},{x:-.22,y:.07},{x:-.22,y:.08},{x:-.22,y:.09},{x:-.22,y:.1},{x:-.22,y:.11},{x:-.22,y:.12},{x:-.22,y:.13},{x:-.21,y:.14},{x:-.21,y:.15},{x:-.21,y:.15},{x:-.2,y:.16},{x:-.19,y:.17},{x:-.19,y:.18},{x:-.18,y:.19},{x:-.17,y:.2},{x:-.17,y:.2},{x:-.16,y:.21},{x:-.15,y:.22},{x:-.14,y:.22},{x:-.13,y:.23},{x:-.13,y:.23},{x:-.13,y:.23}],color:"primary",fill:!1},"path8704-1-7":{type:"path",points:[{x:.12,y:-.03},{x:.12,y:-.03},{x:.14,y:-.02},{x:.15,y:-.01},{x:.17,y:0},{x:.18,y:.01},{x:.19,y:.02},{x:.2,y:.03},{x:.2,y:.04},{x:.21,y:.05},{x:.21,y:.06},{x:.22,y:.07},{x:.22,y:.08},{x:.22,y:.09},{x:.22,y:.1},{x:.22,y:.11},{x:.22,y:.12},{x:.22,y:.13},{x:.21,y:.14},{x:.21,y:.15},{x:.2,y:.15},{x:.2,y:.16},{x:.19,y:.17},{x:.19,y:.18},{x:.18,y:.19},{x:.17,y:.2},{x:.17,y:.2},{x:.16,y:.21},{x:.15,y:.21},{x:.14,y:.22},{x:.13,y:.23},{x:.12,y:.23},{x:.12,y:.23}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.02,y:.28}},refblocks:{bottom1:{x:0,y:-.25},left1:{x:-.45,y:.1},right1:{x:.45,y:.1}},bounds:{minX:-.47,maxX:.47,minY:-.28,maxY:.28,width:.95,height:.56,centerX:0,centerY:0},circles:{}},VDt=cn(wB).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_left").build(),$Dt=cn(wB).rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_top").build(),WDt=cn(wB).rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_bottom").build(),UDt=cn(wB).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_right").build(),XDt={paths:{path1:{type:"path",points:[{x:-.37,y:.03},{x:-.13,y:.03}],color:"primary",fill:!1},"path-1-3":{type:"path",points:[{x:-.07,y:.03},{x:.11,y:-.03}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.1,y:-.06},{x:.37,y:-.06}],color:"primary",fill:!1},path3:{type:"path",points:[{x:.12,y:.17},{x:.37,y:.17}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.37},bottom1:{type:"text",text:"{VAL}",x:0,y:-.37}},refblocks:{left1:{x:-.37,y:.03},right1:{x:.37,y:-.06},right2:{x:.37,y:.17}},bounds:{minX:-.4,maxX:.4,minY:-.4,maxY:.4,width:.79,height:.79,centerX:0,centerY:0},circles:{"circle-3":{type:"circle",x:.08,y:-.07,radius:.02,color:"primary",fill:!1},"circle-1":{type:"circle",x:-.1,y:.03,radius:.02,color:"primary",fill:!1},"circle-2":{type:"circle",x:.08,y:.17,radius:.02,color:"primary",fill:!1}}},EB=cn(XDt).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right2",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_bottom").build(),uee=ro(EB,"down"),_ee=uee.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),dee=uee.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");_ee.anchor="middle_bottom",dee.anchor="middle_top",_ee.x=.44,_ee.y+=.28,dee.y-=.28,dee.x=.44;var jDt=uee,hee=ro(EB,"left"),mee=hee.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),pee=hee.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");mee.anchor="middle_bottom",pee.anchor="middle_top",mee.x=0,mee.y+=.625,pee.y-=.695,pee.x=0;var GDt=hee,fee=ro(EB,"up"),xee=fee.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),gee=fee.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");xee.anchor="middle_bottom",gee.anchor="middle_top",xee.x=.4,xee.y+=.28,gee.y-=.28,gee.x=.4;var YDt=fee,qDt={paths:{path1:{type:"path",points:[{x:-.37,y:.03},{x:-.13,y:.03}],color:"primary",fill:!1},"path-1-3":{type:"path",points:[{x:-.07,y:.03},{x:.11,y:.14}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.1,y:-.06},{x:.37,y:-.06}],color:"primary",fill:!1},path3:{type:"path",points:[{x:.12,y:.17},{x:.37,y:.17}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.4},bottom1:{type:"text",text:"{VAL}",x:0,y:-.4}},refblocks:{left1:{x:-.37,y:.03},right1:{x:.37,y:-.06},right3:{x:.37,y:.17}},bounds:{minX:-.4,maxX:.4,minY:-.4,maxY:.4,width:.79,height:.79,centerX:0,centerY:0},circles:{"circle-3":{type:"circle",x:.08,y:-.07,radius:.02,color:"primary",fill:!1},"circle-1":{type:"circle",x:-.1,y:.03,radius:.02,color:"primary",fill:!1},"circle-2":{type:"circle",x:.08,y:.17,radius:.02,color:"primary",fill:!1}}},DB=cn(qDt).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right3",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_bottom").build(),yee=ro(DB,"down"),bee=yee.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),Pee=yee.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");bee.anchor="middle_bottom",Pee.anchor="middle_top",bee.x=.44,bee.y+=.28,Pee.y-=.28,Pee.x=.44;var JDt=yee,vee=ro(DB,"left"),See=vee.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),Cee=vee.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");See.anchor="middle_bottom",Cee.anchor="middle_top",See.x=0,See.y+=.625,Cee.y-=.695,Cee.x=0;var KDt=vee,Mee=ro(DB,"up"),Tee=Mee.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),wee=Mee.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");Tee.anchor="middle_bottom",wee.anchor="middle_top",Tee.x=.4,Tee.y+=.28,wee.y-=.28,wee.x=.4;var QDt=Mee,AB={paths:{path11:{type:"path",points:[{x:-.38,y:0},{x:-.12,y:-.01}],color:"primary",fill:!1},"path11-0":{type:"path",points:[{x:-.07,y:0},{x:.11,y:.05}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.12,y:-.01},{x:.38,y:0}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.31},bottom1:{type:"text",text:"{VAL}",x:0,y:-.28}},refblocks:{left1:{x:-.12,y:-.01},left2:{x:-.38,y:0},right1:{x:.12,y:-.01},right2:{x:.38,y:0}},bounds:{minX:-.4,maxX:.4,minY:-.25,maxY:.25,width:.81,height:.5,centerX:0,centerY:0},circles:{"circle-2":{type:"circle",x:.1,y:0,radius:.02,color:"primary",fill:!1},"circle-1":{type:"circle",x:-.1,y:0,radius:.02,color:"primary",fill:!1}}};delete AB.refblocks.left1,delete AB.refblocks.right1,AB.bounds.width+=.2;var RB=cn(AB).changeTextAnchor("{VAL}","middle_top").labelPort("left2",["1"]).labelPort("right2",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),Eee=ro(RB,"down"),Dee=Eee.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),Aee=Eee.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");Dee.anchor="middle_bottom",Aee.anchor="middle_top",Dee.x=.3,Dee.y+=.265,Aee.y-=.265,Aee.x=.3;var ZDt=Eee,Ree=ro(RB,"left"),kee=Ree.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),Nee=Ree.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");kee.anchor="middle_bottom",Nee.anchor="middle_top",kee.x=0,kee.y+=.57,Nee.y-=.57,Nee.x=0;var eAt=Ree,Hee=ro(RB,"up"),Iee=Hee.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),Lee=Hee.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");Iee.anchor="middle_bottom",Lee.anchor="middle_top",Iee.x=.3,Iee.y+=.265,Lee.y-=.265,Lee.x=.3;var tAt=Hee,kB={paths:{path11:{type:"path",points:[{x:-.38,y:0},{x:-.12,y:-.01}],color:"primary",fill:!1},"path11-0":{type:"path",points:[{x:-.07,y:.01},{x:.1,y:.14}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.12,y:-.01},{x:.38,y:0}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.25},bottom1:{type:"text",text:"{VAL}",x:0,y:-.25}},refblocks:{left1:{x:-.12,y:-.01},left2:{x:-.38,y:0},right1:{x:.12,y:-.01},right2:{x:.38,y:0}},bounds:{minX:-.4,maxX:.4,minY:-.25,maxY:.25,width:.81,height:.5,centerX:0,centerY:0},circles:{"circle-2":{type:"circle",x:.1,y:0,radius:.02,color:"primary",fill:!1},"circle-1":{type:"circle",x:-.1,y:0,radius:.02,color:"primary",fill:!1}}};delete kB.refblocks.left1,delete kB.refblocks.right1,kB.bounds.width+=.2;var NB=cn(kB).changeTextAnchor("{VAL}","middle_top").labelPort("left2",["1"]).labelPort("right2",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),Oee=ro(NB,"down"),Fee=Oee.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),Bee=Oee.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");Fee.anchor="middle_bottom",Bee.anchor="middle_top",Fee.x=.3,Fee.y+=.265,Bee.y-=.265,Bee.x=.3;var nAt=Oee,zee=ro(NB,"left"),Vee=zee.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),$ee=zee.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");Vee.anchor="middle_bottom",$ee.anchor="middle_top",Vee.x=0,Vee.y+=.57,$ee.y-=.57,$ee.x=0;var oAt=zee,Wee=ro(NB,"up"),Uee=Wee.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),Xee=Wee.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");Uee.anchor="middle_bottom",Xee.anchor="middle_top",Uee.x=.3,Uee.y+=.265,Xee.y-=.265,Xee.x=.3;var rAt=Wee,HB={paths:{path44:{type:"path",points:[{x:-.16845120000000047,y:.02621170000000017},{x:-.4458008,y:.02709619999999968}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.4458008,y:.026971799999999657},{x:.1677968999999997,y:.027926399999999685}],color:"primary",fill:!1},"path8704-1":{type:"path",points:[{x:-.0040837000000002455,y:-.13467459999999964},{x:-.0040837000000002455,y:-.13467459999999964},{x:-.017668143940740948,y:-.1311205263185182},{x:-.03043520885925943,y:-.12727072121481456},{x:-.04240966440000013,y:-.1231399985999998},{x:-.05361628020740751,y:-.11874317238518502},{x:-.064079825925926,y:-.11409505648148131},{x:-.07382507120000005,y:-.10921046479999987},{x:-.0828767856740741,y:-.10410421125185171},{x:-.0912597389925926,y:-.09879110974814802},{x:-.09899870079999995,y:-.0932859741999998},{x:-.10611844074074069,y:-.08760361851851838},{x:-.11264372845925916,y:-.0817588566148146},{x:-.11859933359999993,y:-.07576650239999982},{x:-.12401002580740728,y:-.06964136978518495},{x:-.12890057472592584,y:-.06339827268148127},{x:-.13329574999999985,y:-.05705202499999972},{x:-.13722032127407394,y:-.05061744065185156},{x:-.14069905819259243,y:-.04410933354814783},{x:-.14375673039999987,y:-.03754251759999966},{x:-.14641810754074058,y:-.030931806718518143},{x:-.1487079592592591,y:-.0242920148148144},{x:-.15065105519999983,y:-.017637955799999563},{x:-.15227216500740723,y:-.01098444358518472},{x:-.15359605832592574,y:-.004346292081480994},{x:-.1546475047999998,y:.00226168480000051},{x:-.15545127407407386,y:.008824673148148676},{x:-.1560321357925924,y:.015327859051852397},{x:-.1564148595999998,y:.02175642860000056},{x:-.1566242151407405,y:.028095567881482052},{x:-.15668497205925902,y:.03433046298518576},{x:-.15662189999999976,y:.04044630000000058},{x:-.15662189999999976,y:.0404463000000006},{x:-.15662189999999976,y:.0404463000000006},{x:-.15622857394444417,y:.04717166472222282},{x:-.1553217675555553,y:.05388046444444503},{x:-.15392183849999977,y:.060558907500000585},{x:-.1520491444444442,y:.0671932022222228},{x:-.1497240430555553,y:.07376955694444502},{x:-.14696689199999974,y:.08027418000000058},{x:-.14379804894444415,y:.0866932797222228},{x:-.1402378715555553,y:.09301306444444506},{x:-.13630671749999965,y:.09921974250000057},{x:-.13202494444444415,y:.10529952222222282},{x:-.12741291005555522,y:.11123861194444501},{x:-.1224909719999997,y:.1170232200000006},{x:-.11727948794444407,y:.12263955472222278},{x:-.11179881555555524,y:.12807382444444504},{x:-.10606931249999965,y:.13331223750000057},{x:-.1001113364444441,y:.13834100222222284},{x:-.09394524505555521,y:.14314632694444504},{x:-.08759139599999967,y:.14771442000000062},{x:-.08107014694444413,y:.15203148972222283},{x:-.07440185555555523,y:.15608374444444503},{x:-.0676068794999997,y:.15985739250000058},{x:-.06070557644444415,y:.16333864222222283},{x:-.05371830405555529,y:.16651370194444504},{x:-.04666541999999976,y:.1693687800000006},{x:-.03956728194444424,y:.1718900847222228},{x:-.03244424755555539,y:.17406382444444501},{x:-.025316674499999876,y:.17587620750000055},{x:-.01820492044444437,y:.17731344222222278},{x:-.01112934305555553,y:.178361736944445},{x:-.004110300000000034,y:.17900730000000054},{x:-.004110300000000011,y:.17900730000000054}],color:"primary",fill:!1},"path8704-1-9":{type:"path",points:[{x:.004158700000000071,y:-.1355885000000001},{x:.004158700000000071,y:-.1355885000000001},{x:.017743143940740766,y:-.1320344263185187},{x:.03051020885925925,y:-.12818462121481505},{x:.042484664399999955,y:-.12405389860000024},{x:.053691280207407335,y:-.11965707238518546},{x:.0641548259259258,y:-.11500895648148178},{x:.07390007119999986,y:-.1101243648000003},{x:.0829517856740739,y:-.10501811125185218},{x:.0913347389925924,y:-.09970500974814848},{x:.09907370079999973,y:-.09419987420000027},{x:.10619344074074046,y:-.08851751851851883},{x:.11271872845925893,y:-.08267275661481507},{x:.11867433359999968,y:-.07668040240000029},{x:.12408502580740703,y:-.0705552697851854},{x:.12897557472592555,y:-.06431217268148172},{x:.13337074999999957,y:-.05796592500000018},{x:.13729532127407365,y:-.05153134065185202},{x:.14077405819259214,y:-.045023233548148286},{x:.14383173039999952,y:-.038456417600000126},{x:.14649310754074024,y:-.03184570671851861},{x:.14878295925925875,y:-.02520591481481487},{x:.1507260551999995,y:-.01855185580000003},{x:.15234716500740686,y:-.011898343585185192},{x:.15367105832592537,y:-.005260192081481464},{x:.15472250479999944,y:.001347784800000043},{x:.1555262740740735,y:.007910773148148207},{x:.156107135792592,y:.01441395905185193},{x:.1564898595999994,y:.020842528600000094},{x:.15669921514074014,y:.02718166788148159},{x:.15675997205925862,y:.03341656298518529},{x:.15669689999999936,y:.03953240000000011},{x:.15669689999999936,y:.039532400000000134},{x:.15669689999999936,y:.039532400000000134},{x:.1563035739444438,y:.04625776472222235},{x:.15539676755555493,y:.05296656444444457},{x:.15399683849999934,y:.05964500750000013},{x:.1521241444444438,y:.06627930222222234},{x:.14979904305555491,y:.07285565694444456},{x:.14704189199999937,y:.07936028000000013},{x:.1438730489444438,y:.08577937972222234},{x:.1403128715555549,y:.09209916444444458},{x:.13638171749999925,y:.0983058425000001},{x:.13209994444444376,y:.10438562222222235},{x:.12748791005555482,y:.11032471194444453},{x:.12256597199999929,y:.11610932000000013},{x:.1173544879444437,y:.1217256547222223},{x:.11187381555555485,y:.12715992444444457},{x:.10614431249999925,y:.1323983375000001},{x:.10018633644444369,y:.13742710222222235},{x:.09402024505555481,y:.14223242694444457},{x:.08766639599999927,y:.14680052000000016},{x:.08114514694444372,y:.15111758972222236},{x:.07447685555555483,y:.15516984444444457},{x:.06768187949999929,y:.15894349250000012},{x:.06078057644444377,y:.16242474222222236},{x:.053793304055554894,y:.16559980194444457},{x:.046740419999999366,y:.16845488000000014},{x:.039642281944443844,y:.17097618472222234},{x:.03251924755555499,y:.17314992444444455},{x:.02539167449999948,y:.17496230750000008},{x:.018279920444443973,y:.17639954222222232},{x:.011204343055555134,y:.17744783694444452},{x:.004185299999999637,y:.17809340000000007},{x:.004185299999999614,y:.17809340000000007}],color:"primary",fill:!1},path4:{type:"path",points:[{x:-.08039130000000005,y:.0179576999999993},{x:-.08039130000000005,y:.09650599999999931}],color:"primary",fill:!0},"path4-5":{type:"path",points:[{x:.01494479999999987,y:-.055216500000000224},{x:.01494479999999987,y:.09691909999999937}],color:"primary",fill:!0},"path4-5-8":{type:"path",points:[{x:.06871169999999927,y:-.056870000000000864},{x:.06871169999999927,y:.018784499999999538}],color:"primary",fill:!0},"path4-1":{type:"path",points:[{x:-.08179359999999969,y:.09650570000000003},{x:.015771699999999722,y:.09650570000000003}],color:"primary",fill:!0},"path4-1-6":{type:"path",points:[{x:.0117995999999998,y:-.05594970000000088},{x:.06843709999999925,y:-.05594970000000088}],color:"primary",fill:!0},"rect1577-4":{type:"path",points:[{x:-.17162450000000073,y:.11125030000000025},{x:-.2688274000000015,y:.11125030000000025},{x:-.2688274000000015,y:.11469129999999961},{x:-.17162450000000073,y:.11469129999999961}],color:"primary",fill:!0},"rect1577-4-7":{type:"path",points:[{x:-.2184661999999995,y:.16159429999999997},{x:-.2184661999999995,y:.06439139999999943},{x:-.22190719999999908,y:.06439139999999943},{x:-.22190719999999908,y:.16159429999999997}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.0024445000000006267,y:.23933980000000044},bottom1:{type:"text",text:"{VAL}",x:.00341719999999901,y:-.23933980000000066}},refblocks:{left1:{x:-.4458008,y:.02709619999999968},right1:{x:.4458008,y:.026971799999999657}},bounds:{minX:-.473959241,maxX:.473959241,minY:-.23933980000000066,maxY:.23933980000000044,width:.947918482,height:.4786796000000011,centerX:0,centerY:-11102230246251565e-32},circles:{}},iAt=cn(HB).rotateRightFacingSymbol("down").labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{REF}","middle_left",{x:.02,y:.2}).changeTextAnchor("{VAL}","middle_left",{x:.5,y:-.2}).build(),sAt=cn(HB).rotateRightFacingSymbol("left").labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{REF}","middle_bottom",{x:0,y:.45}).changeTextAnchor("{VAL}","middle_top",{x:0,y:-.55}).build(),aAt=cn(HB).rotateRightFacingSymbol("right").labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),cAt=cn(HB).rotateRightFacingSymbol("up").labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{VAL}","middle_left",{x:.02,y:-.2}).changeTextAnchor("{REF}","middle_left",{x:.5,y:.2}).build(),f8e={paths:{path40:{type:"path",points:[{x:.14,y:.04},{x:-.12,y:-.09}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.12,y:.18},{x:.14,y:.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.12,y:-.09},{x:-.12,y:.18}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.14,y:.18},{x:.14,y:-.09}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.12,y:.04},{x:-.52,y:.04}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.52,y:.04},{x:.15,y:.04}],color:"primary",fill:!1},"path43-5":{type:"path",points:[{x:.19,y:-.09},{x:.15,y:-.09}],color:"primary",fill:!1},"path43-5-2":{type:"path",points:[{x:.19,y:-.14},{x:.19,y:-.09}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.01,y:.27},bottom1:{type:"text",text:"{VAL}",x:0,y:-.27}},refblocks:{left1:{x:-.52,y:.04},right1:{x:.52,y:.04}},bounds:{minX:-.55,maxX:.55,minY:-.27,maxY:.27,width:1.09,height:.55,centerX:0,centerY:0},circles:{}},{paths:Iio,texts:Lio,bounds:Oio,refblocks:Fio,circles:Bio}=f8e,x8e=cn(f8e).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),lAt=ro(x8e),uAt={paths:{path11:{type:"path",points:[{x:-.54,y:0},{x:-.3,y:0}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.29,y:0},{x:.54,y:0}],color:"primary",fill:!1}},texts:{left1:{type:"text",text:"RPM",x:0,y:-.02}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:0}},bounds:{width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:"circle",x:-.01,y:-.01,radius:.29,color:"primary",fill:!1}}},{paths:_At,texts:dAt,bounds:IB,refblocks:g8e,circles:hAt}=uAt,jee=za({primitives:[...Object.values(_At),...Object.values(hAt),{type:"text",text:"{REF}",x:0,y:-.3594553499999995,anchor:"middle_top"},{type:"text",text:"{VAL}",x:0,y:.35,anchor:"middle_bottom"},{...dAt.left1,y:.01,anchor:"center",fontSize:.2}],ports:[{...g8e.left1,labels:["1"]},{...g8e.right1,labels:["2"]}],size:{width:IB.width,height:IB.height},center:{x:IB.centerX,y:IB.centerY}}),{5:mAt,...pAt}=jee.primitives;function fAt(t){return typeof t=="object"}var y8e=ro({...jee,primitives:Object.values(pAt).filter(fAt)}),xAt={...y8e,primitives:[...y8e.primitives,mAt]},LB=za({primitives:[{type:"path",points:[{x:-.2,y:0},{x:0,y:0}],color:"primary",fill:!1},{type:"path",points:Array.from({length:8},(t,e)=>{let n=Math.PI/2-e*Math.PI/7,o=.1;return{x:.1-o*Math.cos(n),y:o*Math.sin(n)}}),color:"primary",fill:!1},{type:"text",text:"{REF}",x:.125,y:0,anchor:"middle_left"}],ports:[{x:-.2,y:0,labels:["1"]}],center:{x:0,y:0}}),b8e=ro(LB,"down"),P8e=b8e.primitives.find(t=>t.type==="text"&&t.text==="{REF}");P8e&&(P8e.anchor="middle_top");var gAt=b8e,yAt=ro(LB,"left"),v8e=ro(LB,"up"),S8e=v8e.primitives.find(t=>t.type==="text"&&t.text==="{REF}");S8e&&(S8e.anchor="middle_bottom");var bAt=v8e,PAt={paths:{path40:{type:"path",points:[{x:.44,y:.04},{x:.19,y:-.09}],color:"primary",fill:!1},path41:{type:"path",points:[{x:.19,y:.18},{x:.44,y:.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:.19,y:-.09},{x:.19,y:.18}],color:"primary",fill:!1},path44:{type:"path",points:[{x:.19,y:.04},{x:-.11,y:.04}],color:"primary",fill:!1},path45:{type:"path",points:[{x:-.43,y:.22},{x:-.11,y:.04}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.01,y:.27},bottom1:{type:"text",text:"{VAL}",x:0,y:-.27}},refblocks:{right1:{x:-.43,y:.22}},bounds:{minX:-.55,maxX:.55,minY:-.27,maxY:.27,width:1.09,height:.55,centerX:0,centerY:0},circles:{}},Gee=cn(PAt).labelPort("right1",["1"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),Yee=ro(Gee,"up"),qee=Yee.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),Jee=Yee.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");qee.anchor="middle_bottom",Jee.anchor="middle_top",qee.x=.4,qee.y+=.2,Jee.y-=.3,Jee.x=.4;var C8e=Yee,Kee=yO(C8e),Qee=Kee.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),Zee=Kee.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");Qee.anchor="middle_bottom",Zee.anchor="middle_top",Qee.x=.35,Qee.y+=.4,Zee.y-=.4,Zee.x=.35;var vAt=Kee,ete=ro(Gee,"left"),tte=ete.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),nte=ete.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");tte.anchor="middle_bottom",nte.anchor="middle_top",tte.x=0,tte.y+=.5,nte.y-=.6,nte.x=0;var SAt=ete,M8e={paths:{path11:{type:"path",points:[{x:-.54,y:.04},{x:-.11,y:.04}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.1,y:.04},{x:.54,y:.04}],color:"primary",fill:!1},"path11-0":{type:"path",points:[{x:-.09,y:-.15},{x:-.09,y:.26}],color:"primary",fill:!1},"path11-0-3":{type:"path",points:[{x:.09,y:-.15},{x:.09,y:.26}],color:"primary",fill:!1},"path11-0-9":{type:"path",points:[{x:-.08,y:.06},{x:-.08,y:-.15},{x:.09,y:-.05},{x:-.08,y:.06}],color:"primary",fill:!0},"path11-0-9-0":{type:"path",points:[{x:.08,y:.26},{x:.08,y:.05},{x:-.09,y:.15},{x:.07,y:.26}],color:"primary",fill:!0},"path12-2":{type:"path",points:[{x:.09,y:-.06},{x:.27,y:-.17}],color:"primary",fill:!1},"path12-2-9":{type:"path",points:[{x:.27,y:-.18},{x:.27,y:-.31}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:.01,y:.42},bottom1:{type:"text",text:"{VAL}",x:-.03,y:-.42}},refblocks:{bottom1:{x:.27,y:-.31},left1:{x:-.54,y:.04},right1:{x:.54,y:.04}},bounds:{minX:-.57,maxX:.57,minY:-.42,maxY:.42,width:1.14,height:.83,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:.05,radius:.29,color:"primary",fill:!1}}},{paths:zio,texts:Vio,bounds:$io,refblocks:Wio,circles:Uio}=M8e,T8e=cn(M8e).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).labelPort("bottom1",["3"]).changeTextAnchor("{REF}","middle_bottom").build(),w8e=ro(T8e),E8e=w8e.primitives.filter(t=>t.type==="text"),CAt=E8e.find(t=>t.text==="{REF}"),MAt=E8e.find(t=>t.text==="{VAL}");CAt.y=0,MAt.y=0;var TAt=w8e,wAt={paths:{path40:{type:"path",points:[{x:.14,y:.04},{x:-.12,y:-.09}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.12,y:.18},{x:.14,y:.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.12,y:-.09},{x:-.12,y:.18}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.14,y:.18},{x:.14,y:-.09}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.12,y:.04},{x:-.52,y:.04}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.52,y:.04},{x:.15,y:.04}],color:"primary",fill:!1},"path43-8":{type:"path",points:[{x:.14,y:.18},{x:.08,y:.18}],color:"primary",fill:!1},"path43-8-8":{type:"path",points:[{x:.14,y:-.09},{x:.08,y:-.09}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.01,y:.27},bottom1:{type:"text",text:"{VAL}",x:0,y:-.27}},refblocks:{left1:{x:-.52,y:.04},right1:{x:.52,y:.04}},bounds:{width:1.09,height:.55,centerX:0,centerY:0},circles:{}},{paths:EAt,texts:D8e,bounds:OB,refblocks:A8e,circles:DAt}=wAt,R8e=za({primitives:[...Object.values(EAt),...Object.values(DAt),{...D8e.top1,anchor:"middle_bottom"},{...D8e.bottom1,anchor:"middle_top"}],ports:[{...A8e.left1,labels:["1"]},{...A8e.right1,labels:["2"]}],size:{width:OB.width,height:OB.height},center:{x:OB.centerX,y:OB.centerY}}),ote=ro(R8e),AAt=ote.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),RAt=ote.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");AAt.anchor="middle_left",RAt.anchor="middle_right";var kAt=ote,NAt={paths:{path11:{type:"path",points:[{x:-.34,y:.22},{x:-.02,y:.01}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.23,y:.13},{x:.23,y:.4}],color:"primary",fill:!1},"path12-2":{type:"path",points:[{x:.23,y:-.08},{x:.23,y:-.35}],color:"primary",fill:!1},"path11-0":{type:"path",points:[{x:-.01,y:-.18},{x:-.01,y:.23}],color:"primary",fill:!1},"path11-0-3":{type:"path",points:[{x:.23,y:.12},{x:-.01,y:.12}],color:"primary",fill:!1},"path11-0-9":{type:"path",points:[{x:-.11,y:.13},{x:-.17,y:.04},{x:-.06,y:.03},{x:-.11,y:.13}],color:"primary",fill:!0},"path11-0-3-8":{type:"path",points:[{x:.23,y:-.08},{x:-.01,y:-.08}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.2,y:.39},bottom1:{type:"text",text:"{VAL}",x:-.03,y:-.42}},refblocks:{top1:{x:.23,y:.4},bottom1:{x:.23,y:-.35},left1:{x:-.34,y:.22}},bounds:{width:.74,height:.85,centerX:0,centerY:0},circles:{path1:{type:"circle",x:.08,y:.01,radius:.29,color:"primary",fill:!1}}},{paths:HAt,texts:k8e,bounds:FB,refblocks:rte,circles:IAt}=NAt,N8e=za({primitives:[...Object.values(HAt),...Object.values(IAt),{...k8e.top1,anchor:"middle_left"},{...k8e.bottom1,anchor:"middle_right"}],ports:[{...rte.top1,labels:["1"]},{...rte.bottom1,labels:["2"]},{...rte.left1,labels:["3"]}],size:{width:FB.width,height:FB.height},center:{x:FB.centerX,y:FB.centerY}}),H8e=ro(N8e),I8e=H8e.primitives.filter(t=>t.type==="text"),LAt=I8e.find(t=>t.text==="{REF}");LAt.y=.1;var L8e=I8e.find(t=>t.text==="{VAL}");L8e.y=.1,L8e.x=-.4;var OAt=H8e,FAt={paths:{capsule_outer:{type:"path",points:[{x:-.44,y:.34},{x:-.45,y:.39},{x:-.46,y:.42},{x:-.49,y:.44},{x:-.52,y:.46},{x:-.56,y:.46},{x:-.6,y:.46},{x:-.63,y:.44},{x:-.65,y:.42},{x:-.67,y:.39},{x:-.68,y:.34},{x:-.68,y:-.34},{x:-.67,y:-.39},{x:-.65,y:-.42},{x:-.63,y:-.44},{x:-.6,y:-.45},{x:-.56,y:-.46},{x:-.52,y:-.45},{x:-.49,y:-.44},{x:-.46,y:-.42},{x:-.45,y:-.39},{x:-.44,y:-.34},{x:-.44,y:.34}],color:"primary",fill:!1},capsule_inner:{type:"path",points:[{x:-.51,y:.28},{x:-.52,y:.32},{x:-.53,y:.34},{x:-.56,y:.35},{x:-.57,y:.35},{x:-.58,y:.34},{x:-.6,y:.32},{x:-.61,y:.28},{x:-.61,y:-.28},{x:-.6,y:-.32},{x:-.58,y:-.34},{x:-.57,y:-.35},{x:-.56,y:-.35},{x:-.53,y:-.34},{x:-.52,y:-.32},{x:-.51,y:-.28},{x:-.51,y:.28}],color:"primary",fill:!0},usb_vertical:{type:"path",points:[{x:.1,y:-.4},{x:.1,y:.4}],color:"primary",fill:!1},usb_left_branch:{type:"path",points:[{x:.1,y:-.1},{x:-.03,y:.05},{x:-.03,y:.15}],color:"primary",fill:!1},usb_right_branch:{type:"path",points:[{x:.1,y:0},{x:.25,y:.15},{x:.25,y:.25}],color:"primary",fill:!1},usb_arrow:{type:"path",points:[{x:.05,y:.4},{x:.1,y:.5},{x:.15,y:.4},{x:.05,y:.4}],color:"primary",fill:!0},usb_square:{type:"path",points:[{x:.2,y:.25},{x:.3,y:.25},{x:.3,y:.35},{x:.2,y:.35},{x:.2,y:.25}],color:"primary",fill:!0}},circles:{usb_base:{type:"circle",x:.1,y:-.4,radius:.07,color:"primary",fill:!0},usb_tip_circle:{type:"circle",x:-.03,y:.15,radius:.04,color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.25,y:.7}},refblocks:{},bounds:{minX:-.75,maxX:.35,minY:-.6,maxY:.75,width:1.1,height:1.35,centerX:-.2,centerY:.08}},BAt=cn(FAt).changeTextAnchor("{REF}","middle_bottom").build(),zAt={paths:{path11:{type:"path",points:[{x:-.54,y:0},{x:-.3,y:0}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.29,y:0},{x:.54,y:0}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.18,y:-.36},bottom1:{type:"text",text:"{VAL}",x:-.01,y:.43},left1:{type:"text",text:"Var",x:-.19,y:.07}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:0}},bounds:{width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:"circle",x:-.01,y:-.01,radius:.29,color:"primary",fill:!1}}},{paths:VAt,texts:ite,bounds:BB,refblocks:O8e,circles:$At}=zAt,F8e=za({primitives:[...Object.values(VAt),...Object.values($At),{...ite.top1,x:0,y:-.3594553499999995,anchor:"middle_top"},{...ite.bottom1,x:0,y:.35,anchor:"middle_bottom"},{...ite.left1,x:-.02,y:.01,fontSize:.2,anchor:"center"}],ports:[{...O8e.left1,labels:["1"]},{...O8e.right1,labels:["2"]}],size:{width:BB.width,height:BB.height},center:{x:BB.centerX,y:BB.centerY}}),WAt=ro(F8e),UAt={paths:{path40:{type:"path",points:[{x:.08,y:.04},{x:-.18,y:-.09}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.18,y:.18},{x:.08,y:.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.18,y:-.09},{x:-.18,y:.18}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.09,y:.17},{x:.1,y:-.09}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.2,y:.04},{x:-.52,y:.04}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.52,y:.04},{x:.21,y:.04}],color:"primary",fill:!1},"path43-6":{type:"path",points:[{x:.19,y:.17},{x:.19,y:-.09}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.01,y:.27},bottom1:{type:"text",text:"{VAL}",x:0,y:-.27}},refblocks:{left1:{x:-.52,y:.04},right1:{x:.52,y:.04}},bounds:{width:1.09,height:.55,centerX:0,centerY:0},circles:{}},{paths:XAt,texts:B8e,bounds:zB,refblocks:z8e,circles:jAt}=UAt,V8e=za({primitives:[...Object.values(XAt),...Object.values(jAt),{...B8e.top1,anchor:"middle_bottom"},{...B8e.bottom1,anchor:"middle_top"}],ports:[{...z8e.left1,labels:["1"]},{...z8e.right1,labels:["2"]}],size:{width:zB.width,height:zB.height},center:{x:zB.centerX,y:zB.centerY}}),ste=ro(V8e),GAt=ste.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),YAt=ste.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");GAt.anchor="middle_left",YAt.anchor="middle_right";var qAt=ste,JAt={paths:{path5:{type:"path",points:[{x:-.54,y:0},{x:-.26,y:0}],color:"primary",fill:!1},path6:{type:"path",points:[{x:.27,y:0},{x:.54,y:.01}],color:"primary",fill:!1},path7:{type:"path",points:[{x:.27,y:-.23},{x:-.26,y:.24}],color:"primary",fill:!1},path8:{type:"path",points:[{x:.38,y:-.23},{x:.27,y:-.23}],color:"primary",fill:!1},path9:{type:"path",points:[{x:0,y:.14},{x:.27,y:.14},{x:.27,y:-.13},{x:-.26,y:-.13},{x:-.26,y:.14},{x:0,y:.14}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.06,y:.25},bottom1:{type:"text",text:"{VAL}",x:.01,y:-.25}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:.01}},bounds:{width:1.13,height:.5,centerX:0,centerY:0}},{paths:KAt,texts:$8e,bounds:VB,refblocks:W8e}=JAt,U8e=za({primitives:[...Object.values(KAt),{...$8e.top1,anchor:"middle_left"},{...$8e.bottom1,anchor:"middle_right"}],ports:[{...W8e.left1,labels:["1","-"]},{...W8e.right1,labels:["2","+"]}],size:{width:VB.width,height:VB.height},center:{x:VB.centerX,y:VB.centerY}}),QAt=ro(U8e),ZAt={paths:{path11:{type:"path",points:[{x:-.54,y:0},{x:-.3,y:0}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.29,y:0},{x:.54,y:0}],color:"primary",fill:!1}},texts:{left1:{type:"text",text:"Var",x:0,y:-.02}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:0}},bounds:{width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:"circle",x:-.01,y:-.01,radius:.29,color:"primary",fill:!1}}},{paths:eRt,texts:tRt,bounds:$B,refblocks:X8e,circles:nRt}=ZAt,ate=za({primitives:[...Object.values(eRt),...Object.values(nRt),{type:"text",text:"{REF}",x:0,y:-.3594553499999995,anchor:"middle_top"},{type:"text",text:"{VAL}",x:0,y:.35,anchor:"middle_bottom"},{...tRt.left1,anchor:"center",y:.02,fontSize:.2}],ports:[{...X8e.left1,labels:["1"]},{...X8e.right1,labels:["2"]}],size:{width:$B.width,height:$B.height},center:{x:$B.centerX,y:$B.centerY}}),{5:oRt,...rRt}=ate.primitives;function iRt(t){return typeof t=="object"}var j8e=ro({...ate,primitives:Object.values(rRt).filter(iRt)}),sRt={...j8e,primitives:[...j8e.primitives,oRt]},WB={paths:{"path28-2":{type:"path",points:[{x:.19,y:0},{x:0,y:.09}],color:"primary",fill:!1},"path28-2-6":{type:"path",points:[{x:.19,y:0},{x:0,y:-.09}],color:"primary",fill:!1},"path29-3":{type:"path",points:[{x:.19,y:0},{x:-.23,y:0}],color:"primary",fill:!1}},texts:{right1:{type:"text",text:"{REF}",x:.25,y:0}},refblocks:{left1:{x:-.23,y:0}},bounds:{minX:-.25,maxX:.25,minY:-.09,maxY:.09,width:.5,height:.19,centerX:0,centerY:0},circles:{}};function UB(t,e){let{width:n,height:o}=t.size,r=1,i=1;e.width!==void 0&&e.height!==void 0?(r=e.width/n,i=e.height/o):e.width!==void 0?r=i=e.width/n:e.height!==void 0&&(r=i=e.height/o);let s=t.primitives.map(a=>{switch(a.type){case"path":return{...a,points:a.points.map(c=>({x:c.x*r,y:c.y*i}))};case"text":return{...a,x:a.x*r,y:a.y*i,fontSize:a.fontSize?a.fontSize*r:void 0};case"circle":return{...a,x:a.x*r,y:a.y*i,radius:a.radius*r};case"box":return{...a,x:a.x*r,y:a.y*i,width:a.width*r,height:a.height*i};default:return a}});return{...t,primitives:s,center:{x:t.center.x*r,y:t.center.y*i},ports:t.ports.map(a=>({...a,x:a.x*r,y:a.y*i})),size:{width:n*r,height:o*i}}}var aRt=cn(WB).rotateRightFacingSymbol("down").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_top").build(),cRt=UB(aRt,{width:.24,height:.23}),lRt=cn(WB).rotateRightFacingSymbol("left").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_right").build(),uRt=UB(lRt,{width:.23,height:.24}),_Rt=cn(WB).rotateRightFacingSymbol("right").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_left").build(),dRt=UB(_Rt,{width:.23,height:.24}),hRt=cn(WB).rotateRightFacingSymbol("up").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_bottom").build(),mRt=UB(hRt,{width:.24,height:.23}),G8e={paths:{path11:{type:"path",points:[{x:-.54,y:.03},{x:-.3,y:.03}],color:"primary",fill:!1},"path11-5-5":{type:"path",points:[{x:.1,y:.13},{x:0,y:-.06},{x:-.11,y:.13}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.29,y:.03},{x:.54,y:.03}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.02,y:.4},bottom1:{type:"text",text:"{VAL}",x:-.01,y:-.4}},refblocks:{left1:{x:-.54,y:.03},right1:{x:.54,y:.03}},bounds:{minX:-.57,maxX:.57,minY:-.4,maxY:.4,width:1.14,height:.8,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:.04,radius:.29,color:"primary",fill:!1}}},{paths:Xio,texts:jio,bounds:Gio,circles:Yio,refblocks:qio}=G8e,Y8e=cn(G8e).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),pRt=ro(Y8e),fRt={paths:{path11:{type:"path",points:[{x:-.54,y:0},{x:-.3,y:0}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.29,y:0},{x:.54,y:0}],color:"primary",fill:!1}},texts:{left1:{type:"text",text:"Wh",x:0,y:-.02}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:0}},bounds:{width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:"circle",x:-.01,y:-.01,radius:.29,color:"primary",fill:!1}}},{paths:xRt,texts:gRt,bounds:XB,refblocks:q8e,circles:yRt}=fRt,cte=za({primitives:[...Object.values(xRt),...Object.values(yRt),{type:"text",text:"{REF}",x:0,y:-.3594553499999995,anchor:"middle_top"},{type:"text",text:"{VAL}",x:0,y:.35,anchor:"middle_bottom"},{...gRt.left1,anchor:"center",y:.01,fontSize:.2}],ports:[{...q8e.left1,labels:["1"]},{...q8e.right1,labels:["2"]}],size:{width:XB.width,height:XB.height},center:{x:XB.centerX,y:XB.centerY}}),{5:bRt,...PRt}=cte.primitives;function vRt(t){return typeof t=="object"}var J8e=ro({...cte,primitives:Object.values(PRt).filter(vRt)}),SRt={...J8e,primitives:[...J8e.primitives,bRt]},CRt={paths:{path11:{type:"path",points:[{x:-.54,y:0},{x:-.3,y:0}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.29,y:0},{x:.54,y:0}],color:"primary",fill:!1}},texts:{left1:{type:"text",text:"W",x:0,y:-.02}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:0}},bounds:{width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:"circle",x:-.01,y:-.01,radius:.29,color:"primary",fill:!1}}},{paths:MRt,texts:TRt,bounds:jB,refblocks:K8e,circles:wRt}=CRt,lte=za({primitives:[...Object.values(MRt),...Object.values(wRt),{type:"text",text:"{REF}",x:0,y:-.3594553499999995,anchor:"middle_top"},{type:"text",text:"{VAL}",x:0,y:.35,anchor:"middle_bottom"},{...TRt.left1,anchor:"center",y:.01,fontSize:.3}],ports:[{...K8e.left1,labels:["1"]},{...K8e.right1,labels:["2"]}],size:{width:jB.width,height:jB.height},center:{x:jB.centerX,y:jB.centerY}}),{5:ERt,...DRt}=lte.primitives;function ARt(t){return typeof t=="object"}var Q8e=ro({...lte,primitives:Object.values(DRt).filter(ARt)}),RRt={...Q8e,primitives:[...Q8e.primitives,ERt]},kRt={paths:{path40:{type:"path",points:[{x:.14,y:.04},{x:-.12,y:-.09}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.12,y:.18},{x:.14,y:.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.12,y:-.09},{x:-.12,y:.18}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.14,y:.18},{x:.14,y:-.09}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.12,y:.04},{x:-.52,y:.04}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.52,y:.04},{x:.15,y:.04}],color:"primary",fill:!1},"path43-8":{type:"path",points:[{x:.14,y:.18},{x:.08,y:.18}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.01,y:.27},bottom1:{type:"text",text:"{VAL}",x:0,y:-.27}},refblocks:{left1:{x:-.52,y:.04},right1:{x:.52,y:.04}},bounds:{width:1.09,height:.55,centerX:0,centerY:0},circles:{}},{paths:NRt,texts:Z8e,bounds:GB,refblocks:eCe,circles:HRt}=kRt,tCe=za({primitives:[...Object.values(NRt),...Object.values(HRt),{...Z8e.top1,anchor:"middle_bottom"},{...Z8e.bottom1,anchor:"middle_top"}],ports:[{...eCe.left1,labels:["1"]},{...eCe.right1,labels:["2"]}],size:{width:GB.width,height:GB.height},center:{x:GB.centerX,y:GB.centerY}}),ute=ro(tCe),IRt=ute.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),LRt=ute.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");IRt.anchor="middle_left",LRt.anchor="middle_right";var ORt=ute,t1={ac_voltmeter_down:N7t,ac_voltmeter_horz:L7t,ac_voltmeter_left:B7t,ac_voltmeter_right:$7t,ac_voltmeter_up:X7t,ac_voltmeter_vert:Y7t,avalanche_diode_down:K7t,avalanche_diode_horz:Q7t,avalanche_diode_left:tSt,avalanche_diode_right:nSt,avalanche_diode_up:iSt,avalanche_diode_vert:cSt,backward_diode_down:_St,backward_diode_left:Ive,backward_diode_right:fSt,backward_diode_up:xSt,battery_horz:Bve,battery_vert:PSt,boxresistor_down:CSt,boxresistor_left:wSt,boxresistor_right:ASt,boxresistor_small_down:NSt,boxresistor_small_left:LSt,boxresistor_small_right:BSt,boxresistor_small_up:$St,boxresistor_up:XSt,bridged_ground_down:YSt,bridged_ground_left:KSt,bridged_ground_right:n7e,bridged_ground_up:e8t,capacitor_down:o8t,capacitor_left:r8t,capacitor_polarized_down:a8t,capacitor_polarized_left:c8t,capacitor_polarized_right:_8t,capacitor_polarized_up:m8t,capacitor_right:p8t,capacitor_up:g8t,constant_current_diode_down:P8t,constant_current_diode_horz:v8t,constant_current_diode_left:M8t,constant_current_diode_right:T8t,constant_current_diode_up:D8t,constant_current_diode_vert:k8t,crystal_4pin_down:I8t,crystal_4pin_left:L8t,crystal_4pin_right:O8t,crystal_4pin_up:z8t,crystal_down:W8t,crystal_left:U8t,crystal_right:X8t,crystal_up:Y8t,darlington_pair_transistor_down:q8t,darlington_pair_transistor_horz:J8t,darlington_pair_transistor_left:K8t,darlington_pair_transistor_right:Q8t,darlington_pair_transistor_up:Z8t,darlington_pair_transistor_vert:eCt,dc_ammeter_horz:NK,dc_ammeter_vert:lCt,dc_voltmeter_down:dCt,dc_voltmeter_horz:pCt,dc_voltmeter_left:gCt,dc_voltmeter_right:PCt,dc_voltmeter_up:CCt,dc_voltmeter_vert:wCt,diac_down:ECt,diac_horz:DCt,diac_left:ACt,diac_right:RCt,diac_up:kCt,diac_vert:NCt,digital_ground_down:LCt,digital_ground_left:BCt,digital_ground_right:$Ct,digital_ground_up:XCt,diode_down:GCt,diode_left:YCt,diode_right:hF,diode_up:qCt,dpdt_normally_closed_switch_down:KCt,dpdt_normally_closed_switch_left:QCt,dpdt_normally_closed_switch_right:mF,dpdt_normally_closed_switch_up:ZCt,dpdt_switch_down:tMt,dpdt_switch_left:nMt,dpdt_switch_right:pF,dpdt_switch_up:oMt,dpst_normally_closed_switch_down:iMt,dpst_normally_closed_switch_left:sMt,dpst_normally_closed_switch_right:fF,dpst_normally_closed_switch_up:aMt,dpst_switch_down:lMt,dpst_switch_left:uMt,dpst_switch_right:xF,dpst_switch_up:_Mt,ferrite_bead_down:mMt,ferrite_bead_left:pMt,ferrite_bead_right:R7e,ferrite_bead_up:A7e,filled_diode_down:gMt,filled_diode_horz:PMt,filled_diode_left:CMt,filled_diode_right:wMt,filled_diode_up:AMt,filled_diode_vert:NMt,frequency_meter_horz:PQ,frequency_meter_vert:VMt,fuse_horz:V7e,fuse_vert:XMt,ground_down:jMt,ground_horz:GMt,ground_left:YMt,ground_right:qMt,ground_up:JMt,ground_vert:KMt,gunn_diode_horz:QMt,gunn_diode_vert:ZMt,icled_down:tTt,icled_left:nTt,icled_right:wF,icled_up:oTt,igbt_transistor_horz:$7e,igbt_transistor_vert:iTt,illuminated_push_button_normally_open_horz:U7e,illuminated_push_button_normally_open_vert:aTt,inductor_down:_Tt,inductor_left:dTt,inductor_right:AQ,inductor_up:q7e,laser_diode_down:hTt,laser_diode_left:mTt,laser_diode_right:DF,laser_diode_up:pTt,led_down:yTt,led_left:bTt,led_right:zQ,led_up:Z7e,light_dependent_resistor_horz:nSe,light_dependent_resistor_vert:CTt,mosfet_depletion_normally_on_horz:sSe,mosfet_depletion_normally_on_vert:wTt,mushroom_head_normally_open_momentary_horz:uSe,mushroom_head_normally_open_momentary_vert:RTt,n_channel_d_mosfet_transistor_horz:dSe,n_channel_d_mosfet_transistor_vert:ITt,n_channel_e_mosfet_transistor_horz:fSe,n_channel_e_mosfet_transistor_vert:BTt,njfet_transistor_horz:bSe,njfet_transistor_vert:WTt,not_connected_down:GTt,not_connected_left:YTt,not_connected_right:FF,not_connected_up:qTt,npn_bipolar_transistor_down:QTt,npn_bipolar_transistor_horz:ZTt,npn_bipolar_transistor_left:nwt,npn_bipolar_transistor_right:iwt,npn_bipolar_transistor_up:cwt,npn_bipolar_transistor_vert:_wt,opamp_no_power_down:hwt,opamp_no_power_left:mwt,opamp_no_power_right:UF,opamp_no_power_up:pwt,opamp_with_power_down:xwt,opamp_with_power_left:gwt,opamp_with_power_right:XF,opamp_with_power_up:ywt,p_channel_d_mosfet_transistor_horz:MSe,p_channel_d_mosfet_transistor_vert:Swt,p_channel_e_mosfet_transistor_horz:DSe,p_channel_e_mosfet_transistor_vert:wwt,photodiode_horz:kSe,photodiode_vert:Awt,pjfet_transistor_horz:LSe,pjfet_transistor_vert:Hwt,pnp_bipolar_transistor_down:Owt,pnp_bipolar_transistor_horz:Fwt,pnp_bipolar_transistor_left:Vwt,pnp_bipolar_transistor_right:Uwt,pnp_bipolar_transistor_up:Gwt,pnp_bipolar_transistor_vert:Jwt,potentiometer_horz:VSe,potentiometer_vert:eEt,potentiometer2_down:oEt,potentiometer2_left:rEt,potentiometer2_right:nB,potentiometer2_up:iEt,potentiometer3_down:cEt,potentiometer3_left:_Et,potentiometer3_right:dEt,potentiometer3_up:pEt,power_factor_meter_horz:XSe,power_factor_meter_vert:yEt,push_button_normally_closed_momentary_horz:qSe,push_button_normally_closed_momentary_vert:SEt,push_button_normally_open_momentary_horz:QSe,push_button_normally_open_momentary_vert:wEt,rail_down:REt,rail_left:IEt,rail_right:BEt,rail_up:$Et,rectifier_diode_horz:r8e,rectifier_diode_vert:YEt,resistor_down:KEt,resistor_left:eDt,resistor_right:oDt,resistor_up:sDt,resonator_down:lDt,resonator_horz:_8e,resonator_left:dDt,resonator_right:yB,resonator_up:hDt,resonator_vert:mDt,schottky_diode_down:fDt,schottky_diode_left:xDt,schottky_diode_right:PB,schottky_diode_up:gDt,silicon_controlled_rectifier_horz:h8e,silicon_controlled_rectifier_vert:bDt,solderjumper2_bridged12_down:PDt,solderjumper2_bridged12_left:vDt,solderjumper2_bridged12_right:SDt,solderjumper2_bridged12_up:CDt,solderjumper2_down:MDt,solderjumper2_left:TDt,solderjumper2_right:wDt,solderjumper2_up:EDt,solderjumper3_bridged12_down:DDt,solderjumper3_bridged12_left:ADt,solderjumper3_bridged12_right:RDt,solderjumper3_bridged12_up:kDt,solderjumper3_bridged123_down:NDt,solderjumper3_bridged123_left:HDt,solderjumper3_bridged123_right:IDt,solderjumper3_bridged123_up:LDt,solderjumper3_bridged23_down:ODt,solderjumper3_bridged23_left:FDt,solderjumper3_bridged23_right:BDt,solderjumper3_bridged23_up:zDt,solderjumper3_down:VDt,solderjumper3_left:$Dt,solderjumper3_right:WDt,solderjumper3_up:UDt,spdt_normally_closed_switch_down:jDt,spdt_normally_closed_switch_left:GDt,spdt_normally_closed_switch_right:EB,spdt_normally_closed_switch_up:YDt,spdt_switch_down:JDt,spdt_switch_left:KDt,spdt_switch_right:DB,spdt_switch_up:QDt,spst_normally_closed_switch_down:ZDt,spst_normally_closed_switch_left:eAt,spst_normally_closed_switch_right:RB,spst_normally_closed_switch_up:tAt,spst_switch_down:nAt,spst_switch_left:oAt,spst_switch_right:NB,spst_switch_up:rAt,square_wave_down:iAt,square_wave_left:sAt,square_wave_right:aAt,square_wave_up:cAt,step_recovery_diode_horz:x8e,step_recovery_diode_vert:lAt,tachometer_horz:jee,tachometer_vert:xAt,testpoint_down:gAt,testpoint_left:yAt,testpoint_right:LB,testpoint_up:bAt,tilted_ground_down:vAt,tilted_ground_left:SAt,tilted_ground_right:Gee,tilted_ground_up:C8e,triac_horz:T8e,triac_vert:TAt,tunnel_diode_horz:R8e,tunnel_diode_vert:kAt,unijunction_transistor_horz:N8e,unijunction_transistor_vert:OAt,usbc:BAt,var_meter_horz:F8e,var_meter_vert:WAt,varactor_diode_horz:V8e,varactor_diode_vert:qAt,varistor_horz:U8e,varistor_vert:QAt,varmeter_horz:ate,varmeter_vert:sRt,vcc_down:cRt,vcc_left:uRt,vcc_right:dRt,vcc_up:mRt,volt_meter_horz:Y8e,volt_meter_vert:pRt,watt_hour_meter_horz:cte,watt_hour_meter_vert:SRt,wattmeter_horz:lte,wattmeter_vert:RRt,zener_diode_horz:tCe,zener_diode_vert:ORt};Object.fromEntries(Object.keys(t1).map(t=>[t,t]));const nCe=!0,FRt=!1,uA={CCW:-1,CW:1,NOT_ORIENTABLE:0},BRt=2*Math.PI,YB=1,oCe=0,_6=2,zRt=3,VRt=4,$Rt=1,WRt=2,_te=0,_A=1,iM=2;var qB=Object.freeze({__proto__:null,BOUNDARY:_6,CCW:nCe,CONTAINS:zRt,CW:FRt,END_VERTEX:iM,INSIDE:YB,INTERLACE:VRt,NOT_VERTEX:_te,ORIENTATION:uA,OUTSIDE:oCe,OVERLAP_OPPOSITE:WRt,OVERLAP_SAME:$Rt,PIx2:BRt,START_VERTEX:_A});let d6=1e-6;function rCe(t){d6=t}function iCe(){return d6}const URt=3;function dte(t){return t<d6&&t>-d6}function U7(t,e){return t-e<d6&&t-e>-d6}function sCe(t,e){return t-e>d6}function XRt(t,e){return t-e>-d6}function aCe(t,e){return t-e<-d6}function jRt(t,e){return t-e<d6}var GRt=Object.freeze({__proto__:null,DECIMALS:URt,EQ:U7,EQ_0:dte,GE:XRt,GT:sCe,LE:jRt,LT:aCe,getTolerance:iCe,setTolerance:rCe});let Ae={Utils:GRt,Errors:void 0,Matrix:void 0,Planar_set:void 0,Point:void 0,Vector:void 0,Line:void 0,Circle:void 0,Segment:void 0,Arc:void 0,Box:void 0,Edge:void 0,Face:void 0,Ray:void 0,Ray_shooting:void 0,Multiline:void 0,Polygon:void 0,Distance:void 0,Inversion:void 0};for(let t in qB)Ae[t]=qB[t];Object.defineProperty(Ae,"DP_TOL",{get:function(){return iCe()},set:function(t){rCe(t)}});class q0{static get ILLEGAL_PARAMETERS(){return new ReferenceError("Illegal Parameters")}static get ZERO_DIVISION(){return new Error("Zero division")}static get UNRESOLVED_BOUNDARY_CONFLICT(){return new Error("Unresolved boundary conflict in boolean operation")}static get INFINITE_LOOP(){return new Error("Infinite loop")}static get CANNOT_COMPLETE_BOOLEAN_OPERATION(){return new Error("Cannot complete boolean operation")}static get CANNOT_INVOKE_ABSTRACT_METHOD(){return new Error("Abstract method cannot be invoked")}static get OPERATION_IS_NOT_SUPPORTED(){return new Error("Operation is not supported")}static get UNSUPPORTED_SHAPE_TYPE(){return new Error("Unsupported shape type")}}Ae.Errors=q0;class hte{constructor(e,n){this.first=e,this.last=n||this.first}[Symbol.iterator](){let e;return{next:()=>(e=e?e.next:this.first,{value:e,done:e===void 0})}}get size(){let e=0;for(let n of this)e++;return e}toArray(e=void 0,n=void 0){let o=[],r=e||this.first,i=n||this.last,s=r;if(s===void 0)return o;do o.push(s),s=s.next;while(s!==i.next);return o}append(e){return this.isEmpty()?this.first=e:(e.prev=this.last,this.last.next=e),this.last=e,this.last.next=void 0,this.first.prev=void 0,this}insert(e,n){if(this.isEmpty())this.first=e,this.last=e;else if(n==null)e.next=this.first,this.first.prev=e,this.first=e;else{let o=n.next;n.next=e,o&&(o.prev=e),e.prev=n,e.next=o,this.last===n&&(this.last=e)}return this.last.next=void 0,this.first.prev=void 0,this}remove(e){return e===this.first&&e===this.last?(this.first=void 0,this.last=void 0):(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e===this.first&&(this.first=e.next),e===this.last&&(this.last=e.prev)),this}isEmpty(){return this.first===void 0}static testInfiniteLoop(e){let n=e,o=e;do{if(n!=e&&n===o)throw q0.INFINITE_LOOP;n=n.next,o=o.next.next}while(n!=e)}}const cCe={stroke:"black"};class YRt{constructor(e=cCe){for(const n in e)this[n]=e[n];this.stroke=e.stroke??cCe.stroke}toAttributesString(){return Object.keys(this).reduce((e,n)=>e+(this[n]!==void 0?this.toAttrString(n,this[n]):""),"")}toAttrString(e,n){const o=e==="className"?"class":this.convertCamelToKebabCase(e);return n===null?`${o} `:`${o}="${n.toString()}" `}convertCamelToKebabCase(e){return e.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g).join("-").toLowerCase()}}function X7(t){return new YRt(t).toAttributesString()}function sM(t,e){let n=[],[o,r,i]=t.standard,[s,a,c]=e.standard,l=o*a-r*s,u=i*a-r*c,_=o*c-i*s;if(!Ae.Utils.EQ_0(l)){let d,m;r===0?(d=i/o,m=_/l):a===0?(d=c/s,m=_/l):o===0?(d=u/l,m=i/r):s===0?(d=u/l,m=c/a):(d=u/l,m=_/l),n.push(new Ae.Point(d,m))}return n}function j7(t,e){let n=[],o=e.pc.projectionOn(t),r=e.pc.distanceTo(o)[0];if(Ae.Utils.EQ(r,e.r))n.push(o);else if(Ae.Utils.LT(r,e.r)){let i=Math.sqrt(e.r*e.r-r*r),s,a;s=t.norm.rotate90CCW().multiply(i),a=o.translate(s),n.push(a),s=t.norm.rotate90CW().multiply(i),a=o.translate(s),n.push(a)}return n}function aM(t,e){let n=[];for(let o of e.toSegments()){let r=dA(o,t);for(let i of r)gCe(i,n)||n.push(i)}return n}function JB(t,e){let n=[];if(aM(t,e.box).length===0)return n;let o=new Ae.Circle(e.pc,e.r),r=j7(t,o);for(let i of r)i.on(e)&&n.push(i);return n}function dA(t,e){let n=[];if(t.ps.on(e)&&n.push(t.ps),t.pe.on(e)&&!t.isZeroLength()&&n.push(t.pe),n.length>0||t.isZeroLength()||t.ps.leftTo(e)&&t.pe.leftTo(e)||!t.ps.leftTo(e)&&!t.pe.leftTo(e))return n;let o=new Ae.Line(t.ps,t.pe);return sM(o,e)}function KB(t,e){let n=[];if(t.isZeroLength())return t.ps.on(e)&&n.push(t.ps),n;if(e.isZeroLength())return e.ps.on(t)&&n.push(e.ps),n;let o=new Ae.Line(t.ps,t.pe),r=new Ae.Line(e.ps,e.pe);if(o.incidentTo(r))t.ps.on(e)&&n.push(t.ps),t.pe.on(e)&&n.push(t.pe),e.ps.on(t)&&!e.ps.equalTo(t.ps)&&!e.ps.equalTo(t.pe)&&n.push(e.ps),e.pe.on(t)&&!e.pe.equalTo(t.ps)&&!e.pe.equalTo(t.pe)&&n.push(e.pe);else{let i=sM(o,r);i.length>0&&lCe(i[0],t)&&lCe(i[0],e)&&n.push(i[0])}return n}function lCe(t,e){const n=e.box;return Ae.Utils.LE(t.x,n.xmax)&&Ae.Utils.GE(t.x,n.xmin)&&Ae.Utils.LE(t.y,n.ymax)&&Ae.Utils.GE(t.y,n.ymin)}function QB(t,e){let n=[];if(t.isZeroLength()){let[i,s]=t.ps.distanceTo(e.pc);return Ae.Utils.EQ(i,e.r)&&n.push(t.ps),n}let o=new Ae.Line(t.ps,t.pe),r=j7(o,e);for(let i of r)i.on(t)&&n.push(i);return n}function cM(t,e){let n=[];if(t.isZeroLength())return t.ps.on(e)&&n.push(t.ps),n;let o=new Ae.Line(t.ps,t.pe),r=new Ae.Circle(e.pc,e.r),i=j7(o,r);for(let s of i)s.on(t)&&s.on(e)&&n.push(s);return n}function qRt(t,e){let n=[];for(let o of e.toSegments()){let r=KB(o,t);for(let i of r)n.push(i)}return n}function uCe(t,e){let n=[],o=new Ae.Vector(t.pc,e.pc),r=t.r,i=e.r;if(Ae.Utils.EQ_0(r)||Ae.Utils.EQ_0(i))return n;if(Ae.Utils.EQ_0(o.x)&&Ae.Utils.EQ_0(o.y)&&Ae.Utils.EQ(r,i))return n.push(t.pc.translate(-r,0)),n;let s=t.pc.distanceTo(e.pc)[0];if(Ae.Utils.GT(s,r+i)||Ae.Utils.LT(s,Math.abs(r-i)))return n;o.x/=s,o.y/=s;let a;if(Ae.Utils.EQ(s,r+i)||Ae.Utils.EQ(s,Math.abs(r-i)))return a=t.pc.translate(r*o.x,r*o.y),n.push(a),n;let c=r*r/(2*s)-i*i/(2*s)+s/2,l=t.pc.translate(c*o.x,c*o.y),u=Math.sqrt(r*r-c*c);return a=l.translate(o.rotate90CCW().multiply(u)),n.push(a),a=l.translate(o.rotate90CW().multiply(u)),n.push(a),n}function JRt(t,e){let n=[];for(let o of e.toSegments()){let r=QB(o,t);for(let i of r)n.push(i)}return n}function _Ce(t,e){let n=[];if(t.pc.equalTo(e.pc)&&Ae.Utils.EQ(t.r,e.r)){let s;return s=t.start,s.on(e)&&n.push(s),s=t.end,s.on(e)&&n.push(s),s=e.start,s.on(t)&&n.push(s),s=e.end,s.on(t)&&n.push(s),n}let o=new Ae.Circle(t.pc,t.r),r=new Ae.Circle(e.pc,e.r),i=o.intersect(r);for(let s of i)s.on(t)&&s.on(e)&&n.push(s);return n}function mte(t,e){let n=[];if(e.pc.equalTo(t.pc)&&Ae.Utils.EQ(e.r,t.r))return n.push(t.start),n.push(t.end),n;let o=e,r=new Ae.Circle(t.pc,t.r),i=uCe(o,r);for(let s of i)s.on(t)&&n.push(s);return n}function KRt(t,e){let n=[];for(let o of e.toSegments()){let r=cM(o,t);for(let i of r)n.push(i)}return n}function dCe(t,e){return t.isSegment?KB(t.shape,e):cM(e,t.shape)}function hCe(t,e){return t.isSegment?cM(t.shape,e):_Ce(t.shape,e)}function mCe(t,e){return t.isSegment?dA(t.shape,e):JB(e,t.shape)}function QRt(t,e){return t.isSegment?xte(e,t.shape):gte(e,t.shape)}function ZRt(t,e){return t.isSegment?QB(t.shape,e):mte(t.shape,e)}function pte(t,e){let n=[];for(let o of e.edges)for(let r of dCe(o,t))n.push(r);return n}function fte(t,e){let n=[];for(let o of e.edges)for(let r of hCe(o,t))n.push(r);return n}function hA(t,e){let n=[];if(e.isEmpty())return n;for(let o of e.edges)for(let r of mCe(o,t))gCe(r,n)||n.push(r);return t.sortPoints(n)}function pCe(t,e){let n=[];if(e.isEmpty())return n;for(let o of e.edges)for(let r of ZRt(o,t))n.push(r);return n}function fCe(t,e){return t.isSegment?dCe(e,t.shape):t.isArc?hCe(e,t.shape):t.isLine?mCe(e,t.shape):t.isRay?QRt(e,t.shape):[]}function xCe(t,e){let n=[];if(e.isEmpty()||t.shape.box.not_intersect(e.box))return n;let o=e.edges.search(t.shape.box);for(let r of o)n=[...n,...fCe(t,r)];return n}function ekt(t,e){let n=[];if(e.isEmpty()||t.size===0)return n;for(let o of t)n=[...n,...xCe(o,e)];return n}function tkt(t,e){let n=[];if(t.isEmpty()||e.isEmpty()||t.box.not_intersect(e.box))return n;for(let o of t.edges)n=[...n,...xCe(o,e)];return n}function nkt(t,e){return t instanceof Ae.Line?hA(t,e):t instanceof Ae.Segment?pte(t,e):t instanceof Ae.Arc?fte(t,e):[]}function gCe(t,e){return e.some(n=>n.equalTo(t))}function Bb(t){return new Ae.Line(t.start,t.norm)}function xte(t,e){return dA(e,Bb(t)).filter(n=>t.contains(n))}function gte(t,e){return JB(Bb(t),e).filter(n=>t.contains(n))}function yCe(t,e){return j7(Bb(t),e).filter(n=>t.contains(n))}function okt(t,e){return aM(Bb(t),e).filter(n=>t.contains(n))}function bCe(t,e){return sM(Bb(t),e).filter(n=>t.contains(n))}function rkt(t,e){return sM(Bb(t),Bb(e)).filter(n=>t.contains(n)).filter(n=>e.contains(n))}function PCe(t,e){return hA(Bb(t),e).filter(n=>t.contains(n))}function vCe(t,e){if(t.intersect&&t.intersect instanceof Function)return t.intersect(e);throw q0.UNSUPPORTED_SHAPE_TYPE}function lM(t,e){let n=[];for(let o of e)n=[...n,...vCe(t,o.shape)];return n}function ikt(t,e){let n=[];for(let o of t)for(let r of e)n=[...n,...vCe(o.shape,r.shape)];return n}let G7=class aL extends hte{constructor(...e){if(super(),this.isInfinite=!1,e.length===1&&e[0]instanceof Array&&e[0].length>0){const n=e[0],o=n.length,r=c=>c instanceof Ae.Segment||c instanceof Ae.Arc||c instanceof Ae.Ray||c instanceof Ae.Line,i=c=>c instanceof Ae.Segment||c instanceof Ae.Arc||c instanceof Ae.Ray,s=c=>c instanceof Ae.Segment||c instanceof Ae.Arc;if(o===1&&r(n[0])||o>1&&i(n[0])&&i(n[o-1])&&n.slice(1,o-1).every(s)){this.isInfinite=n.some(c=>c instanceof Ae.Ray||c instanceof Ae.Line);for(let c of n){let l=new Ae.Edge(c);this.append(l)}this.setArcLength()}else throw Ae.Errors.ILLEGAL_PARAMETERS}}get edges(){return[...this]}get box(){return this.edges.reduce((e,n)=>e.merge(n.box),new Ae.Box)}get vertices(){let e=this.edges.map(n=>n.start);return e.push(this.last.end),e}get length(){if(this.isEmpty())return 0;if(this.isInfinite)return Number.POSITIVE_INFINITY;let e=0;for(let n of this)e+=n.length;return e}clone(){return new aL(this.toShapes())}setArcLength(){for(let e of this)this.setOneEdgeArcLength(e)}setOneEdgeArcLength(e){e===this.first?e.arc_length=0:e.arc_length=e.prev.arc_length+e.prev.length}pointAtLength(e){if(e>this.length||e<0||this.isInfinite)return null;let n=null;for(let o of this)if(e>=o.arc_length&&(o===this.last||e<o.next.arc_length)){n=o.pointAtLength(e-o.arc_length);break}return n}addVertex(e,n){let o=n.shape.split(e);if(o[0]===null)return n.prev;if(o[1]===null)return n;let r=new Ae.Edge(o[0]),i=n.prev;return this.insert(r,i),n.shape=o[1],r}getChain(e,n){let o=[];for(let r=e;r!==n.next;r=r.next)o.push(r);return o}split(e){for(let n of e){let o=this.findEdgeByPoint(n);this.addVertex(n,o)}return this}findEdgeByPoint(e){let n;for(let o of this)if(o.shape.contains(e)){n=o;break}return n}distanceTo(e){if(e instanceof Point){const[n,o]=Ae.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ae.Line){const[n,o]=Ae.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ae.Circle){const[n,o]=Ae.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ae.Segment){const[n,o]=Ae.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ae.Arc){const[n,o]=Ae.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ae.Multiline)return Ae.Distance.multiline2multiline(this,e);throw Ae.Errors.UNSUPPORTED_SHAPE_TYPE}intersect(e){return e instanceof Ae.Multiline?ikt(this,e):lM(e,this)}contains(e){if(e instanceof Ae.Point)return this.edges.some(n=>n.shape.contains(e));throw Ae.Errors.UNSUPPORTED_SHAPE_TYPE}translate(e){return new aL(this.edges.map(n=>n.shape.translate(e)))}rotate(e=0,n=new Ae.Point){return new aL(this.edges.map(o=>o.shape.rotate(e,n)))}transform(e=new Ae.Matrix){return new aL(this.edges.map(n=>n.shape.transform(e)))}toShapes(){return this.edges.map(e=>e.shape.clone())}toJSON(){return this.edges.map(e=>e.toJSON())}svgPoints(){return this.vertices.map(e=>`${e.x},${e.y}`).join(" ")}dpath(){let e=`M${this.first.start.x},${this.first.start.y}`;for(let n of this)e+=n.svg();return e}svg(e={}){let n=`
|
|
258
258
|
<path ${X7({fill:"none",...e})} d="`;n+=`
|
|
259
259
|
M${this.first.start.x},${this.first.start.y}`;for(let o of this)n+=o.svg();return n+=`" >
|
|
260
|
-
</path>`,n}};Ae.Multiline=G7;const skt=(...t)=>new Ae.Multiline(...t);Ae.multiline=skt;function uM(t,e,n){let o=n.length,r=t.shape.split(e);if(r.length===0)return;let i=0;r[0]===null?i=0:r[1]===null?i=t.shape.length:i=r[0].length;let s=_te;U7(i,0)&&(s|=_A),U7(i,t.shape.length)&&(s|=iM);let a;i===1/0?a=r[0].coord(e):a=s&iM&&t.next&&t.next.arc_length===0?0:t.arc_length+i,n.push({id:o,pt:e,arc_length:a,edge_before:t,edge_after:void 0,face:t.face,is_vertex:s})}function mA(t){t.int_points1_sorted=zb(t.int_points1),t.int_points2_sorted=zb(t.int_points2)}function zb(t){let e=new Map,n=0;for(let r of t)e.has(r.face)||(e.set(r.face,n),n++);for(let r of t)r.faceId=e.get(r.face);return t.slice().sort(akt)}function akt(t,e){return t.faceId<e.faceId?-1:t.faceId>e.faceId?1:t.arc_length<e.arc_length?-1:t.arc_length>e.arc_length?1:0}function yte(t){if(t.int_points1.length<2)return;let e=!1,n,o,r,i;for(let s=0;s<t.int_points1_sorted.length;s++)if(t.int_points1_sorted[s].id!==-1){n=t.int_points1_sorted[s],o=t.int_points2[n.id];for(let a=s+1;a<t.int_points1_sorted.length&&(r=t.int_points1_sorted[a],!!U7(r.arc_length,n.arc_length));a++)r.id!==-1&&(i=t.int_points2[r.id],i.id!==-1&&r.edge_before===n.edge_before&&r.edge_after===n.edge_after&&i.edge_before===o.edge_before&&i.edge_after===o.edge_after&&(r.id=-1,i.id=-1,e=!0))}o=t.int_points2_sorted[0],n=t.int_points1[o.id];for(let s=1;s<t.int_points2_sorted.length;s++){let a=t.int_points2_sorted[s];if(a.id===-1)continue;if(o.id===-1||!U7(a.arc_length,o.arc_length)){o=a,n=t.int_points1[o.id];continue}let c=t.int_points1[a.id];c.edge_before===n.edge_before&&c.edge_after===n.edge_after&&a.edge_before===o.edge_before&&a.edge_after===o.edge_after&&(c.id=-1,a.id=-1,e=!0)}e&&(t.int_points1=t.int_points1.filter(s=>s.id>=0),t.int_points2=t.int_points2.filter(s=>s.id>=0),t.int_points1.forEach((s,a)=>s.id=a),t.int_points2.forEach((s,a)=>s.id=a))}function bte(t){for(let e of t)e.edge_before&&(e.edge_before.bvStart=void 0,e.edge_before.bvEnd=void 0,e.edge_before.bv=void 0,e.edge_before.overlap=void 0),e.edge_after&&(e.edge_after.bvStart=void 0,e.edge_after.bvEnd=void 0,e.edge_after.bv=void 0,e.edge_after.overlap=void 0);for(let e of t)e.edge_before&&(e.edge_before.bvEnd=_6),e.edge_after&&(e.edge_after.bvStart=_6)}function Pte(t,e){for(let n of t)n.edge_before&&n.edge_before.setInclusion(e),n.edge_after&&n.edge_after.setInclusion(e)}function ckt(t){let e,n,o,r=t.int_points1.length;for(let i=0;i<r;i++){let s=t.int_points1_sorted[i];s.face!==e&&(n=i,e=s.face);let a=i,c=_M(t.int_points1_sorted,i,e),l;a+c<r&&t.int_points1_sorted[a+c].face===e?l=a+c:l=n;let u=_M(t.int_points1_sorted,l,e);o=null;for(let f=l;f<l+u;f++){let g=t.int_points1_sorted[f];if(g.face===e&&t.int_points2[g.id].face===t.int_points2[s.id].face){o=g;break}}if(o===null)continue;let _=s.edge_after,d=o.edge_before;if(!(_.bv===_6&&d.bv===_6)||_!==d)continue;let m=t.int_points2[s.id],h=t.int_points2[o.id],p=m.edge_after,x=h.edge_before;p.bv===_6&&x.bv===_6&&p===x||(m=t.int_points2[o.id],h=t.int_points2[s.id],p=m.edge_after,x=h.edge_before),p.bv===_6&&x.bv===_6&&p===x&&_.setOverlap(p)}}function _M(t,e,n){let o,r,i=1;if(t.length===1)return 1;o=t[e];for(let s=e+1;s<t.length&&!(o.face!==n||(r=t[s],!(r.pt.equalTo(o.pt)&&r.edge_before===o.edge_before&&r.edge_after===o.edge_after)));s++)i++;return i}function dM(t,e){if(e){for(let n of e){let o=n.edge_before;if(n.is_vertex=_te,o.shape.start&&o.shape.start.equalTo(n.pt)&&(n.is_vertex|=_A),o.shape.end&&o.shape.end.equalTo(n.pt)&&(n.is_vertex|=iM),n.is_vertex&_A){n.edge_before=o.prev,o.prev&&(n.is_vertex=iM);continue}if(n.is_vertex&iM)continue;let r=t.addVertex(n.pt,o);n.edge_before=r}for(let n of e)n.edge_before?n.edge_after=n.edge_before.next:t instanceof G7&&n.is_vertex&_A&&(n.edge_after=t.first)}}function SCe(t,e,n){const o=t.edge_before,r=e.edge_after,i=n.length;o.next=n[0],n[0].prev=o,n[i-1].next=r,r.prev=n[i-1]}const{INSIDE:h6,OUTSIDE:m6,BOUNDARY:qm,OVERLAP_SAME:lkt,OVERLAP_OPPOSITE:ukt}=qB,{NOT_VERTEX:qio,START_VERTEX:CCe,END_VERTEX:MCe}=qB,ZB=1,pA=2,Y7=3;function _kt(t,e){let[n]=fA(t,e,ZB,!0);return n}function vte(t,e){let o=e.clone().reverse(),[r]=fA(t,o,Y7,!0);return r}function TCe(t,e){let[n]=fA(t,e,pA,!0);return n}function wCe(t,e){let[n,o]=fA(t,e,pA,!1),r=[];for(let s of n.faces)r=[...r,...[...s.edges].map(a=>a.shape)];let i=[];for(let s of o.faces)i=[...i,...[...s.edges].map(a=>a.shape)];return[r,i]}function Ste(t,e){let[n]=fA(t,e,Y7,!1),o=[];for(let r of n.faces)o=[...o,...[...r.edges].map(i=>i.shape)];return o}function ECe(t,e){let n=t.clone(),o=e.clone(),r=DCe(n,o);mA(r),dM(n,r.int_points1_sorted),dM(o,r.int_points2_sorted),yte(r),mA(r);let i=r.int_points1_sorted.map(a=>a.pt),s=r.int_points2_sorted.map(a=>a.pt);return[i,s]}function dkt(t,e,n,o){let r=ACe(t,n.int_points1),i=ACe(e,n.int_points2);for(RCe(r,e),RCe(i,t),bte(n.int_points1),bte(n.int_points2),Pte(n.int_points1,e),Pte(n.int_points2,t);mkt(t,e,n.int_points1,n.int_points1_sorted,n.int_points2,n););ckt(n),Cte(t,o,n.int_points1_sorted,!0),Cte(e,o,n.int_points2_sorted,!1),kCe(t,r,o,!0),kCe(e,i,o,!1)}function hkt(t,e,n,o){pkt(t,e,o,n.int_points2),fkt(t,e,n),Mte(t,n.int_points1),Mte(e,n.int_points2),Tte(t,n.int_points1,n.int_points2),Tte(t,n.int_points2,n.int_points1)}function fA(t,e,n,o){let r=t.clone(),i=e.clone(),s=DCe(r,i);return mA(s),dM(r,s.int_points1_sorted),dM(i,s.int_points2_sorted),yte(s),mA(s),dkt(r,i,s,n),o&&hkt(r,i,s,n),[r,i]}function DCe(t,e){let n={int_points1:[],int_points2:[]};for(let o of t.edges){let r=e.edges.search(o.box);for(let i of r){let s=o.shape.intersect(i.shape);for(let a of s)uM(o,a,n.int_points1),uM(i,a,n.int_points2)}}return n}function ACe(t,e){let n=[];for(let o of t.faces)e.find(r=>r.face===o)||n.push(o);return n}function RCe(t,e){for(let n of t)n.first.bv=n.first.bvStart=n.first.bvEnd=void 0,n.first.setInclusion(e)}function mkt(t,e,n,o,r,i){let s,a,c,l=o.length,u=!1;for(let _=0;_<l;_++){let d=o[_];d.face!==s&&(a=_,s=d.face);let m=_,h=_M(o,_,s),p;m+h<l&&o[m+h].face===s?p=m+h:p=a;let x=_M(o,p,s);c=null;for(let y=p;y<p+x;y++){let b=o[y];if(b.face===s&&r[b.id].face===r[d.id].face){c=b;break}}if(c===null)continue;let f=d.edge_after,g=c.edge_before;if(f.bv===qm&&g.bv!=qm){f.bv=g.bv;continue}if(f.bv!=qm&&g.bv===qm){g.bv=f.bv;continue}if(f.bv===qm&&g.bv===qm&&f!=g||f.bv===h6&&g.bv===m6||f.bv===m6&&g.bv===h6){let y=f.next;for(;y!=g;)y.bvStart=void 0,y.bvEnd=void 0,y.bv=void 0,y.setInclusion(e),y=y.next}if(f.bv===qm&&g.bv===qm&&f!=g){let y=f.next,b;for(;y!=g;){if(y.bv!=qm){if(b===void 0)b=y.bv;else if(y.bv!=b)throw q0.UNRESOLVED_BOUNDARY_CONFLICT}y=y.next}b!=null&&(f.bv=b,g.bv=b);continue}if(f.bv===h6&&g.bv===m6||f.bv===m6&&g.bv===h6){let y=f;for(;y!=g;){if(y.bvStart===f.bv&&y.bvEnd===g.bv){let[b,v]=y.shape.distanceTo(e);if(b<10*Ae.DP_TOL){uM(y,v.ps,n);let S=n[n.length-1];if(S.is_vertex&CCe)S.edge_after=y,S.edge_before=y.prev,y.bvStart=qm,y.bv=void 0,y.setInclusion(e);else if(S.is_vertex&MCe)S.edge_after=y.next,y.bvEnd=qm,y.bv=void 0,y.setInclusion(e);else{let D=e.addVertex(S.pt,y);S.edge_before=D,S.edge_after=D.next,D.setInclusion(e),D.next.bvStart=qm,D.next.bvEnd=void 0,D.next.bv=void 0,D.next.setInclusion(e)}let M=e.findEdgeByPoint(v.pe);uM(M,v.pe,r);let w=r[r.length-1];if(w.is_vertex&CCe)w.edge_after=M,w.edge_before=M.prev;else if(w.is_vertex&MCe)w.edge_after=M.next;else{let D=r.find(I=>I.edge_after===M),A=e.addVertex(w.pt,M);w.edge_before=A,w.edge_after=A.next,D&&(D.edge_after=A),A.bvStart=void 0,A.bvEnd=qm,A.bv=void 0,A.setInclusion(t),A.next.bvStart=qm,A.next.bvEnd=void 0,A.next.bv=void 0,A.next.setInclusion(t)}mA(i),u=!0;break}}y=y.next}if(u)break;throw q0.UNRESOLVED_BOUNDARY_CONFLICT}}return u}function Cte(t,e,n,o){if(!n)return;let r,i,s,a;for(let c=0;c<n.length;c++){if(s=n[c],s.face!==r&&(i=c,r=s.face),r.isEmpty())continue;let l=c,u=_M(n,c,r),_;l+u<n.length&&n[l+u].face===s.face?_=l+u:_=i,a=n[_];let d=_,m=_M(n,d,r),h=s.edge_after,p=a.edge_before;if(h.bv===h6&&p.bv===h6&&e===ZB||h.bv===m6&&p.bv===m6&&e===pA||(h.bv===m6||p.bv===m6)&&e===Y7&&!o||(h.bv===h6||p.bv===h6)&&e===Y7&&o||h.bv===qm&&p.bv===qm&&h.overlap&lkt&&o||h.bv===qm&&p.bv===qm&&h.overlap&ukt){t.removeChain(r,h,p);for(let x=l;x<l+u;x++)n[x].edge_after=void 0;for(let x=d;x<d+m;x++)n[x].edge_before=void 0}c+=u-1}}function pkt(t,e,n,o){for(let r of e.faces){for(let i of r)t.edges.add(i);o.find(i=>i.face===r)===void 0&&t.addFace(r.first,r.last)}}function fkt(t,e,n){if(n.int_points1.length!==0)for(let o=0;o<n.int_points1.length;o++){let r=n.int_points1[o],i=n.int_points2[o];if(r.edge_before!==void 0&&r.edge_after===void 0&&i.edge_before===void 0&&i.edge_after!==void 0&&(r.edge_before.next=i.edge_after,i.edge_after.prev=r.edge_before,r.edge_after=i.edge_after,i.edge_before=r.edge_before),i.edge_before!==void 0&&i.edge_after===void 0&&r.edge_before===void 0&&r.edge_after!==void 0&&(i.edge_before.next=r.edge_after,r.edge_after.prev=i.edge_before,i.edge_after=r.edge_after,r.edge_before=i.edge_before),r.edge_before!==void 0&&r.edge_after===void 0)for(let s of n.int_points1_sorted)s!==r&&s.edge_before===void 0&&s.edge_after!==void 0&&s.pt.equalTo(r.pt)&&(r.edge_before.next=s.edge_after,s.edge_after.prev=r.edge_before,r.edge_after=s.edge_after,s.edge_before=r.edge_before);if(i.edge_before!==void 0&&i.edge_after===void 0)for(let s of n.int_points2_sorted)s!==i&&s.edge_before===void 0&&s.edge_after!==void 0&&s.pt.equalTo(i.pt)&&(i.edge_before.next=s.edge_after,s.edge_after.prev=i.edge_before,i.edge_after=s.edge_after,s.edge_before=i.edge_before)}}function Mte(t,e){for(let n of e)t.faces.delete(n.face),n.face=void 0,n.edge_before&&(n.edge_before.face=void 0),n.edge_after&&(n.edge_after.face=void 0)}function Tte(t,e,n){for(let o of e){if(o.edge_before===void 0||o.edge_after===void 0||o.face||o.edge_after.face||o.edge_before.face)continue;let r=o.edge_after,i=o.edge_before;try{hte.testInfiniteLoop(r)}catch{throw q0.CANNOT_COMPLETE_BOOLEAN_OPERATION}let s=t.addFace(r,i);for(let a of e)a.edge_before&&a.edge_after&&a.edge_before.face===s&&a.edge_after.face===s&&(a.face=s);for(let a of n)a.edge_before&&a.edge_after&&a.edge_before.face===s&&a.edge_after.face===s&&(a.face=s)}}function kCe(t,e,n,o){for(let r of e){let i=r.first.bv;(n===ZB&&i===h6||n===Y7&&i===h6&&o||n===Y7&&i===m6&&!o||n===pA&&i===m6)&&t.deleteFace(r)}}var NCe=Object.freeze({__proto__:null,BOOLEAN_INTERSECT:pA,BOOLEAN_SUBTRACT:Y7,BOOLEAN_UNION:ZB,calculateIntersections:ECe,innerClip:wCe,intersect:TCe,outerClip:Ste,removeNotRelevantChains:Cte,removeOldFaces:Mte,restoreFaces:Tte,subtract:vte,unify:_kt});const xkt=RegExp("T.F..FFF.|T.F...F.."),gkt=RegExp("T........|.T.......|...T.....|....T...."),ykt=RegExp("FT.......|F..T.....|F...T...."),bkt=RegExp("T.F..F..."),Pkt=RegExp("T.F..F...|.TF..F...|..FT.F...|..F.TF...");class hM{constructor(){this.m=new Array(9).fill(void 0)}get I2I(){return this.m[0]}set I2I(e){this.m[0]=e}get I2B(){return this.m[1]}set I2B(e){this.m[1]=e}get I2E(){return this.m[2]}set I2E(e){this.m[2]=e}get B2I(){return this.m[3]}set B2I(e){this.m[3]=e}get B2B(){return this.m[4]}set B2B(e){this.m[4]=e}get B2E(){return this.m[5]}set B2E(e){this.m[5]=e}get E2I(){return this.m[6]}set E2I(e){this.m[6]=e}get E2B(){return this.m[7]}set E2B(e){this.m[7]=e}get E2E(){return this.m[8]}set E2E(e){this.m[8]=e}toString(){return this.m.map(e=>e instanceof Array&&e.length>0?"T":e instanceof Array&&e.length===0?"F":"*").join("")}equal(){return xkt.test(this.toString())}intersect(){return gkt.test(this.toString())}touch(){return ykt.test(this.toString())}inside(){return bkt.test(this.toString())}covered(){return Pkt.test(this.toString())}}function xA(t,e){let n,o=new Ae.Ray(e),r=new Ae.Line(o.pt,o.norm);const i=new Ae.Box(o.box.xmin-Ae.DP_TOL,o.box.ymin-Ae.DP_TOL,o.box.xmax+Ae.DP_TOL,o.box.ymax+Ae.DP_TOL);if(t.box.not_intersect(i))return Ae.OUTSIDE;let s=t.edges.search(i);if(s.length===0)return Ae.OUTSIDE;for(let u of s)if(u.shape.contains(e))return Ae.BOUNDARY;let a=[...t.faces],c=[];for(let u of s)for(let _ of o.intersect(u.shape)){if(_.equalTo(e))return Ae.BOUNDARY;c.push({pt:_,edge:u,face_index:a.indexOf(u.face)})}c.sort((u,_)=>aCe(u.pt.x,_.pt.x)?-1:sCe(u.pt.x,_.pt.x)?1:u.face_index<_.face_index?-1:u.face_index>_.face_index?1:u.edge.arc_length<_.edge.arc_length?-1:u.edge.arc_length>_.edge.arc_length?1:0);let l=0;for(let u=0;u<c.length;u++){let _=c[u];if(_.pt.equalTo(_.edge.shape.start)){if(u>0&&_.pt.equalTo(c[u-1].pt)&&_.face_index===c[u-1].face_index&&_.edge.prev===c[u-1].edge)continue;let d=_.edge.prev;for(;dte(d.length);)d=d.prev;let m=d.shape.tangentInEnd(),h=_.pt.translate(m),p=_.edge.shape.tangentInStart(),x=_.pt.translate(p),f=h.leftTo(r),g=x.leftTo(r);(f&&!g||!f&&g)&&l++}else if(_.pt.equalTo(_.edge.shape.end)){if(u>0&&_.pt.equalTo(c[u-1].pt)&&_.face_index===c[u-1].face_index&&_.edge.next===c[u-1].edge)continue;let d=_.edge.next;for(;dte(d.length);)d=d.next;let m=d.shape.tangentInStart(),h=_.pt.translate(m),p=_.edge.shape.tangentInEnd(),x=_.pt.translate(p),f=h.leftTo(r),g=x.leftTo(r);(f&&!g||!f&&g)&&l++}else if(_.edge.shape instanceof Ae.Segment)l++;else{let d=_.edge.shape.box;U7(_.pt.y,d.ymin)||U7(_.pt.y,d.ymax)||l++}}return n=l%2===1?YB:oCe,n}function vkt(t,e){return mM(t,e).equal()}function HCe(t,e){return mM(t,e).intersect()}function Skt(t,e){return mM(t,e).touch()}function Ckt(t,e){return!HCe(t,e)}function ICe(t,e){return mM(t,e).inside()}function LCe(t,e){return mM(t,e).covered()}function Mkt(t,e){return ICe(e,t)}function OCe(t,e){return LCe(e,t)}function mM(t,e){if(t instanceof Ae.Line&&e instanceof Ae.Line)return Tkt(t,e);if(t instanceof Ae.Line&&e instanceof Ae.Circle)return wkt(t,e);if(t instanceof Ae.Line&&e instanceof Ae.Box)return Ekt(t,e);if(t instanceof Ae.Line&&e instanceof Ae.Polygon)return Dkt(t,e);if((t instanceof Ae.Segment||t instanceof Ae.Arc)&&e instanceof Ae.Polygon)return FCe(t,e);if((t instanceof Ae.Segment||t instanceof Ae.Arc)&&(e instanceof Ae.Circle||e instanceof Ae.Box))return FCe(t,new Ae.Polygon(e));if(t instanceof Ae.Polygon&&e instanceof Ae.Polygon)return ez(t,e);if((t instanceof Ae.Circle||t instanceof Ae.Box)&&(e instanceof Ae.Circle||e instanceof Ae.Box))return ez(new Ae.Polygon(t),new Ae.Polygon(e));if((t instanceof Ae.Circle||t instanceof Ae.Box)&&e instanceof Ae.Polygon)return ez(new Ae.Polygon(t),e);if(t instanceof Ae.Polygon&&(e instanceof Ae.Circle||e instanceof Ae.Box))return ez(t,new Ae.Polygon(e))}function Tkt(t,e){let n=new hM,o=sM(t,e);return o.length===0?t.contains(e.pt)&&e.contains(t.pt)?(n.I2I=[t],n.I2E=[],n.E2I=[]):(n.I2I=[],n.I2E=[t],n.E2I=[e]):(n.I2I=o,n.I2E=t.split(o),n.E2I=e.split(o)),n}function wkt(t,e){let n=new hM,o=j7(t,e);if(o.length===0)n.I2I=[],n.I2B=[],n.I2E=[t],n.E2I=[e];else if(o.length===1)n.I2I=[],n.I2B=o,n.I2E=t.split(o),n.E2I=[e];else{let r=new G7([t]),i=t.sortPoints(o);r.split(i);let s=r.toShapes();n.I2I=[s[1]],n.I2B=i,n.I2E=[s[0],s[2]],n.E2I=new Ae.Polygon([e.toArc()]).cutWithLine(t)}return n}function Ekt(t,e){let n=new hM,o=aM(t,e);if(o.length===0)n.I2I=[],n.I2B=[],n.I2E=[t],n.E2I=[e];else if(o.length===1)n.I2I=[],n.I2B=o,n.I2E=t.split(o),n.E2I=[e];else{let r=new G7([t]),i=t.sortPoints(o);r.split(i);let s=r.toShapes();e.toSegments().some(a=>a.contains(o[0])&&a.contains(o[1]))?(n.I2I=[],n.I2B=[s[1]],n.I2E=[s[0],s[2]],n.E2I=[e]):(n.I2I=[s[1]],n.I2B=i,n.I2E=[s[0],s[2]],n.E2I=new Ae.Polygon(e.toSegments()).cutWithLine(t))}return n}function Dkt(t,e){let n=new hM,o=hA(t,e),r=new G7([t]),i=o.length>0?o.slice():t.sortPoints(o);return r.split(i),[...r].forEach(s=>s.setInclusion(e)),n.I2I=[...r].filter(s=>s.bv===Ae.INSIDE).map(s=>s.shape),n.I2B=[...r].slice(1).map(s=>s.bv===Ae.BOUNDARY?s.shape:s.shape.start),n.I2E=[...r].filter(s=>s.bv===Ae.OUTSIDE).map(s=>s.shape),n.E2I=e.cutWithLine(t),n}function FCe(t,e){let n=new hM,o=nkt(t,e),r=o.length>0?o.slice():t.sortPoints(o),i=new G7([t]);i.split(r),[...i].forEach(s=>s.setInclusion(e)),n.I2I=[...i].filter(s=>s.bv===Ae.INSIDE).map(s=>s.shape),n.I2B=[...i].slice(1).map(s=>s.bv===Ae.BOUNDARY?s.shape:s.shape.start),n.I2E=[...i].filter(s=>s.bv===Ae.OUTSIDE).map(s=>s.shape),n.B2I=[],n.B2B=[],n.B2E=[];for(let s of[t.start,t.end])switch(xA(e,s)){case Ae.INSIDE:n.B2I.push(s);break;case Ae.BOUNDARY:n.B2B.push(s);break;case Ae.OUTSIDE:n.B2E.push(s);break}return n}function ez(t,e){let n=new hM,[o,r]=ECe(t,e),i=TCe(t,e),s=vte(t,e),a=vte(e,t),[c,l]=wCe(t,e),u=Ste(t,e),_=Ste(e,t);return n.I2I=i.isEmpty()?[]:[i],n.I2B=l,n.I2E=s.isEmpty()?[]:[s],n.B2I=c,n.B2B=o,n.B2E=u,n.E2I=a.isEmpty()?[]:[a],n.E2B=_,n}var Akt=Object.freeze({__proto__:null,contain:Mkt,cover:OCe,covered:LCe,disjoint:Ckt,equal:vkt,inside:ICe,intersect:HCe,relate:mM,touch:Skt});class t5{constructor(e=1,n=0,o=0,r=1,i=0,s=0){this.a=e,this.b=n,this.c=o,this.d=r,this.tx=i,this.ty=s}fromMatrix3x3(e){const[n,o,r]=e[0],[i,s,a]=e[1];return new t5(n,i,o,s,r,a)}toMatrix3x3(){return[[this.a,this.c,this.tx],[this.b,this.d,this.ty],[0,0,1]]}clone(){return new t5(this.a,this.b,this.c,this.d,this.tx,this.ty)}transform(e){return[e[0]*this.a+e[1]*this.c+this.tx,e[0]*this.b+e[1]*this.d+this.ty]}multiply(e){return new t5(this.a*e.a+this.c*e.b,this.b*e.a+this.d*e.b,this.a*e.c+this.c*e.d,this.b*e.c+this.d*e.d,this.a*e.tx+this.c*e.ty+this.tx,this.b*e.tx+this.d*e.ty+this.ty)}translate(...e){let n,o;if(e.length==1&&!isNaN(e[0].x)&&!isNaN(e[0].y))n=e[0].x,o=e[0].y;else if(e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number")n=e[0],o=e[1];else throw q0.ILLEGAL_PARAMETERS;return this.multiply(new t5(1,0,0,1,n,o))}rotate(e,n=0,o=0){let r=Math.cos(e),i=Math.sin(e);return this.translate(n,o).multiply(new t5(r,i,-i,r,0,0)).translate(-n,-o)}scale(e,n){return this.multiply(new t5(e,0,0,n,0,0))}equalTo(e){return!(!Ae.Utils.EQ(this.tx,e.tx)||!Ae.Utils.EQ(this.ty,e.ty)||!Ae.Utils.EQ(this.a,e.a)||!Ae.Utils.EQ(this.b,e.b)||!Ae.Utils.EQ(this.c,e.c)||!Ae.Utils.EQ(this.d,e.d))}}Ae.Matrix=t5;const Rkt=(...t)=>new Ae.Matrix(...t);Ae.matrix=Rkt;class kkt{constructor(e,n){this.low=e,this.high=n}get max(){return this.clone()}less_than(e){return this.low<e.low||this.low===e.low&&this.high<e.high}equal_to(e){return this.low===e.low&&this.high===e.high}intersect(e){return!this.not_intersect(e)}not_intersect(e){return this.high<e.low||e.high<this.low}merge(e){const n=this.low===void 0?e.low:this.low<e.low?this.low:e.low,o=this.high===void 0?e.high:this.high>e.high?this.high:e.high,r=this.clone();return r.low=n,r.high=o,r}output(){return[this.low,this.high]}comparable_less_than(e,n){return e<n}}class wte extends kkt{clone(){return new wte(this.low,this.high)}}const Yp=1,el=0;let Vb=class{constructor(e,n,o=null,r=null,i=null,s=el){if(this.left=o,this.right=r,this.parent=i,this.color=s,this.item={key:void 0,values:[]},n!==void 0&&this.item.values.push(n),e!==void 0)if(Array.isArray(e)){const[a,c]=e;if(!Number.isNaN(a)&&!Number.isNaN(c)){let l=a,u=c;l>u&&([l,u]=[u,l]),this.item.key=new wte(l,u)}}else this.item.key=e;this.max=this.item.key?this.item.key.max:void 0}isNil(){return this.item.key===void 0&&this.item.values.length===0&&this.left===null&&this.right===null&&this.color===el}requireKey(){if(!this.item.key)throw new Error("Node key is undefined (nil/sentinel). Operation is not applicable.");return this.item.key}less_than(e){const n=this.requireKey(),o=e.requireKey();return n.less_than(o)}_value_equal(e){const n=this.item.values[0],o=e.item.values[0];return n&&o&&n.equal_to?n.equal_to(o):n===o}equal_to(e){const n=this.requireKey(),o=e.requireKey();return n.equal_to(o)}intersect(e){const n=this.requireKey(),o=e.requireKey();return n.intersect(o)}copy_data(e){this.item.key=e.item.key,this.item.values=e.item.values.slice()}update_max(){this.max=this.item.key?this.item.key.max:void 0,this.right&&this.right.max&&(this.max=this.max?this.max.merge(this.right.max):this.right.max),this.left&&this.left.max&&(this.max=this.max?this.max.merge(this.left.max):this.left.max)}not_intersect_left_subtree(e){if(!this.left)return!0;const n=this.left.max?this.left.max.high:this.left.item.key.high,o=this.requireKey(),r=e.requireKey();return o.comparable_less_than(n,r.low)}not_intersect_right_subtree(e){if(!this.right)return!0;const n=this.right.max?this.right.max.low:this.right.item.key.low,o=this.requireKey(),r=e.requireKey();return o.comparable_less_than(r.high,n)}};class gA{constructor(){this.root=null,this.nil_node=new Vb}get size(){let e=0;return this.tree_walk(this.root,n=>e+=n.item.values.length),e}get keys(){const e=[];return this.tree_walk(this.root,n=>e.push(n.item.key.output())),e}get values(){const e=[];return this.tree_walk(this.root,n=>{for(const o of n.item.values)e.push(o)}),e}get items(){const e=[];return this.tree_walk(this.root,n=>{const o=n.item.key.output();for(const r of n.item.values)e.push({key:o,value:r})}),e}isEmpty(){return this.root==null||this.root===this.nil_node}clear(){this.root=null}insert(e,n=e){if(e===void 0)return;const o=this.tree_search(this.root,new Vb(e));if(o)return o.item.values.push(n),o;const r=new Vb(e,n,this.nil_node,this.nil_node,null,Yp);return this.tree_insert(r),this.recalc_max(r),r}exist(e,n=e){const o=this.tree_search(this.root,new Vb(e));return o?arguments.length<2||n===e?!0:o.item.values.some(r=>r&&r.equal_to?r.equal_to(n):r===n):!1}remove(e,n=e){const o=this.tree_search(this.root,new Vb(e));if(!o)return;if(arguments.length<2)return this.tree_delete(o),o;const r=o.item.values.findIndex(i=>i&&i.equal_to?i.equal_to(n):i===n);if(r>=0)return o.item.values.splice(r,1),o.item.values.length===0&&this.tree_delete(o),o}search(e,n=(o,r)=>o===r?r.output():o){const o=new Vb(e),r=[];this.tree_search_interval(this.root,o,r);const i=[];for(const s of r)for(const a of s.item.values)i.push(n(a,s.item.key));return i}intersect_any(e){const n=new Vb(e);return this.tree_find_any_interval(this.root,n)}forEach(e){this.tree_walk(this.root,n=>{for(const o of n.item.values)e(n.item.key,o)})}map(e){const n=new gA;return this.tree_walk(this.root,o=>{for(const r of o.item.values)n.insert(o.item.key,e(r,o.item.key))}),n}*iterate(e,n=(o,r)=>o===r?r.output():o){let o=null;for(e?o=this.tree_search_nearest_forward(this.root,new Vb(e)):this.root&&(o=this.local_minimum(this.root));o;){for(const r of o.item.values)yield n(r,o.item.key);o=this.tree_successor(o)}}recalc_max(e){let n=e;for(;n.parent!=null;)n.parent.update_max(),n=n.parent}tree_insert(e){let n=this.root,o=null;if(this.root==null||this.root===this.nil_node)this.root=e;else{for(;n!==this.nil_node;)o=n,e.less_than(n)?n=n.left:n=n.right;e.parent=o,e.less_than(o)?o.left=e:o.right=e}this.insert_fixup(e)}insert_fixup(e){let n,o;for(n=e;n!==this.root&&n.parent.color===Yp;)n.parent===n.parent.parent.left?(o=n.parent.parent.right,o.color===Yp?(n.parent.color=el,o.color=el,n.parent.parent.color=Yp,n=n.parent.parent):(n===n.parent.right&&(n=n.parent,this.rotate_left(n)),n.parent.color=el,n.parent.parent.color=Yp,this.rotate_right(n.parent.parent))):(o=n.parent.parent.left,o.color===Yp?(n.parent.color=el,o.color=el,n.parent.parent.color=Yp,n=n.parent.parent):(n===n.parent.left&&(n=n.parent,this.rotate_right(n)),n.parent.color=el,n.parent.parent.color=Yp,this.rotate_left(n.parent.parent)));this.root.color=el}tree_delete(e){let n,o;e.left===this.nil_node||e.right===this.nil_node?n=e:n=this.tree_successor(e),n.left!==this.nil_node?o=n.left:o=n.right,o.parent=n.parent,n===this.root?this.root=o:(n===n.parent.left?n.parent.left=o:n.parent.right=o,n.parent.update_max()),this.recalc_max(o),n!==e&&(e.copy_data(n),e.update_max(),this.recalc_max(e)),n.color===el&&this.delete_fixup(o)}delete_fixup(e){let n=e,o;for(;n!==this.root&&n.parent!=null&&n.color===el;)n===n.parent.left?(o=n.parent.right,o.color===Yp&&(o.color=el,n.parent.color=Yp,this.rotate_left(n.parent),o=n.parent.right),o.left.color===el&&o.right.color===el?(o.color=Yp,n=n.parent):(o.right.color===el&&(o.color=Yp,o.left.color=el,this.rotate_right(o),o=n.parent.right),o.color=n.parent.color,n.parent.color=el,o.right.color=el,this.rotate_left(n.parent),n=this.root)):(o=n.parent.left,o.color===Yp&&(o.color=el,n.parent.color=Yp,this.rotate_right(n.parent),o=n.parent.left),o.left.color===el&&o.right.color===el?(o.color=Yp,n=n.parent):(o.left.color===el&&(o.color=Yp,o.right.color=el,this.rotate_left(o),o=n.parent.left),o.color=n.parent.color,n.parent.color=el,o.left.color=el,this.rotate_right(n.parent),n=this.root));n.color=el}tree_search(e,n){if(!(e==null||e===this.nil_node))return n.equal_to(e)?e:n.less_than(e)?this.tree_search(e.left,n):this.tree_search(e.right,n)}tree_search_nearest_forward(e,n){let o=null,r=e;for(;r&&r!==this.nil_node;)r.less_than(n)?r.intersect(n)?(o=r,r=r.left):r=r.right:((!o||r.less_than(o))&&(o=r),r=r.left);return o||null}tree_search_interval(e,n,o){e!=null&&e!==this.nil_node&&(e.left!==this.nil_node&&!e.not_intersect_left_subtree(n)&&this.tree_search_interval(e.left,n,o),e.intersect(n)&&o.push(e),e.right!==this.nil_node&&!e.not_intersect_right_subtree(n)&&this.tree_search_interval(e.right,n,o))}tree_find_any_interval(e,n){let o=!1;return e!=null&&e!==this.nil_node&&(e.left!==this.nil_node&&!e.not_intersect_left_subtree(n)&&(o=this.tree_find_any_interval(e.left,n)),o||(o=e.intersect(n)),!o&&e.right!==this.nil_node&&!e.not_intersect_right_subtree(n)&&(o=this.tree_find_any_interval(e.right,n))),o}local_minimum(e){let n=e;for(;n.left!=null&&n.left!==this.nil_node;)n=n.left;return n}local_maximum(e){let n=e;for(;n.right!=null&&n.right!==this.nil_node;)n=n.right;return n}tree_successor(e){let n,o,r;if(e.right!==this.nil_node)n=this.local_minimum(e.right);else{for(o=e,r=e.parent;r!=null&&r.right===o;)o=r,r=r.parent;n=r}return n}rotate_left(e){const n=e.right;e.right=n.left,n.left!==this.nil_node&&(n.left.parent=e),n.parent=e.parent,e===this.root?this.root=n:e===e.parent.left?e.parent.left=n:e.parent.right=n,n.left=e,e.parent=n,e!==null&&e!==this.nil_node&&e.update_max(),n!=null&&n!==this.nil_node&&n.update_max()}rotate_right(e){const n=e.left;e.left=n.right,n.right!==this.nil_node&&(n.right.parent=e),n.parent=e.parent,e===this.root?this.root=n:e===e.parent.left?e.parent.left=n:e.parent.right=n,n.right=e,e.parent=n,e!==null&&e!==this.nil_node&&e.update_max(),n!=null&&n!==this.nil_node&&n.update_max()}tree_walk(e,n){e!=null&&e!==this.nil_node&&(this.tree_walk(e.left,n),n(e),this.tree_walk(e.right,n))}testRedBlackProperty(){let e=!0;return this.tree_walk(this.root,function(n){n.color===Yp&&(n.left.color===el&&n.right.color===el||(e=!1))}),e}testBlackHeightProperty(e){let n=0,o=0,r=0;if(e.color===el&&n++,e.left!==this.nil_node?o=this.testBlackHeightProperty(e.left):o=1,e.right!==this.nil_node?r=this.testBlackHeightProperty(e.right):r=1,o!==r)throw new Error("Red-black height property violated");return n+=o,n}}class Nkt extends Set{constructor(e){super(e),this.index=new gA,this.forEach(n=>this.index.insert(n))}add(e){let n=this.size;const{key:o,value:r}=e,i=o||e.box,s=r||e;return super.add(s),this.size>n&&this.index.insert(i,s),this}delete(e){const{key:n,value:o}=e,r=n||e.box,i=o||e;let s=super.delete(i);return s&&this.index.remove(r,i),s}clear(){super.clear(),this.index=new gA}search(e){return this.index.search(e)}hit(e){let n=new Ae.Box(e.x-1,e.y-1,e.x+1,e.y+1);return this.index.search(n).filter(r=>e.on(r))}svg(){return[...this].reduce((n,o)=>n+o.svg(),"")}}Ae.PlanarSet=Nkt;class $b{get name(){throw q0.CANNOT_INVOKE_ABSTRACT_METHOD}get box(){throw q0.CANNOT_INVOKE_ABSTRACT_METHOD}clone(){throw q0.CANNOT_INVOKE_ABSTRACT_METHOD}translate(...e){return this.transform(new t5().translate(...e))}rotate(e,n=new Ae.Point){return this.transform(new t5().rotate(e,n.x,n.y))}scale(e,n){return this.transform(new t5().scale(e,n))}transform(...e){throw q0.CANNOT_INVOKE_ABSTRACT_METHOD}toJSON(){return Object.assign({},this,{name:this.name})}svg(e={}){throw q0.CANNOT_INVOKE_ABSTRACT_METHOD}}let J3=class R1t extends $b{constructor(...e){if(super(),this.x=0,this.y=0,e.length!==0){if(e.length===1&&e[0]instanceof Array&&e[0].length===2){let n=e[0];if(typeof n[0]=="number"&&typeof n[1]=="number"){this.x=n[0],this.y=n[1];return}}if(e.length===1&&e[0]instanceof Object&&e[0].name==="point"){let{x:n,y:o}=e[0];this.x=n,this.y=o;return}if(e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"){this.x=e[0],this.y=e[1];return}throw q0.ILLEGAL_PARAMETERS}}get box(){return new Ae.Box(this.x,this.y,this.x,this.y)}clone(){return new Ae.Point(this.x,this.y)}get vertices(){return[this.clone()]}equalTo(e){return Ae.Utils.EQ(this.x,e.x)&&Ae.Utils.EQ(this.y,e.y)}lessThan(e){return!!(Ae.Utils.LT(this.y,e.y)||Ae.Utils.EQ(this.y,e.y)&&Ae.Utils.LT(this.x,e.x))}transform(e){return new Ae.Point(e.transform([this.x,this.y]))}projectionOn(e){if(this.equalTo(e.pt))return this.clone();let n=new Ae.Vector(this,e.pt);if(Ae.Utils.EQ_0(n.cross(e.norm)))return e.pt.clone();let o=n.dot(e.norm),r=e.norm.multiply(o);return this.translate(r)}leftTo(e){let n=new Ae.Vector(e.pt,this);return Ae.Utils.GT(n.dot(e.norm),0)}distanceTo(e){if(e instanceof R1t){let n=e.x-this.x,o=e.y-this.y;return[Math.sqrt(n*n+o*o),new Ae.Segment(this,e)]}if(e instanceof Ae.Line)return Ae.Distance.point2line(this,e);if(e instanceof Ae.Circle)return Ae.Distance.point2circle(this,e);if(e instanceof Ae.Segment)return Ae.Distance.point2segment(this,e);if(e instanceof Ae.Arc)return Ae.Distance.point2arc(this,e);if(e instanceof Ae.Polygon)return Ae.Distance.point2polygon(this,e);if(e instanceof Ae.PlanarSet)return Ae.Distance.shape2planarSet(this,e);if(e instanceof Ae.Multiline)return Ae.Distance.shape2multiline(this,e)}on(e){if(e instanceof Ae.Point)return this.equalTo(e);if(e.contains&&e.contains instanceof Function)return e.contains(this);throw Ae.Errors.UNSUPPORTED_SHAPE_TYPE}get name(){return"point"}svg(e={}){const n=e.r??3;return`
|
|
260
|
+
</path>`,n}};Ae.Multiline=G7;const skt=(...t)=>new Ae.Multiline(...t);Ae.multiline=skt;function uM(t,e,n){let o=n.length,r=t.shape.split(e);if(r.length===0)return;let i=0;r[0]===null?i=0:r[1]===null?i=t.shape.length:i=r[0].length;let s=_te;U7(i,0)&&(s|=_A),U7(i,t.shape.length)&&(s|=iM);let a;i===1/0?a=r[0].coord(e):a=s&iM&&t.next&&t.next.arc_length===0?0:t.arc_length+i,n.push({id:o,pt:e,arc_length:a,edge_before:t,edge_after:void 0,face:t.face,is_vertex:s})}function mA(t){t.int_points1_sorted=zb(t.int_points1),t.int_points2_sorted=zb(t.int_points2)}function zb(t){let e=new Map,n=0;for(let r of t)e.has(r.face)||(e.set(r.face,n),n++);for(let r of t)r.faceId=e.get(r.face);return t.slice().sort(akt)}function akt(t,e){return t.faceId<e.faceId?-1:t.faceId>e.faceId?1:t.arc_length<e.arc_length?-1:t.arc_length>e.arc_length?1:0}function yte(t){if(t.int_points1.length<2)return;let e=!1,n,o,r,i;for(let s=0;s<t.int_points1_sorted.length;s++)if(t.int_points1_sorted[s].id!==-1){n=t.int_points1_sorted[s],o=t.int_points2[n.id];for(let a=s+1;a<t.int_points1_sorted.length&&(r=t.int_points1_sorted[a],!!U7(r.arc_length,n.arc_length));a++)r.id!==-1&&(i=t.int_points2[r.id],i.id!==-1&&r.edge_before===n.edge_before&&r.edge_after===n.edge_after&&i.edge_before===o.edge_before&&i.edge_after===o.edge_after&&(r.id=-1,i.id=-1,e=!0))}o=t.int_points2_sorted[0],n=t.int_points1[o.id];for(let s=1;s<t.int_points2_sorted.length;s++){let a=t.int_points2_sorted[s];if(a.id===-1)continue;if(o.id===-1||!U7(a.arc_length,o.arc_length)){o=a,n=t.int_points1[o.id];continue}let c=t.int_points1[a.id];c.edge_before===n.edge_before&&c.edge_after===n.edge_after&&a.edge_before===o.edge_before&&a.edge_after===o.edge_after&&(c.id=-1,a.id=-1,e=!0)}e&&(t.int_points1=t.int_points1.filter(s=>s.id>=0),t.int_points2=t.int_points2.filter(s=>s.id>=0),t.int_points1.forEach((s,a)=>s.id=a),t.int_points2.forEach((s,a)=>s.id=a))}function bte(t){for(let e of t)e.edge_before&&(e.edge_before.bvStart=void 0,e.edge_before.bvEnd=void 0,e.edge_before.bv=void 0,e.edge_before.overlap=void 0),e.edge_after&&(e.edge_after.bvStart=void 0,e.edge_after.bvEnd=void 0,e.edge_after.bv=void 0,e.edge_after.overlap=void 0);for(let e of t)e.edge_before&&(e.edge_before.bvEnd=_6),e.edge_after&&(e.edge_after.bvStart=_6)}function Pte(t,e){for(let n of t)n.edge_before&&n.edge_before.setInclusion(e),n.edge_after&&n.edge_after.setInclusion(e)}function ckt(t){let e,n,o,r=t.int_points1.length;for(let i=0;i<r;i++){let s=t.int_points1_sorted[i];s.face!==e&&(n=i,e=s.face);let a=i,c=_M(t.int_points1_sorted,i,e),l;a+c<r&&t.int_points1_sorted[a+c].face===e?l=a+c:l=n;let u=_M(t.int_points1_sorted,l,e);o=null;for(let f=l;f<l+u;f++){let g=t.int_points1_sorted[f];if(g.face===e&&t.int_points2[g.id].face===t.int_points2[s.id].face){o=g;break}}if(o===null)continue;let _=s.edge_after,d=o.edge_before;if(!(_.bv===_6&&d.bv===_6)||_!==d)continue;let m=t.int_points2[s.id],h=t.int_points2[o.id],p=m.edge_after,x=h.edge_before;p.bv===_6&&x.bv===_6&&p===x||(m=t.int_points2[o.id],h=t.int_points2[s.id],p=m.edge_after,x=h.edge_before),p.bv===_6&&x.bv===_6&&p===x&&_.setOverlap(p)}}function _M(t,e,n){let o,r,i=1;if(t.length===1)return 1;o=t[e];for(let s=e+1;s<t.length&&!(o.face!==n||(r=t[s],!(r.pt.equalTo(o.pt)&&r.edge_before===o.edge_before&&r.edge_after===o.edge_after)));s++)i++;return i}function dM(t,e){if(e){for(let n of e){let o=n.edge_before;if(n.is_vertex=_te,o.shape.start&&o.shape.start.equalTo(n.pt)&&(n.is_vertex|=_A),o.shape.end&&o.shape.end.equalTo(n.pt)&&(n.is_vertex|=iM),n.is_vertex&_A){n.edge_before=o.prev,o.prev&&(n.is_vertex=iM);continue}if(n.is_vertex&iM)continue;let r=t.addVertex(n.pt,o);n.edge_before=r}for(let n of e)n.edge_before?n.edge_after=n.edge_before.next:t instanceof G7&&n.is_vertex&_A&&(n.edge_after=t.first)}}function SCe(t,e,n){const o=t.edge_before,r=e.edge_after,i=n.length;o.next=n[0],n[0].prev=o,n[i-1].next=r,r.prev=n[i-1]}const{INSIDE:h6,OUTSIDE:m6,BOUNDARY:qm,OVERLAP_SAME:lkt,OVERLAP_OPPOSITE:ukt}=qB,{NOT_VERTEX:Jio,START_VERTEX:CCe,END_VERTEX:MCe}=qB,ZB=1,pA=2,Y7=3;function _kt(t,e){let[n]=fA(t,e,ZB,!0);return n}function vte(t,e){let o=e.clone().reverse(),[r]=fA(t,o,Y7,!0);return r}function TCe(t,e){let[n]=fA(t,e,pA,!0);return n}function wCe(t,e){let[n,o]=fA(t,e,pA,!1),r=[];for(let s of n.faces)r=[...r,...[...s.edges].map(a=>a.shape)];let i=[];for(let s of o.faces)i=[...i,...[...s.edges].map(a=>a.shape)];return[r,i]}function Ste(t,e){let[n]=fA(t,e,Y7,!1),o=[];for(let r of n.faces)o=[...o,...[...r.edges].map(i=>i.shape)];return o}function ECe(t,e){let n=t.clone(),o=e.clone(),r=DCe(n,o);mA(r),dM(n,r.int_points1_sorted),dM(o,r.int_points2_sorted),yte(r),mA(r);let i=r.int_points1_sorted.map(a=>a.pt),s=r.int_points2_sorted.map(a=>a.pt);return[i,s]}function dkt(t,e,n,o){let r=ACe(t,n.int_points1),i=ACe(e,n.int_points2);for(RCe(r,e),RCe(i,t),bte(n.int_points1),bte(n.int_points2),Pte(n.int_points1,e),Pte(n.int_points2,t);mkt(t,e,n.int_points1,n.int_points1_sorted,n.int_points2,n););ckt(n),Cte(t,o,n.int_points1_sorted,!0),Cte(e,o,n.int_points2_sorted,!1),kCe(t,r,o,!0),kCe(e,i,o,!1)}function hkt(t,e,n,o){pkt(t,e,o,n.int_points2),fkt(t,e,n),Mte(t,n.int_points1),Mte(e,n.int_points2),Tte(t,n.int_points1,n.int_points2),Tte(t,n.int_points2,n.int_points1)}function fA(t,e,n,o){let r=t.clone(),i=e.clone(),s=DCe(r,i);return mA(s),dM(r,s.int_points1_sorted),dM(i,s.int_points2_sorted),yte(s),mA(s),dkt(r,i,s,n),o&&hkt(r,i,s,n),[r,i]}function DCe(t,e){let n={int_points1:[],int_points2:[]};for(let o of t.edges){let r=e.edges.search(o.box);for(let i of r){let s=o.shape.intersect(i.shape);for(let a of s)uM(o,a,n.int_points1),uM(i,a,n.int_points2)}}return n}function ACe(t,e){let n=[];for(let o of t.faces)e.find(r=>r.face===o)||n.push(o);return n}function RCe(t,e){for(let n of t)n.first.bv=n.first.bvStart=n.first.bvEnd=void 0,n.first.setInclusion(e)}function mkt(t,e,n,o,r,i){let s,a,c,l=o.length,u=!1;for(let _=0;_<l;_++){let d=o[_];d.face!==s&&(a=_,s=d.face);let m=_,h=_M(o,_,s),p;m+h<l&&o[m+h].face===s?p=m+h:p=a;let x=_M(o,p,s);c=null;for(let y=p;y<p+x;y++){let b=o[y];if(b.face===s&&r[b.id].face===r[d.id].face){c=b;break}}if(c===null)continue;let f=d.edge_after,g=c.edge_before;if(f.bv===qm&&g.bv!=qm){f.bv=g.bv;continue}if(f.bv!=qm&&g.bv===qm){g.bv=f.bv;continue}if(f.bv===qm&&g.bv===qm&&f!=g||f.bv===h6&&g.bv===m6||f.bv===m6&&g.bv===h6){let y=f.next;for(;y!=g;)y.bvStart=void 0,y.bvEnd=void 0,y.bv=void 0,y.setInclusion(e),y=y.next}if(f.bv===qm&&g.bv===qm&&f!=g){let y=f.next,b;for(;y!=g;){if(y.bv!=qm){if(b===void 0)b=y.bv;else if(y.bv!=b)throw q0.UNRESOLVED_BOUNDARY_CONFLICT}y=y.next}b!=null&&(f.bv=b,g.bv=b);continue}if(f.bv===h6&&g.bv===m6||f.bv===m6&&g.bv===h6){let y=f;for(;y!=g;){if(y.bvStart===f.bv&&y.bvEnd===g.bv){let[b,v]=y.shape.distanceTo(e);if(b<10*Ae.DP_TOL){uM(y,v.ps,n);let S=n[n.length-1];if(S.is_vertex&CCe)S.edge_after=y,S.edge_before=y.prev,y.bvStart=qm,y.bv=void 0,y.setInclusion(e);else if(S.is_vertex&MCe)S.edge_after=y.next,y.bvEnd=qm,y.bv=void 0,y.setInclusion(e);else{let D=e.addVertex(S.pt,y);S.edge_before=D,S.edge_after=D.next,D.setInclusion(e),D.next.bvStart=qm,D.next.bvEnd=void 0,D.next.bv=void 0,D.next.setInclusion(e)}let M=e.findEdgeByPoint(v.pe);uM(M,v.pe,r);let w=r[r.length-1];if(w.is_vertex&CCe)w.edge_after=M,w.edge_before=M.prev;else if(w.is_vertex&MCe)w.edge_after=M.next;else{let D=r.find(I=>I.edge_after===M),A=e.addVertex(w.pt,M);w.edge_before=A,w.edge_after=A.next,D&&(D.edge_after=A),A.bvStart=void 0,A.bvEnd=qm,A.bv=void 0,A.setInclusion(t),A.next.bvStart=qm,A.next.bvEnd=void 0,A.next.bv=void 0,A.next.setInclusion(t)}mA(i),u=!0;break}}y=y.next}if(u)break;throw q0.UNRESOLVED_BOUNDARY_CONFLICT}}return u}function Cte(t,e,n,o){if(!n)return;let r,i,s,a;for(let c=0;c<n.length;c++){if(s=n[c],s.face!==r&&(i=c,r=s.face),r.isEmpty())continue;let l=c,u=_M(n,c,r),_;l+u<n.length&&n[l+u].face===s.face?_=l+u:_=i,a=n[_];let d=_,m=_M(n,d,r),h=s.edge_after,p=a.edge_before;if(h.bv===h6&&p.bv===h6&&e===ZB||h.bv===m6&&p.bv===m6&&e===pA||(h.bv===m6||p.bv===m6)&&e===Y7&&!o||(h.bv===h6||p.bv===h6)&&e===Y7&&o||h.bv===qm&&p.bv===qm&&h.overlap&lkt&&o||h.bv===qm&&p.bv===qm&&h.overlap&ukt){t.removeChain(r,h,p);for(let x=l;x<l+u;x++)n[x].edge_after=void 0;for(let x=d;x<d+m;x++)n[x].edge_before=void 0}c+=u-1}}function pkt(t,e,n,o){for(let r of e.faces){for(let i of r)t.edges.add(i);o.find(i=>i.face===r)===void 0&&t.addFace(r.first,r.last)}}function fkt(t,e,n){if(n.int_points1.length!==0)for(let o=0;o<n.int_points1.length;o++){let r=n.int_points1[o],i=n.int_points2[o];if(r.edge_before!==void 0&&r.edge_after===void 0&&i.edge_before===void 0&&i.edge_after!==void 0&&(r.edge_before.next=i.edge_after,i.edge_after.prev=r.edge_before,r.edge_after=i.edge_after,i.edge_before=r.edge_before),i.edge_before!==void 0&&i.edge_after===void 0&&r.edge_before===void 0&&r.edge_after!==void 0&&(i.edge_before.next=r.edge_after,r.edge_after.prev=i.edge_before,i.edge_after=r.edge_after,r.edge_before=i.edge_before),r.edge_before!==void 0&&r.edge_after===void 0)for(let s of n.int_points1_sorted)s!==r&&s.edge_before===void 0&&s.edge_after!==void 0&&s.pt.equalTo(r.pt)&&(r.edge_before.next=s.edge_after,s.edge_after.prev=r.edge_before,r.edge_after=s.edge_after,s.edge_before=r.edge_before);if(i.edge_before!==void 0&&i.edge_after===void 0)for(let s of n.int_points2_sorted)s!==i&&s.edge_before===void 0&&s.edge_after!==void 0&&s.pt.equalTo(i.pt)&&(i.edge_before.next=s.edge_after,s.edge_after.prev=i.edge_before,i.edge_after=s.edge_after,s.edge_before=i.edge_before)}}function Mte(t,e){for(let n of e)t.faces.delete(n.face),n.face=void 0,n.edge_before&&(n.edge_before.face=void 0),n.edge_after&&(n.edge_after.face=void 0)}function Tte(t,e,n){for(let o of e){if(o.edge_before===void 0||o.edge_after===void 0||o.face||o.edge_after.face||o.edge_before.face)continue;let r=o.edge_after,i=o.edge_before;try{hte.testInfiniteLoop(r)}catch{throw q0.CANNOT_COMPLETE_BOOLEAN_OPERATION}let s=t.addFace(r,i);for(let a of e)a.edge_before&&a.edge_after&&a.edge_before.face===s&&a.edge_after.face===s&&(a.face=s);for(let a of n)a.edge_before&&a.edge_after&&a.edge_before.face===s&&a.edge_after.face===s&&(a.face=s)}}function kCe(t,e,n,o){for(let r of e){let i=r.first.bv;(n===ZB&&i===h6||n===Y7&&i===h6&&o||n===Y7&&i===m6&&!o||n===pA&&i===m6)&&t.deleteFace(r)}}var NCe=Object.freeze({__proto__:null,BOOLEAN_INTERSECT:pA,BOOLEAN_SUBTRACT:Y7,BOOLEAN_UNION:ZB,calculateIntersections:ECe,innerClip:wCe,intersect:TCe,outerClip:Ste,removeNotRelevantChains:Cte,removeOldFaces:Mte,restoreFaces:Tte,subtract:vte,unify:_kt});const xkt=RegExp("T.F..FFF.|T.F...F.."),gkt=RegExp("T........|.T.......|...T.....|....T...."),ykt=RegExp("FT.......|F..T.....|F...T...."),bkt=RegExp("T.F..F..."),Pkt=RegExp("T.F..F...|.TF..F...|..FT.F...|..F.TF...");class hM{constructor(){this.m=new Array(9).fill(void 0)}get I2I(){return this.m[0]}set I2I(e){this.m[0]=e}get I2B(){return this.m[1]}set I2B(e){this.m[1]=e}get I2E(){return this.m[2]}set I2E(e){this.m[2]=e}get B2I(){return this.m[3]}set B2I(e){this.m[3]=e}get B2B(){return this.m[4]}set B2B(e){this.m[4]=e}get B2E(){return this.m[5]}set B2E(e){this.m[5]=e}get E2I(){return this.m[6]}set E2I(e){this.m[6]=e}get E2B(){return this.m[7]}set E2B(e){this.m[7]=e}get E2E(){return this.m[8]}set E2E(e){this.m[8]=e}toString(){return this.m.map(e=>e instanceof Array&&e.length>0?"T":e instanceof Array&&e.length===0?"F":"*").join("")}equal(){return xkt.test(this.toString())}intersect(){return gkt.test(this.toString())}touch(){return ykt.test(this.toString())}inside(){return bkt.test(this.toString())}covered(){return Pkt.test(this.toString())}}function xA(t,e){let n,o=new Ae.Ray(e),r=new Ae.Line(o.pt,o.norm);const i=new Ae.Box(o.box.xmin-Ae.DP_TOL,o.box.ymin-Ae.DP_TOL,o.box.xmax+Ae.DP_TOL,o.box.ymax+Ae.DP_TOL);if(t.box.not_intersect(i))return Ae.OUTSIDE;let s=t.edges.search(i);if(s.length===0)return Ae.OUTSIDE;for(let u of s)if(u.shape.contains(e))return Ae.BOUNDARY;let a=[...t.faces],c=[];for(let u of s)for(let _ of o.intersect(u.shape)){if(_.equalTo(e))return Ae.BOUNDARY;c.push({pt:_,edge:u,face_index:a.indexOf(u.face)})}c.sort((u,_)=>aCe(u.pt.x,_.pt.x)?-1:sCe(u.pt.x,_.pt.x)?1:u.face_index<_.face_index?-1:u.face_index>_.face_index?1:u.edge.arc_length<_.edge.arc_length?-1:u.edge.arc_length>_.edge.arc_length?1:0);let l=0;for(let u=0;u<c.length;u++){let _=c[u];if(_.pt.equalTo(_.edge.shape.start)){if(u>0&&_.pt.equalTo(c[u-1].pt)&&_.face_index===c[u-1].face_index&&_.edge.prev===c[u-1].edge)continue;let d=_.edge.prev;for(;dte(d.length);)d=d.prev;let m=d.shape.tangentInEnd(),h=_.pt.translate(m),p=_.edge.shape.tangentInStart(),x=_.pt.translate(p),f=h.leftTo(r),g=x.leftTo(r);(f&&!g||!f&&g)&&l++}else if(_.pt.equalTo(_.edge.shape.end)){if(u>0&&_.pt.equalTo(c[u-1].pt)&&_.face_index===c[u-1].face_index&&_.edge.next===c[u-1].edge)continue;let d=_.edge.next;for(;dte(d.length);)d=d.next;let m=d.shape.tangentInStart(),h=_.pt.translate(m),p=_.edge.shape.tangentInEnd(),x=_.pt.translate(p),f=h.leftTo(r),g=x.leftTo(r);(f&&!g||!f&&g)&&l++}else if(_.edge.shape instanceof Ae.Segment)l++;else{let d=_.edge.shape.box;U7(_.pt.y,d.ymin)||U7(_.pt.y,d.ymax)||l++}}return n=l%2===1?YB:oCe,n}function vkt(t,e){return mM(t,e).equal()}function HCe(t,e){return mM(t,e).intersect()}function Skt(t,e){return mM(t,e).touch()}function Ckt(t,e){return!HCe(t,e)}function ICe(t,e){return mM(t,e).inside()}function LCe(t,e){return mM(t,e).covered()}function Mkt(t,e){return ICe(e,t)}function OCe(t,e){return LCe(e,t)}function mM(t,e){if(t instanceof Ae.Line&&e instanceof Ae.Line)return Tkt(t,e);if(t instanceof Ae.Line&&e instanceof Ae.Circle)return wkt(t,e);if(t instanceof Ae.Line&&e instanceof Ae.Box)return Ekt(t,e);if(t instanceof Ae.Line&&e instanceof Ae.Polygon)return Dkt(t,e);if((t instanceof Ae.Segment||t instanceof Ae.Arc)&&e instanceof Ae.Polygon)return FCe(t,e);if((t instanceof Ae.Segment||t instanceof Ae.Arc)&&(e instanceof Ae.Circle||e instanceof Ae.Box))return FCe(t,new Ae.Polygon(e));if(t instanceof Ae.Polygon&&e instanceof Ae.Polygon)return ez(t,e);if((t instanceof Ae.Circle||t instanceof Ae.Box)&&(e instanceof Ae.Circle||e instanceof Ae.Box))return ez(new Ae.Polygon(t),new Ae.Polygon(e));if((t instanceof Ae.Circle||t instanceof Ae.Box)&&e instanceof Ae.Polygon)return ez(new Ae.Polygon(t),e);if(t instanceof Ae.Polygon&&(e instanceof Ae.Circle||e instanceof Ae.Box))return ez(t,new Ae.Polygon(e))}function Tkt(t,e){let n=new hM,o=sM(t,e);return o.length===0?t.contains(e.pt)&&e.contains(t.pt)?(n.I2I=[t],n.I2E=[],n.E2I=[]):(n.I2I=[],n.I2E=[t],n.E2I=[e]):(n.I2I=o,n.I2E=t.split(o),n.E2I=e.split(o)),n}function wkt(t,e){let n=new hM,o=j7(t,e);if(o.length===0)n.I2I=[],n.I2B=[],n.I2E=[t],n.E2I=[e];else if(o.length===1)n.I2I=[],n.I2B=o,n.I2E=t.split(o),n.E2I=[e];else{let r=new G7([t]),i=t.sortPoints(o);r.split(i);let s=r.toShapes();n.I2I=[s[1]],n.I2B=i,n.I2E=[s[0],s[2]],n.E2I=new Ae.Polygon([e.toArc()]).cutWithLine(t)}return n}function Ekt(t,e){let n=new hM,o=aM(t,e);if(o.length===0)n.I2I=[],n.I2B=[],n.I2E=[t],n.E2I=[e];else if(o.length===1)n.I2I=[],n.I2B=o,n.I2E=t.split(o),n.E2I=[e];else{let r=new G7([t]),i=t.sortPoints(o);r.split(i);let s=r.toShapes();e.toSegments().some(a=>a.contains(o[0])&&a.contains(o[1]))?(n.I2I=[],n.I2B=[s[1]],n.I2E=[s[0],s[2]],n.E2I=[e]):(n.I2I=[s[1]],n.I2B=i,n.I2E=[s[0],s[2]],n.E2I=new Ae.Polygon(e.toSegments()).cutWithLine(t))}return n}function Dkt(t,e){let n=new hM,o=hA(t,e),r=new G7([t]),i=o.length>0?o.slice():t.sortPoints(o);return r.split(i),[...r].forEach(s=>s.setInclusion(e)),n.I2I=[...r].filter(s=>s.bv===Ae.INSIDE).map(s=>s.shape),n.I2B=[...r].slice(1).map(s=>s.bv===Ae.BOUNDARY?s.shape:s.shape.start),n.I2E=[...r].filter(s=>s.bv===Ae.OUTSIDE).map(s=>s.shape),n.E2I=e.cutWithLine(t),n}function FCe(t,e){let n=new hM,o=nkt(t,e),r=o.length>0?o.slice():t.sortPoints(o),i=new G7([t]);i.split(r),[...i].forEach(s=>s.setInclusion(e)),n.I2I=[...i].filter(s=>s.bv===Ae.INSIDE).map(s=>s.shape),n.I2B=[...i].slice(1).map(s=>s.bv===Ae.BOUNDARY?s.shape:s.shape.start),n.I2E=[...i].filter(s=>s.bv===Ae.OUTSIDE).map(s=>s.shape),n.B2I=[],n.B2B=[],n.B2E=[];for(let s of[t.start,t.end])switch(xA(e,s)){case Ae.INSIDE:n.B2I.push(s);break;case Ae.BOUNDARY:n.B2B.push(s);break;case Ae.OUTSIDE:n.B2E.push(s);break}return n}function ez(t,e){let n=new hM,[o,r]=ECe(t,e),i=TCe(t,e),s=vte(t,e),a=vte(e,t),[c,l]=wCe(t,e),u=Ste(t,e),_=Ste(e,t);return n.I2I=i.isEmpty()?[]:[i],n.I2B=l,n.I2E=s.isEmpty()?[]:[s],n.B2I=c,n.B2B=o,n.B2E=u,n.E2I=a.isEmpty()?[]:[a],n.E2B=_,n}var Akt=Object.freeze({__proto__:null,contain:Mkt,cover:OCe,covered:LCe,disjoint:Ckt,equal:vkt,inside:ICe,intersect:HCe,relate:mM,touch:Skt});class t5{constructor(e=1,n=0,o=0,r=1,i=0,s=0){this.a=e,this.b=n,this.c=o,this.d=r,this.tx=i,this.ty=s}fromMatrix3x3(e){const[n,o,r]=e[0],[i,s,a]=e[1];return new t5(n,i,o,s,r,a)}toMatrix3x3(){return[[this.a,this.c,this.tx],[this.b,this.d,this.ty],[0,0,1]]}clone(){return new t5(this.a,this.b,this.c,this.d,this.tx,this.ty)}transform(e){return[e[0]*this.a+e[1]*this.c+this.tx,e[0]*this.b+e[1]*this.d+this.ty]}multiply(e){return new t5(this.a*e.a+this.c*e.b,this.b*e.a+this.d*e.b,this.a*e.c+this.c*e.d,this.b*e.c+this.d*e.d,this.a*e.tx+this.c*e.ty+this.tx,this.b*e.tx+this.d*e.ty+this.ty)}translate(...e){let n,o;if(e.length==1&&!isNaN(e[0].x)&&!isNaN(e[0].y))n=e[0].x,o=e[0].y;else if(e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number")n=e[0],o=e[1];else throw q0.ILLEGAL_PARAMETERS;return this.multiply(new t5(1,0,0,1,n,o))}rotate(e,n=0,o=0){let r=Math.cos(e),i=Math.sin(e);return this.translate(n,o).multiply(new t5(r,i,-i,r,0,0)).translate(-n,-o)}scale(e,n){return this.multiply(new t5(e,0,0,n,0,0))}equalTo(e){return!(!Ae.Utils.EQ(this.tx,e.tx)||!Ae.Utils.EQ(this.ty,e.ty)||!Ae.Utils.EQ(this.a,e.a)||!Ae.Utils.EQ(this.b,e.b)||!Ae.Utils.EQ(this.c,e.c)||!Ae.Utils.EQ(this.d,e.d))}}Ae.Matrix=t5;const Rkt=(...t)=>new Ae.Matrix(...t);Ae.matrix=Rkt;class kkt{constructor(e,n){this.low=e,this.high=n}get max(){return this.clone()}less_than(e){return this.low<e.low||this.low===e.low&&this.high<e.high}equal_to(e){return this.low===e.low&&this.high===e.high}intersect(e){return!this.not_intersect(e)}not_intersect(e){return this.high<e.low||e.high<this.low}merge(e){const n=this.low===void 0?e.low:this.low<e.low?this.low:e.low,o=this.high===void 0?e.high:this.high>e.high?this.high:e.high,r=this.clone();return r.low=n,r.high=o,r}output(){return[this.low,this.high]}comparable_less_than(e,n){return e<n}}class wte extends kkt{clone(){return new wte(this.low,this.high)}}const Yp=1,el=0;let Vb=class{constructor(e,n,o=null,r=null,i=null,s=el){if(this.left=o,this.right=r,this.parent=i,this.color=s,this.item={key:void 0,values:[]},n!==void 0&&this.item.values.push(n),e!==void 0)if(Array.isArray(e)){const[a,c]=e;if(!Number.isNaN(a)&&!Number.isNaN(c)){let l=a,u=c;l>u&&([l,u]=[u,l]),this.item.key=new wte(l,u)}}else this.item.key=e;this.max=this.item.key?this.item.key.max:void 0}isNil(){return this.item.key===void 0&&this.item.values.length===0&&this.left===null&&this.right===null&&this.color===el}requireKey(){if(!this.item.key)throw new Error("Node key is undefined (nil/sentinel). Operation is not applicable.");return this.item.key}less_than(e){const n=this.requireKey(),o=e.requireKey();return n.less_than(o)}_value_equal(e){const n=this.item.values[0],o=e.item.values[0];return n&&o&&n.equal_to?n.equal_to(o):n===o}equal_to(e){const n=this.requireKey(),o=e.requireKey();return n.equal_to(o)}intersect(e){const n=this.requireKey(),o=e.requireKey();return n.intersect(o)}copy_data(e){this.item.key=e.item.key,this.item.values=e.item.values.slice()}update_max(){this.max=this.item.key?this.item.key.max:void 0,this.right&&this.right.max&&(this.max=this.max?this.max.merge(this.right.max):this.right.max),this.left&&this.left.max&&(this.max=this.max?this.max.merge(this.left.max):this.left.max)}not_intersect_left_subtree(e){if(!this.left)return!0;const n=this.left.max?this.left.max.high:this.left.item.key.high,o=this.requireKey(),r=e.requireKey();return o.comparable_less_than(n,r.low)}not_intersect_right_subtree(e){if(!this.right)return!0;const n=this.right.max?this.right.max.low:this.right.item.key.low,o=this.requireKey(),r=e.requireKey();return o.comparable_less_than(r.high,n)}};class gA{constructor(){this.root=null,this.nil_node=new Vb}get size(){let e=0;return this.tree_walk(this.root,n=>e+=n.item.values.length),e}get keys(){const e=[];return this.tree_walk(this.root,n=>e.push(n.item.key.output())),e}get values(){const e=[];return this.tree_walk(this.root,n=>{for(const o of n.item.values)e.push(o)}),e}get items(){const e=[];return this.tree_walk(this.root,n=>{const o=n.item.key.output();for(const r of n.item.values)e.push({key:o,value:r})}),e}isEmpty(){return this.root==null||this.root===this.nil_node}clear(){this.root=null}insert(e,n=e){if(e===void 0)return;const o=this.tree_search(this.root,new Vb(e));if(o)return o.item.values.push(n),o;const r=new Vb(e,n,this.nil_node,this.nil_node,null,Yp);return this.tree_insert(r),this.recalc_max(r),r}exist(e,n=e){const o=this.tree_search(this.root,new Vb(e));return o?arguments.length<2||n===e?!0:o.item.values.some(r=>r&&r.equal_to?r.equal_to(n):r===n):!1}remove(e,n=e){const o=this.tree_search(this.root,new Vb(e));if(!o)return;if(arguments.length<2)return this.tree_delete(o),o;const r=o.item.values.findIndex(i=>i&&i.equal_to?i.equal_to(n):i===n);if(r>=0)return o.item.values.splice(r,1),o.item.values.length===0&&this.tree_delete(o),o}search(e,n=(o,r)=>o===r?r.output():o){const o=new Vb(e),r=[];this.tree_search_interval(this.root,o,r);const i=[];for(const s of r)for(const a of s.item.values)i.push(n(a,s.item.key));return i}intersect_any(e){const n=new Vb(e);return this.tree_find_any_interval(this.root,n)}forEach(e){this.tree_walk(this.root,n=>{for(const o of n.item.values)e(n.item.key,o)})}map(e){const n=new gA;return this.tree_walk(this.root,o=>{for(const r of o.item.values)n.insert(o.item.key,e(r,o.item.key))}),n}*iterate(e,n=(o,r)=>o===r?r.output():o){let o=null;for(e?o=this.tree_search_nearest_forward(this.root,new Vb(e)):this.root&&(o=this.local_minimum(this.root));o;){for(const r of o.item.values)yield n(r,o.item.key);o=this.tree_successor(o)}}recalc_max(e){let n=e;for(;n.parent!=null;)n.parent.update_max(),n=n.parent}tree_insert(e){let n=this.root,o=null;if(this.root==null||this.root===this.nil_node)this.root=e;else{for(;n!==this.nil_node;)o=n,e.less_than(n)?n=n.left:n=n.right;e.parent=o,e.less_than(o)?o.left=e:o.right=e}this.insert_fixup(e)}insert_fixup(e){let n,o;for(n=e;n!==this.root&&n.parent.color===Yp;)n.parent===n.parent.parent.left?(o=n.parent.parent.right,o.color===Yp?(n.parent.color=el,o.color=el,n.parent.parent.color=Yp,n=n.parent.parent):(n===n.parent.right&&(n=n.parent,this.rotate_left(n)),n.parent.color=el,n.parent.parent.color=Yp,this.rotate_right(n.parent.parent))):(o=n.parent.parent.left,o.color===Yp?(n.parent.color=el,o.color=el,n.parent.parent.color=Yp,n=n.parent.parent):(n===n.parent.left&&(n=n.parent,this.rotate_right(n)),n.parent.color=el,n.parent.parent.color=Yp,this.rotate_left(n.parent.parent)));this.root.color=el}tree_delete(e){let n,o;e.left===this.nil_node||e.right===this.nil_node?n=e:n=this.tree_successor(e),n.left!==this.nil_node?o=n.left:o=n.right,o.parent=n.parent,n===this.root?this.root=o:(n===n.parent.left?n.parent.left=o:n.parent.right=o,n.parent.update_max()),this.recalc_max(o),n!==e&&(e.copy_data(n),e.update_max(),this.recalc_max(e)),n.color===el&&this.delete_fixup(o)}delete_fixup(e){let n=e,o;for(;n!==this.root&&n.parent!=null&&n.color===el;)n===n.parent.left?(o=n.parent.right,o.color===Yp&&(o.color=el,n.parent.color=Yp,this.rotate_left(n.parent),o=n.parent.right),o.left.color===el&&o.right.color===el?(o.color=Yp,n=n.parent):(o.right.color===el&&(o.color=Yp,o.left.color=el,this.rotate_right(o),o=n.parent.right),o.color=n.parent.color,n.parent.color=el,o.right.color=el,this.rotate_left(n.parent),n=this.root)):(o=n.parent.left,o.color===Yp&&(o.color=el,n.parent.color=Yp,this.rotate_right(n.parent),o=n.parent.left),o.left.color===el&&o.right.color===el?(o.color=Yp,n=n.parent):(o.left.color===el&&(o.color=Yp,o.right.color=el,this.rotate_left(o),o=n.parent.left),o.color=n.parent.color,n.parent.color=el,o.left.color=el,this.rotate_right(n.parent),n=this.root));n.color=el}tree_search(e,n){if(!(e==null||e===this.nil_node))return n.equal_to(e)?e:n.less_than(e)?this.tree_search(e.left,n):this.tree_search(e.right,n)}tree_search_nearest_forward(e,n){let o=null,r=e;for(;r&&r!==this.nil_node;)r.less_than(n)?r.intersect(n)?(o=r,r=r.left):r=r.right:((!o||r.less_than(o))&&(o=r),r=r.left);return o||null}tree_search_interval(e,n,o){e!=null&&e!==this.nil_node&&(e.left!==this.nil_node&&!e.not_intersect_left_subtree(n)&&this.tree_search_interval(e.left,n,o),e.intersect(n)&&o.push(e),e.right!==this.nil_node&&!e.not_intersect_right_subtree(n)&&this.tree_search_interval(e.right,n,o))}tree_find_any_interval(e,n){let o=!1;return e!=null&&e!==this.nil_node&&(e.left!==this.nil_node&&!e.not_intersect_left_subtree(n)&&(o=this.tree_find_any_interval(e.left,n)),o||(o=e.intersect(n)),!o&&e.right!==this.nil_node&&!e.not_intersect_right_subtree(n)&&(o=this.tree_find_any_interval(e.right,n))),o}local_minimum(e){let n=e;for(;n.left!=null&&n.left!==this.nil_node;)n=n.left;return n}local_maximum(e){let n=e;for(;n.right!=null&&n.right!==this.nil_node;)n=n.right;return n}tree_successor(e){let n,o,r;if(e.right!==this.nil_node)n=this.local_minimum(e.right);else{for(o=e,r=e.parent;r!=null&&r.right===o;)o=r,r=r.parent;n=r}return n}rotate_left(e){const n=e.right;e.right=n.left,n.left!==this.nil_node&&(n.left.parent=e),n.parent=e.parent,e===this.root?this.root=n:e===e.parent.left?e.parent.left=n:e.parent.right=n,n.left=e,e.parent=n,e!==null&&e!==this.nil_node&&e.update_max(),n!=null&&n!==this.nil_node&&n.update_max()}rotate_right(e){const n=e.left;e.left=n.right,n.right!==this.nil_node&&(n.right.parent=e),n.parent=e.parent,e===this.root?this.root=n:e===e.parent.left?e.parent.left=n:e.parent.right=n,n.right=e,e.parent=n,e!==null&&e!==this.nil_node&&e.update_max(),n!=null&&n!==this.nil_node&&n.update_max()}tree_walk(e,n){e!=null&&e!==this.nil_node&&(this.tree_walk(e.left,n),n(e),this.tree_walk(e.right,n))}testRedBlackProperty(){let e=!0;return this.tree_walk(this.root,function(n){n.color===Yp&&(n.left.color===el&&n.right.color===el||(e=!1))}),e}testBlackHeightProperty(e){let n=0,o=0,r=0;if(e.color===el&&n++,e.left!==this.nil_node?o=this.testBlackHeightProperty(e.left):o=1,e.right!==this.nil_node?r=this.testBlackHeightProperty(e.right):r=1,o!==r)throw new Error("Red-black height property violated");return n+=o,n}}class Nkt extends Set{constructor(e){super(e),this.index=new gA,this.forEach(n=>this.index.insert(n))}add(e){let n=this.size;const{key:o,value:r}=e,i=o||e.box,s=r||e;return super.add(s),this.size>n&&this.index.insert(i,s),this}delete(e){const{key:n,value:o}=e,r=n||e.box,i=o||e;let s=super.delete(i);return s&&this.index.remove(r,i),s}clear(){super.clear(),this.index=new gA}search(e){return this.index.search(e)}hit(e){let n=new Ae.Box(e.x-1,e.y-1,e.x+1,e.y+1);return this.index.search(n).filter(r=>e.on(r))}svg(){return[...this].reduce((n,o)=>n+o.svg(),"")}}Ae.PlanarSet=Nkt;class $b{get name(){throw q0.CANNOT_INVOKE_ABSTRACT_METHOD}get box(){throw q0.CANNOT_INVOKE_ABSTRACT_METHOD}clone(){throw q0.CANNOT_INVOKE_ABSTRACT_METHOD}translate(...e){return this.transform(new t5().translate(...e))}rotate(e,n=new Ae.Point){return this.transform(new t5().rotate(e,n.x,n.y))}scale(e,n){return this.transform(new t5().scale(e,n))}transform(...e){throw q0.CANNOT_INVOKE_ABSTRACT_METHOD}toJSON(){return Object.assign({},this,{name:this.name})}svg(e={}){throw q0.CANNOT_INVOKE_ABSTRACT_METHOD}}let J3=class R1t extends $b{constructor(...e){if(super(),this.x=0,this.y=0,e.length!==0){if(e.length===1&&e[0]instanceof Array&&e[0].length===2){let n=e[0];if(typeof n[0]=="number"&&typeof n[1]=="number"){this.x=n[0],this.y=n[1];return}}if(e.length===1&&e[0]instanceof Object&&e[0].name==="point"){let{x:n,y:o}=e[0];this.x=n,this.y=o;return}if(e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"){this.x=e[0],this.y=e[1];return}throw q0.ILLEGAL_PARAMETERS}}get box(){return new Ae.Box(this.x,this.y,this.x,this.y)}clone(){return new Ae.Point(this.x,this.y)}get vertices(){return[this.clone()]}equalTo(e){return Ae.Utils.EQ(this.x,e.x)&&Ae.Utils.EQ(this.y,e.y)}lessThan(e){return!!(Ae.Utils.LT(this.y,e.y)||Ae.Utils.EQ(this.y,e.y)&&Ae.Utils.LT(this.x,e.x))}transform(e){return new Ae.Point(e.transform([this.x,this.y]))}projectionOn(e){if(this.equalTo(e.pt))return this.clone();let n=new Ae.Vector(this,e.pt);if(Ae.Utils.EQ_0(n.cross(e.norm)))return e.pt.clone();let o=n.dot(e.norm),r=e.norm.multiply(o);return this.translate(r)}leftTo(e){let n=new Ae.Vector(e.pt,this);return Ae.Utils.GT(n.dot(e.norm),0)}distanceTo(e){if(e instanceof R1t){let n=e.x-this.x,o=e.y-this.y;return[Math.sqrt(n*n+o*o),new Ae.Segment(this,e)]}if(e instanceof Ae.Line)return Ae.Distance.point2line(this,e);if(e instanceof Ae.Circle)return Ae.Distance.point2circle(this,e);if(e instanceof Ae.Segment)return Ae.Distance.point2segment(this,e);if(e instanceof Ae.Arc)return Ae.Distance.point2arc(this,e);if(e instanceof Ae.Polygon)return Ae.Distance.point2polygon(this,e);if(e instanceof Ae.PlanarSet)return Ae.Distance.shape2planarSet(this,e);if(e instanceof Ae.Multiline)return Ae.Distance.shape2multiline(this,e)}on(e){if(e instanceof Ae.Point)return this.equalTo(e);if(e.contains&&e.contains instanceof Function)return e.contains(this);throw Ae.Errors.UNSUPPORTED_SHAPE_TYPE}get name(){return"point"}svg(e={}){const n=e.r??3;return`
|
|
261
261
|
<circle cx="${this.x}" cy="${this.y}" r="${n}"
|
|
262
262
|
${X7({fill:"red",...e})} />`}};Ae.Point=J3;const a4=(...t)=>new Ae.Point(...t);Ae.point=a4;let Hkt=class extends $b{constructor(...e){if(super(),this.x=0,this.y=0,e.length!==0){if(e.length===1&&e[0]instanceof Array&&e[0].length===2){let n=e[0];if(typeof n[0]=="number"&&typeof n[1]=="number"){this.x=n[0],this.y=n[1];return}}if(e.length===1&&e[0]instanceof Object&&e[0].name==="vector"){let{x:n,y:o}=e[0];this.x=n,this.y=o;return}if(e.length===1&&e[0]instanceof Object&&e[0].name==="segment"){let{start:n,end:o}=e[0];this.x=o.x-n.x,this.y=o.y-n.y;return}if(e.length===2){let n=e[0],o=e[1];if(typeof n=="number"&&typeof o=="number"){this.x=n,this.y=o;return}if(n instanceof Ae.Point&&o instanceof Ae.Point){this.x=o.x-n.x,this.y=o.y-n.y;return}}throw q0.ILLEGAL_PARAMETERS}}clone(){return new Ae.Vector(this.x,this.y)}get slope(){let e=Math.atan2(this.y,this.x);return e<0&&(e=2*Math.PI+e),e}get length(){return Math.sqrt(this.dot(this))}isZeroLength(){return Ae.Utils.EQ_0(this.length)}equalTo(e){return Ae.Utils.EQ(this.x,e.x)&&Ae.Utils.EQ(this.y,e.y)}multiply(e){return new Ae.Vector(e*this.x,e*this.y)}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}normalize(){if(this.isZeroLength())throw q0.ZERO_DIVISION;return new Ae.Vector(this.x/this.length,this.y/this.length)}rotate(e,n=new Ae.Point){if(n.x===0&&n.y===0)return this.transform(new t5().rotate(e));throw q0.OPERATION_IS_NOT_SUPPORTED}transform(e){return new Ae.Vector(e.transform([this.x,this.y]))}rotate90CCW(){return new Ae.Vector(-this.y,this.x)}rotate90CW(){return new Ae.Vector(this.y,-this.x)}invert(){return new Ae.Vector(-this.x,-this.y)}add(e){return new Ae.Vector(this.x+e.x,this.y+e.y)}subtract(e){return new Ae.Vector(this.x-e.x,this.y-e.y)}angleTo(e){let n=this.normalize(),o=e.normalize(),r=Math.atan2(n.cross(o),n.dot(o));return r<0&&(r+=2*Math.PI),r}projectionOn(e){let n=e.normalize(),o=this.dot(n);return n.multiply(o)}get name(){return"vector"}};Ae.Vector=Hkt;const pM=(...t)=>new Ae.Vector(...t);Ae.vector=pM;let Ikt=class k4e extends $b{constructor(...e){if(super(),this.ps=new Ae.Point,this.pe=new Ae.Point,e.length!==0){if(e.length===1&&e[0]instanceof Array&&e[0].length===4){let n=e[0];this.ps=new Ae.Point(n[0],n[1]),this.pe=new Ae.Point(n[2],n[3]);return}if(e.length===1&&e[0]instanceof Object&&e[0].name==="segment"){let{ps:n,pe:o}=e[0];this.ps=new Ae.Point(n.x,n.y),this.pe=new Ae.Point(o.x,o.y);return}if(e.length===1&&e[0]instanceof Ae.Point){this.ps=e[0].clone();return}if(e.length===2&&e[0]instanceof Ae.Point&&e[1]instanceof Ae.Point){this.ps=e[0].clone(),this.pe=e[1].clone();return}if(e.length===4){this.ps=new Ae.Point(e[0],e[1]),this.pe=new Ae.Point(e[2],e[3]);return}throw q0.ILLEGAL_PARAMETERS}}clone(){return new Ae.Segment(this.start,this.end)}get start(){return this.ps}get end(){return this.pe}get vertices(){return[this.ps.clone(),this.pe.clone()]}get length(){return this.start.distanceTo(this.end)[0]}get slope(){return new Ae.Vector(this.start,this.end).slope}get box(){return new Ae.Box(Math.min(this.start.x,this.end.x),Math.min(this.start.y,this.end.y),Math.max(this.start.x,this.end.x),Math.max(this.start.y,this.end.y))}equalTo(e){return this.ps.equalTo(e.ps)&&this.pe.equalTo(e.pe)}contains(e){return Ae.Utils.EQ_0(this.distanceToPoint(e))}intersect(e){if(e instanceof Ae.Point)return this.contains(e)?[e]:[];if(e instanceof Ae.Line)return dA(this,e);if(e instanceof Ae.Ray)return xte(e,this);if(e instanceof Ae.Segment)return KB(this,e);if(e instanceof Ae.Circle)return QB(this,e);if(e instanceof Ae.Box)return qRt(this,e);if(e instanceof Ae.Arc)return cM(this,e);if(e instanceof Ae.Polygon)return pte(this,e);if(e instanceof Ae.Multiline)return lM(this,e)}distanceTo(e){if(e instanceof Ae.Point){let[n,o]=Ae.Distance.point2segment(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ae.Circle){let[n,o]=Ae.Distance.segment2circle(this,e);return[n,o]}if(e instanceof Ae.Line){let[n,o]=Ae.Distance.segment2line(this,e);return[n,o]}if(e instanceof Ae.Segment){let[n,o]=Ae.Distance.segment2segment(this,e);return[n,o]}if(e instanceof Ae.Arc){let[n,o]=Ae.Distance.segment2arc(this,e);return[n,o]}if(e instanceof Ae.Polygon){let[n,o]=Ae.Distance.shape2polygon(this,e);return[n,o]}if(e instanceof Ae.PlanarSet){let[n,o]=Ae.Distance.shape2planarSet(this,e);return[n,o]}if(e instanceof Ae.Multiline)return Ae.Distance.shape2multiline(this,e)}tangentInStart(){return new Ae.Vector(this.start,this.end).normalize()}tangentInEnd(){return new Ae.Vector(this.end,this.start).normalize()}reverse(){return new k4e(this.end,this.start)}split(e){return this.start.equalTo(e)?[null,this.clone()]:this.end.equalTo(e)?[this.clone(),null]:[new Ae.Segment(this.start,e),new Ae.Segment(e,this.end)]}middle(){return new Ae.Point((this.start.x+this.end.x)/2,(this.start.y+this.end.y)/2)}pointAtLength(e){if(e>this.length||e<0)return null;if(e==0)return this.start;if(e==this.length)return this.end;let n=e/this.length;return new Ae.Point((this.end.x-this.start.x)*n+this.start.x,(this.end.y-this.start.y)*n+this.start.y)}distanceToPoint(e){let[n,...o]=Ae.Distance.point2segment(e,this);return n}definiteIntegral(e=0){let n=this.end.x-this.start.x,o=this.start.y-e,r=this.end.y-e;return n*(o+r)/2}transform(e=new Ae.Matrix){return new k4e(this.ps.transform(e),this.pe.transform(e))}isZeroLength(){return this.ps.equalTo(this.pe)}sortPoints(e){return new Ae.Line(this.start,this.end).sortPoints(e)}get name(){return"segment"}svg(e={}){return`
|
|
263
263
|
<line x1="${this.start.x}" y1="${this.start.y}" x2="${this.end.x}" y2="${this.end.y}" ${X7(e)} />`}};Ae.Segment=Ikt;const Ete=(...t)=>new Ae.Segment(...t);Ae.segment=Ete;let{vector:yA}=Ae,Lkt=class k1t extends $b{constructor(...e){if(super(),this.pt=new Ae.Point,this.norm=new Ae.Vector(0,1),e.length!==0){if(e.length===1&&e[0]instanceof Object&&e[0].name==="line"){let{pt:n,norm:o}=e[0];this.pt=new Ae.Point(n),this.norm=new Ae.Vector(o);return}if(e.length===2){let n=e[0],o=e[1];if(n instanceof Ae.Point&&o instanceof Ae.Point){this.pt=n,this.norm=k1t.points2norm(n,o),this.norm.dot(yA(this.pt.x,this.pt.y))>=0&&this.norm.invert();return}if(n instanceof Ae.Point&&o instanceof Ae.Vector){if(Ae.Utils.EQ_0(o.x)&&Ae.Utils.EQ_0(o.y))throw q0.ILLEGAL_PARAMETERS;this.pt=n.clone(),this.norm=o.clone(),this.norm=this.norm.normalize(),this.norm.dot(yA(this.pt.x,this.pt.y))>=0&&this.norm.invert();return}if(n instanceof Ae.Vector&&o instanceof Ae.Point){if(Ae.Utils.EQ_0(n.x)&&Ae.Utils.EQ_0(n.y))throw q0.ILLEGAL_PARAMETERS;this.pt=o.clone(),this.norm=n.clone(),this.norm=this.norm.normalize(),this.norm.dot(yA(this.pt.x,this.pt.y))>=0&&this.norm.invert();return}}throw q0.ILLEGAL_PARAMETERS}}clone(){return new Ae.Line(this.pt,this.norm)}get start(){}get end(){}get length(){return Number.POSITIVE_INFINITY}get box(){return new Ae.Box(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY)}get middle(){}get slope(){return new Ae.Vector(this.norm.y,-this.norm.x).slope}get standard(){let e=this.norm.x,n=this.norm.y,o=this.norm.dot(yA(this.pt.x,this.pt.y));return[e,n,o]}parallelTo(e){return Ae.Utils.EQ_0(this.norm.cross(e.norm))}incidentTo(e){return this.parallelTo(e)&&this.pt.on(e)}contains(e){if(this.pt.equalTo(e))return!0;let n=new Ae.Vector(this.pt,e);return Ae.Utils.EQ_0(this.norm.dot(n))}coord(e){return yA(e.x,e.y).cross(this.norm)}intersect(e){if(e instanceof Ae.Point)return this.contains(e)?[e]:[];if(e instanceof Ae.Line)return sM(this,e);if(e instanceof Ae.Ray)return bCe(e,this);if(e instanceof Ae.Circle)return j7(this,e);if(e instanceof Ae.Box)return aM(this,e);if(e instanceof Ae.Segment)return dA(e,this);if(e instanceof Ae.Arc)return JB(this,e);if(e instanceof Ae.Polygon)return hA(this,e);if(e instanceof Ae.Multiline)return lM(this,e)}distanceTo(e){if(e instanceof Ae.Point){let[n,o]=Ae.Distance.point2line(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ae.Circle){let[n,o]=Ae.Distance.circle2line(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ae.Segment){let[n,o]=Ae.Distance.segment2line(e,this);return[n,o.reverse()]}if(e instanceof Ae.Arc){let[n,o]=Ae.Distance.arc2line(e,this);return[n,o.reverse()]}if(e instanceof Ae.Polygon){let[n,o]=Ae.Distance.shape2polygon(this,e);return[n,o]}}split(e){if(e instanceof Ae.Point)return[new Ae.Ray(e,this.norm),new Ae.Ray(e,this.norm)];{let n=new Ae.Multiline([this]),o=this.sortPoints(e);return n.split(o),n.toShapes()}}rotate(e,n=new Ae.Point){return new Ae.Line(this.pt.rotate(e,n),this.norm.rotate(e))}transform(e){return new Ae.Line(this.pt.transform(e),this.norm.clone())}sortPoints(e){return e.slice().sort((n,o)=>this.coord(n)<this.coord(o)?-1:this.coord(n)>this.coord(o)?1:0)}get name(){return"line"}svg(e,n={}){let o=aM(this,e);if(o.length===0)return"";let r=o[0],i=o.length===2?o[1]:o.find(a=>!a.equalTo(r));return i===void 0&&(i=r),new Ae.Segment(r,i).svg(n)}static points2norm(e,n){if(e.equalTo(n))throw q0.ILLEGAL_PARAMETERS;return new Ae.Vector(e,n).normalize().rotate90CCW()}};Ae.Line=Lkt;const Okt=(...t)=>new Ae.Line(...t);Ae.line=Okt;let Fkt=class extends $b{constructor(...e){if(super(),this.pc=new Ae.Point,this.r=1,e.length===1&&e[0]instanceof Object&&e[0].name==="circle"){let{pc:n,r:o}=e[0];this.pc=new Ae.Point(n),this.r=o}else{let[n,o]=[...e];n&&n instanceof Ae.Point&&(this.pc=n.clone()),o!==void 0&&(this.r=o)}}clone(){return new Ae.Circle(this.pc.clone(),this.r)}get center(){return this.pc}get box(){return new Ae.Box(this.pc.x-this.r,this.pc.y-this.r,this.pc.x+this.r,this.pc.y+this.r)}contains(e){if(e instanceof Ae.Point)return Ae.Utils.LE(e.distanceTo(this.center)[0],this.r);if(e instanceof Ae.Segment)return Ae.Utils.LE(e.start.distanceTo(this.center)[0],this.r)&&Ae.Utils.LE(e.end.distanceTo(this.center)[0],this.r);if(e instanceof Ae.Arc)return this.intersect(e).length===0&&Ae.Utils.LE(e.start.distanceTo(this.center)[0],this.r)&&Ae.Utils.LE(e.end.distanceTo(this.center)[0],this.r);if(e instanceof Ae.Circle)return this.intersect(e).length===0&&Ae.Utils.LE(e.r,this.r)&&Ae.Utils.LE(e.center.distanceTo(this.center)[0],this.r)}toArc(e=!0){return new Ae.Arc(this.center,this.r,Math.PI,-Math.PI,e)}scale(e,n){if(e!==n||!(this.pc.x===0&&this.pc.y===0))throw q0.OPERATION_IS_NOT_SUPPORTED;return new Ae.Circle(this.pc,this.r*e)}transform(e=new Ae.Matrix){return new Ae.Circle(this.pc.transform(e),this.r)}intersect(e){if(e instanceof Ae.Point)return this.contains(e)?[e]:[];if(e instanceof Ae.Line)return j7(e,this);if(e instanceof Ae.Ray)return yCe(e,this);if(e instanceof Ae.Segment)return QB(e,this);if(e instanceof Ae.Circle)return uCe(e,this);if(e instanceof Ae.Box)return JRt(this,e);if(e instanceof Ae.Arc)return mte(e,this);if(e instanceof Ae.Polygon)return pCe(this,e);if(e instanceof Ae.Multiline)return lM(this,e)}distanceTo(e){if(e instanceof Ae.Point){let[n,o]=Ae.Distance.point2circle(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ae.Circle){let[n,o]=Ae.Distance.circle2circle(this,e);return[n,o]}if(e instanceof Ae.Line){let[n,o]=Ae.Distance.circle2line(this,e);return[n,o]}if(e instanceof Ae.Segment){let[n,o]=Ae.Distance.segment2circle(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ae.Arc){let[n,o]=Ae.Distance.arc2circle(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ae.Polygon){let[n,o]=Ae.Distance.shape2polygon(this,e);return[n,o]}if(e instanceof Ae.PlanarSet){let[n,o]=Ae.Distance.shape2planarSet(this,e);return[n,o]}if(e instanceof Ae.Multiline){let[n,o]=Ae.Distance.shape2multiline(this,e);return[n,o]}}get name(){return"circle"}svg(e={}){return`
|
|
@@ -661,7 +661,7 @@ Net Force: (${x.fx.toFixed(3)}, ${x.fy.toFixed(3)})`)}}if(l)d=`Via (${o.connecti
|
|
|
661
661
|
`)})}const o=n[0];if(!t.solved&&o&&t.currentConnection){const r=$ne(t.currentConnection.connectionId),i=[];let s=o;for(;s;){const a=s.port;i.unshift({x:a.d.x,y:a.d.y}),s=s.parent}i.length>1&&e.lines.push({points:i,strokeColor:r})}return e},vOt=.034685181009478865,SOt=0,COt=4.072520483177124,MOt=0,TOt=35.38577539020022,wOt=.5518001238069296,EOt=class extends Lne{getSolverName(){return"JumperGraphSolver"}UNIT_OF_COST="hops";portUsagePenalty=vOt;portUsagePenaltySq=SOt;crossingPenalty=COt;crossingPenaltySq=MOt;ripCost=TOt;baseMaxIterations=4e3;additionalMaxIterationsPerConnection=2e3;additionalMaxIterationsPerCrossing=2e3;constructor(e){super({greedyMultiplier:wOt,rippingEnabled:!0,...e}),this.ripCost=e.ripCost??this.ripCost,this.portUsagePenalty=e.portUsagePenalty??this.portUsagePenalty,this.crossingPenalty=e.crossingPenalty??this.crossingPenalty,this.baseMaxIterations=e.baseMaxIterations??this.baseMaxIterations,this.additionalMaxIterationsPerConnection=e.additionalMaxIterationsPerConnection??this.additionalMaxIterationsPerConnection;const n=(function(o,r){if(r.length<2)return 0;let i=1/0,s=-1/0,a=1/0,c=-1/0;for(const m of o.regions){const h=m;h.d?.bounds?(i=Math.min(i,h.d.bounds.minX),s=Math.max(s,h.d.bounds.maxX),a=Math.min(a,h.d.bounds.minY),c=Math.max(c,h.d.bounds.maxY)):h.d?.center&&(i=Math.min(i,h.d.center.x),s=Math.max(s,h.d.center.x),a=Math.min(a,h.d.center.y),c=Math.max(c,h.d.center.y))}const l=new Map;for(const m of o.regions){const h=m;h.d?.center&&l.set(m.regionId,h.d.center)}const u=[],_=2*(s-i)+2*(c-a);for(const m of r){let h,p;if("startRegion"in m&&m.startRegion){const g=m.startRegion,y=m.endRegion;h=g.d?.center,p=y.d?.center}else"startRegionId"in m&&(h=l.get(m.startRegionId),p=l.get(m.endRegionId));if(!h||!p)continue;const x=One(h,i,s,a,c),f=One(p,i,s,a,c);u.push([x,f])}let d=0;for(let m=0;m<u.length;m++)for(let h=m+1;h<u.length;h++)Bne(u[m],u[h],_)&&d++;return d})(this.graph,e.inputConnections);this.MAX_ITERATIONS=this.baseMaxIterations+e.inputConnections.length*this.additionalMaxIterationsPerConnection+n*this.additionalMaxIterationsPerCrossing,this.populateDistanceToEndMaps()}populateDistanceToEndMaps(){const e=new Set(this.connections.map(n=>n.endRegion));for(const n of e){const o=new Map,r=[];for(o.set(n.regionId,0),r.push({region:n,distance:0});r.length>0;){const{region:i,distance:s}=r.shift();for(const a of i.ports){const c=a.region1===i?a.region2:a.region1;o.has(c.regionId)||(o.set(c.regionId,s+1),r.push({region:c,distance:s+1}))}}for(const i of this.graph.ports){i.distanceToEndMap||(i.distanceToEndMap={});const s=o.get(i.region1.regionId)??1/0,a=o.get(i.region2.regionId)??1/0;i.distanceToEndMap[n.regionId]=Math.min(s,a)}}}estimateCostToEnd(e){const n=this.currentEndRegion.regionId;return e.distanceToEndMap[n]}getPortUsagePenalty(e){const n=e.ripCount??0;return n*this.portUsagePenalty+n*this.portUsagePenaltySq}isTransitionAllowed(e,n,o){if(!e.d.isPad)return!0;const r=i=>!!(i.region1===e?i.region2:i.region1).d.isThroughJumper;return r(n)||r(o)}computeIncreasedRegionCostIfPortsAreUsed(e,n,o){if(e.d.isPad){const i=(e.assignments??[]).filter(s=>s.connection.mutuallyConnectedNetworkId!==this.currentConnection.mutuallyConnectedNetworkId).length;return i>0?i*this.crossingPenalty+i*this.crossingPenaltySq:0}const r=(function(i,s,a){const c=ewe(i),l=[Qb(s,i),Qb(a,i)];let u=0;const _=i.assignments??[];for(const d of _)Bne(l,[Qb(d.regionPort1,i),Qb(d.regionPort2,i)],c)&&u++;return u})(e,n,o);return r*this.crossingPenalty+r*this.crossingPenaltySq}getRipsRequiredForPortUsage(e,n,o){if(e.d.isPad)return(e.assignments??[]).filter(s=>s.connection.mutuallyConnectedNetworkId!==this.currentConnection.mutuallyConnectedNetworkId);const r=(function(s,a,c){const l=ewe(s),u=[Qb(a,s),Qb(c,s)],_=[],d=s.assignments??[];for(const m of d)Bne(u,[Qb(m.regionPort1,s),Qb(m.regionPort2,s)],l)&&_.push(m);return _})(e,n,o),i=r.filter(s=>s.connection.mutuallyConnectedNetworkId!==this.currentConnection.mutuallyConnectedNetworkId);if(!e.d.isThroughJumper)return i;for(const s of e.assignments??[])s.connection.mutuallyConnectedNetworkId!==this.currentConnection.mutuallyConnectedNetworkId&&i.push(s);return i}isRipRequiredForPortUsage(e,n,o){if(!e.d.isThroughJumper&&!e.d.isPad)return!1;for(const r of e.assignments??[])if(r.connection.mutuallyConnectedNetworkId!==this.currentConnection.mutuallyConnectedNetworkId)return!0;return!1}routeSolvedHook(e){}routeStartedHook(e){}visualize(){return POt(this)}},DOt={padWidth:.8,outerPadHeight:.5,innerPadHeight:.4,leftPadCenterX:-.9,rightPadCenterX:.9,row1CenterY:-1.2,row2CenterY:-.4,row3CenterY:.4,row4CenterY:1.2},AOt=({cols:t,rows:e,marginX:n,marginY:o,innerColChannelPointCount:r=1,innerRowChannelPointCount:i=1,regionsBetweenPads:s=!1,outerPaddingX:a=.5,outerPaddingY:c=.5,outerChannelXPointCount:l,outerChannelYPointCount:u,orientation:_="vertical",center:d,bounds:m,parallelTracesUnderJumperCount:h=2})=>{const p=[],x=[],{padWidth:f,outerPadHeight:g,innerPadHeight:y,leftPadCenterX:b,rightPadCenterX:v,row1CenterY:S,row2CenterY:M,row3CenterY:w,row4CenterY:D}=DOt,A=f/2,I=g/2,H=y/2,O=v-b+f,z=O+n,V=D-S+g,j=V+o;let q=a,K=c;if(m){const De=t*O+(t-1)*n,pe=e*V+(e-1)*o;q=((_==="horizontal"?m.maxY-m.minY:m.maxX-m.minX)-De)/2,K=((_==="horizontal"?m.maxX-m.minX:m.maxY-m.minY)-pe)/2}const ne=l,ce=u,ee=[],oe=[],ie=(De,pe,Me,xe)=>({regionId:De,ports:[],d:{bounds:pe,center:Vne(pe),isPad:Me,isThroughJumper:xe}}),ae=(De,pe,Me)=>{const xe=pe.d.bounds,We=Me.d.bounds;let Xe,Je;Math.abs(xe.maxX-We.minX)<.001?(Xe=xe.maxX,Je=(Math.max(xe.minY,We.minY)+Math.min(xe.maxY,We.maxY))/2):Math.abs(xe.minX-We.maxX)<.001?(Xe=xe.minX,Je=(Math.max(xe.minY,We.minY)+Math.min(xe.maxY,We.maxY))/2):Math.abs(xe.maxY-We.minY)<.001?(Xe=(Math.max(xe.minX,We.minX)+Math.min(xe.maxX,We.maxX))/2,Je=xe.maxY):(Xe=(Math.max(xe.minX,We.minX)+Math.min(xe.maxX,We.maxX))/2,Je=xe.minY);const fe={portId:De,region1:pe,region2:Me,d:{x:Xe,y:Je}};return pe.ports.push(fe),Me.ports.push(fe),fe},de=(De,pe,Me,xe)=>{if(xe<=0)return[];if(xe===1)return[ae(De,pe,Me)];const We=pe.d.bounds,Xe=Me.d.bounds,Je=[];let fe,Ye,Oe,Ne;Math.abs(We.maxX-Xe.minX)<.001?(fe=!0,Ye=We.maxX,Oe=Math.max(We.minY,Xe.minY),Ne=Math.min(We.maxY,Xe.maxY)):Math.abs(We.minX-Xe.maxX)<.001?(fe=!0,Ye=We.minX,Oe=Math.max(We.minY,Xe.minY),Ne=Math.min(We.maxY,Xe.maxY)):Math.abs(We.maxY-Xe.minY)<.001?(fe=!1,Ye=We.maxY,Oe=Math.max(We.minX,Xe.minX),Ne=Math.min(We.maxX,Xe.maxX)):(fe=!1,Ye=We.minY,Oe=Math.max(We.minX,Xe.minX),Ne=Math.min(We.maxX,Xe.maxX));for(let Ve=0;Ve<xe;Ve++){const Re=Oe+(Ve+.5)/xe*(Ne-Oe),Pe={portId:`${De}:${Ve}`,region1:pe,region2:Me,d:{x:fe?Ye:Re,y:fe?Re:Ye}};pe.ports.push(Pe),Me.ports.push(Pe),Je.push(Pe)}return Je};for(let De=0;De<e;De++){ee[De]=[];for(let pe=0;pe<t;pe++){const Me=`cell_${De}_${pe}`,xe=pe*z,We=-De*j,Xe=xe+b,Je=We+S,fe=xe+b,Ye=We+M,Oe=xe+b,Ne=We+w,Ve=xe+b,Re=We+D,Pe=xe+v,Ee=We+D,we=xe+v,ze=We+w,Ue=xe+v,et=We+M,ot=xe+v,at=We+S,lt=(gr,ti,Ur)=>({minX:gr-A,maxX:gr+A,minY:ti-Ur,maxY:ti+Ur}),xt=lt(Xe,Je,I),Ct=lt(fe,Ye,H),Lt=lt(Oe,Ne,H),$t=lt(Ve,Re,I),Ot=lt(Pe,Ee,I),Dt=lt(we,ze,H),Wt=lt(Ue,et,H),Cn=lt(ot,at,I),ge={minX:xt.maxX,maxX:Cn.minX,minY:xt.minY,maxY:$t.maxY},tt=.3,ct={minX:Xe,maxX:ot,minY:Je-tt/2,maxY:Je+tt/2},gt={minX:fe,maxX:Ue,minY:Ye-tt/2,maxY:Ye+tt/2},kt={minX:Oe,maxX:we,minY:Ne-tt/2,maxY:Ne+tt/2},Bt={minX:Ve,maxX:Pe,minY:Re-tt/2,maxY:Re+tt/2},nn=xt.minX,$n=Cn.maxX,Sn=xt.minY,en=$t.maxY,Tn=ie(`${Me}:pad1`,xt,!0),An=ie(`${Me}:pad2`,Ct,!0),zn=ie(`${Me}:pad3`,Lt,!0),wn=ie(`${Me}:pad4`,$t,!0),En=ie(`${Me}:pad5`,Ot,!0),ht=ie(`${Me}:pad6`,Dt,!0),zt=ie(`${Me}:pad7`,Wt,!0),pn=ie(`${Me}:pad8`,Cn,!0),bn=ie(`${Me}:underjumper`,ge,!1),So=ie(`${Me}:throughjumper1`,ct,!1,!0),no=ie(`${Me}:throughjumper2`,gt,!1,!0),Zt=ie(`${Me}:throughjumper3`,kt,!1,!0),Ir=ie(`${Me}:throughjumper4`,Bt,!1,!0);p.push(Tn,An,zn,wn,En,ht,zt,pn,bn,So,no,Zt,Ir);const qo=(Xe+ot)/2,ut=(Je+Re)/2;oe.push({center:{x:qo,y:ut},orientation:"vertical",padRegions:[Tn,An,zn,wn,En,ht,zt,pn]});let Nt=null,Jt=null,qt=null,Vt=null,Vn=null,In=null;s&&(Nt=ie(`${Me}:L-BP12`,{minX:xt.minX,maxX:xt.maxX,minY:xt.maxY,maxY:Ct.minY},!1),Jt=ie(`${Me}:L-BP23`,{minX:Ct.minX,maxX:Ct.maxX,minY:Ct.maxY,maxY:Lt.minY},!1),qt=ie(`${Me}:L-BP34`,{minX:Lt.minX,maxX:Lt.maxX,minY:Lt.maxY,maxY:$t.minY},!1),Vt=ie(`${Me}:R-BP87`,{minX:Cn.minX,maxX:Cn.maxX,minY:Cn.maxY,maxY:Wt.minY},!1),Vn=ie(`${Me}:R-BP76`,{minX:Wt.minX,maxX:Wt.maxX,minY:Wt.maxY,maxY:Dt.minY},!1),In=ie(`${Me}:R-BP65`,{minX:Dt.minX,maxX:Dt.maxX,minY:Dt.maxY,maxY:Ot.minY},!1),p.push(Nt,Jt,qt,Vt,Vn,In));const Qn=pe===0,ao=De===e-1,Bn=pe===t-1;let Go;Bn?Go=$n+q:Go=(pe+1)*z+b-A;let xo=null;De===0&&(xo=ie(`${Me}:T`,{minX:Qn?nn-q:nn,maxX:Go,minY:en,maxY:en+K},!1),p.push(xo));let Eo=null;Eo=ie(`${Me}:B`,{minX:Qn?nn-q:nn,maxX:Go,minY:Sn-(ao?K:o),maxY:Sn},!1),p.push(Eo);let Jo=null;Qn&&(Jo=ie(`${Me}:L`,{minX:nn-q,maxX:nn,minY:Sn,maxY:en},!1),p.push(Jo));const vr=ie(`${Me}:R`,{minX:$n,maxX:Go,minY:Sn,maxY:en},!1);if(p.push(vr),ee[De][pe]={pad1:Tn,pad2:An,pad3:zn,pad4:wn,pad5:En,pad6:ht,pad7:zt,pad8:pn,underjumper:bn,throughjumper1:So,throughjumper2:no,throughjumper3:Zt,throughjumper4:Ir,top:xo,bottom:Eo,left:Jo,right:vr,leftBP12:Nt,leftBP23:Jt,leftBP34:qt,rightBP87:Vt,rightBP76:Vn,rightBP65:In},xo)if(Jo&&x.push(...de(`${Me}:T-L`,xo,Jo,ne)),x.push(...de(`${Me}:T-R`,xo,vr,Bn?ne:r)),x.push(ae(`${Me}:T-P4`,xo,wn)),x.push(ae(`${Me}:T-P5`,xo,En)),s){const gr=bn.d.bounds,ti=(gr.maxX-gr.minX)/(h+1);for(let Ur=1;Ur<=h;Ur++){const Ls={portId:`${Me}:T-UJ${Ur}`,region1:xo,region2:bn,d:{x:gr.minX+ti*Ur,y:gr.maxY}};xo.ports.push(Ls),bn.ports.push(Ls),x.push(Ls)}}else x.push(ae(`${Me}:T-UJ`,xo,bn));if(Eo)if(Jo&&x.push(...de(`${Me}:B-L`,Eo,Jo,ne)),x.push(...de(`${Me}:B-R`,Eo,vr,Bn?ne:r)),x.push(ae(`${Me}:B-P1`,Eo,Tn)),x.push(ae(`${Me}:B-P8`,Eo,pn)),s){const gr=bn.d.bounds,ti=(gr.maxX-gr.minX)/(h+1);for(let Ur=1;Ur<=h;Ur++){const Ls={portId:`${Me}:B-UJ${Ur}`,region1:Eo,region2:bn,d:{x:gr.minX+ti*Ur,y:gr.minY}};Eo.ports.push(Ls),bn.ports.push(Ls),x.push(Ls)}}else x.push(ae(`${Me}:B-UJ`,Eo,bn));Jo&&(x.push(ae(`${Me}:L-P1`,Jo,Tn)),x.push(ae(`${Me}:L-P2`,Jo,An)),x.push(ae(`${Me}:L-P3`,Jo,zn)),x.push(ae(`${Me}:L-P4`,Jo,wn))),x.push(ae(`${Me}:R-P5`,vr,En)),x.push(ae(`${Me}:R-P6`,vr,ht)),x.push(ae(`${Me}:R-P7`,vr,zt)),x.push(ae(`${Me}:R-P8`,vr,pn)),s&&(Jo&&(x.push(ae(`${Me}:L-BP12`,Jo,Nt)),x.push(ae(`${Me}:L-BP23`,Jo,Jt)),x.push(ae(`${Me}:L-BP34`,Jo,qt))),x.push(ae(`${Me}:UJ-LBP12`,Nt,bn)),x.push(ae(`${Me}:UJ-LBP23`,Jt,bn)),x.push(ae(`${Me}:UJ-LBP34`,qt,bn)),x.push(ae(`${Me}:R-BP87`,vr,Vt)),x.push(ae(`${Me}:R-BP76`,vr,Vn)),x.push(ae(`${Me}:R-BP65`,vr,In)),x.push(ae(`${Me}:UJ-RBP87`,Vt,bn)),x.push(ae(`${Me}:UJ-RBP76`,Vn,bn)),x.push(ae(`${Me}:UJ-RBP65`,In,bn)));const xi={portId:`${Me}:TJ1-P1`,region1:So,region2:Tn,d:{x:Xe,y:Je}};So.ports.push(xi),Tn.ports.push(xi),x.push(xi);const Vo={portId:`${Me}:TJ1-P8`,region1:So,region2:pn,d:{x:ot,y:at}};So.ports.push(Vo),pn.ports.push(Vo),x.push(Vo);const yo={portId:`${Me}:TJ2-P2`,region1:no,region2:An,d:{x:fe,y:Ye}};no.ports.push(yo),An.ports.push(yo),x.push(yo);const Wr={portId:`${Me}:TJ2-P7`,region1:no,region2:zt,d:{x:Ue,y:et}};no.ports.push(Wr),zt.ports.push(Wr),x.push(Wr);const bo={portId:`${Me}:TJ3-P3`,region1:Zt,region2:zn,d:{x:Oe,y:Ne}};Zt.ports.push(bo),zn.ports.push(bo),x.push(bo);const la={portId:`${Me}:TJ3-P6`,region1:Zt,region2:ht,d:{x:we,y:ze}};Zt.ports.push(la),ht.ports.push(la),x.push(la);const Xa={portId:`${Me}:TJ4-P4`,region1:Ir,region2:wn,d:{x:Ve,y:Re}};Ir.ports.push(Xa),wn.ports.push(Xa),x.push(Xa);const ts={portId:`${Me}:TJ4-P5`,region1:Ir,region2:En,d:{x:Pe,y:Ee}};if(Ir.ports.push(ts),En.ports.push(ts),x.push(ts),pe>0){const gr=ee[De][pe-1];x.push(ae(`cell_${De}_${pe-1}->cell_${De}_${pe}:R-P1`,gr.right,Tn)),x.push(ae(`cell_${De}_${pe-1}->cell_${De}_${pe}:R-P2`,gr.right,An)),x.push(ae(`cell_${De}_${pe-1}->cell_${De}_${pe}:R-P3`,gr.right,zn)),x.push(ae(`cell_${De}_${pe-1}->cell_${De}_${pe}:R-P4`,gr.right,wn)),s&&(x.push(ae(`cell_${De}_${pe-1}->cell_${De}_${pe}:R-LBP12`,gr.right,Nt)),x.push(ae(`cell_${De}_${pe-1}->cell_${De}_${pe}:R-LBP23`,gr.right,Jt)),x.push(ae(`cell_${De}_${pe-1}->cell_${De}_${pe}:R-LBP34`,gr.right,qt))),xo&&gr.top&&x.push(...de(`cell_${De}_${pe-1}->cell_${De}_${pe}:T-T`,gr.top,xo,ce)),Eo&&gr.bottom&&x.push(...de(`cell_${De}_${pe-1}->cell_${De}_${pe}:B-B`,gr.bottom,Eo,ao?ce:i))}if(De>0){const gr=ee[De-1][pe];if(Jo&&x.push(...de(`cell_${De-1}_${pe}->cell_${De}_${pe}:B-L`,gr.bottom,Jo,ne)),x.push(ae(`cell_${De-1}_${pe}->cell_${De}_${pe}:B-P4`,gr.bottom,wn)),s){const ti=bn.d.bounds,Ur=(ti.maxX-ti.minX)/(h+1);for(let Ls=1;Ls<=h;Ls++){const bs=ti.minX+Ur*Ls,Ru={portId:`cell_${De-1}_${pe}->cell_${De}_${pe}:B-UJ${Ls}`,region1:gr.bottom,region2:bn,d:{x:bs,y:ti.maxY}};gr.bottom.ports.push(Ru),bn.ports.push(Ru),x.push(Ru)}}else x.push(ae(`cell_${De-1}_${pe}->cell_${De}_${pe}:B-UJ`,gr.bottom,bn));x.push(ae(`cell_${De-1}_${pe}->cell_${De}_${pe}:B-P5`,gr.bottom,En)),x.push(...de(`cell_${De-1}_${pe}->cell_${De}_${pe}:B-R`,gr.bottom,vr,Bn?ne:r))}}}let be={regions:p,ports:x,jumperLocations:oe};const Ce=_==="horizontal";if(Ce||d!==void 0||m!==void 0){const De=nwe(be.regions),pe=Vne(De),Me=[];let xe;xe=d||(m?Vne(m):pe),Me.push(jz(xe.x,xe.y)),Ce&&Me.push((function(Xe,Je,fe){const Ye=yOt(Xe),Oe=bOt(Xe),Ne={a:Ye,c:-Oe,e:0,b:Oe,d:Ye,f:0};return awe(Je)||awe(fe)?Ne:zne([jz(Je,fe),Ne,jz(-Je,-fe)])})(-Math.PI/2)),Me.push(jz(-pe.x,-pe.y));const We=(function(...Xe){return zne(...Xe)})(...Me);be=cwe(be,We)}return be},lwe=!0,NA={CCW:-1,CW:1,NOT_ORIENTABLE:0},ROt=2*Math.PI,Gz=Object.freeze({__proto__:null,BOUNDARY:2,CCW:lwe,CONTAINS:3,CW:!1,END_VERTEX:2,INSIDE:1,INTERLACE:4,NOT_VERTEX:0,ORIENTATION:NA,OUTSIDE:0,OVERLAP_OPPOSITE:2,OVERLAP_SAME:1,PIx2:ROt,START_VERTEX:1}),S6=1e-6;function uwe(t){S6=t}function _we(){return S6}function Wne(t){return t<S6&&t>-S6}function rS(t,e){return t-e<S6&&t-e>-S6}function dwe(t,e){return t-e>S6}function hwe(t,e){return t-e<-S6}var Ie={Utils:Object.freeze({__proto__:null,DECIMALS:3,EQ:rS,EQ_0:Wne,GE:function(t,e){return t-e>-S6},GT:dwe,LE:function(t,e){return t-e<S6},LT:hwe,getTolerance:_we,setTolerance:uwe}),Errors:void 0,Matrix:void 0,Planar_set:void 0,Point:void 0,Vector:void 0,Line:void 0,Circle:void 0,Segment:void 0,Arc:void 0,Box:void 0,Edge:void 0,Face:void 0,Ray:void 0,Ray_shooting:void 0,Multiline:void 0,Polygon:void 0,Distance:void 0,Inversion:void 0};for(let t in Gz)Ie[t]=Gz[t];Object.defineProperty(Ie,"DP_TOL",{get:function(){return _we()},set:function(t){uwe(t)}});var K0=class{static get ILLEGAL_PARAMETERS(){return new ReferenceError("Illegal Parameters")}static get ZERO_DIVISION(){return new Error("Zero division")}static get UNRESOLVED_BOUNDARY_CONFLICT(){return new Error("Unresolved boundary conflict in boolean operation")}static get INFINITE_LOOP(){return new Error("Infinite loop")}static get CANNOT_COMPLETE_BOOLEAN_OPERATION(){return new Error("Cannot complete boolean operation")}static get CANNOT_INVOKE_ABSTRACT_METHOD(){return new Error("Abstract method cannot be invoked")}static get OPERATION_IS_NOT_SUPPORTED(){return new Error("Operation is not supported")}static get UNSUPPORTED_SHAPE_TYPE(){return new Error("Unsupported shape type")}};Ie.Errors=K0;var Une=class{constructor(e,n){this.first=e,this.last=n||this.first}[Symbol.iterator](){let e;return{next:()=>(e=e?e.next:this.first,{value:e,done:e===void 0})}}get size(){let e=0;for(let n of this)e++;return e}toArray(e=void 0,n=void 0){let o=[],r=e||this.first,i=n||this.last,s=r;if(s===void 0)return o;do o.push(s),s=s.next;while(s!==i.next);return o}append(e){return this.isEmpty()?this.first=e:(e.prev=this.last,this.last.next=e),this.last=e,this.last.next=void 0,this.first.prev=void 0,this}insert(e,n){if(this.isEmpty())this.first=e,this.last=e;else if(n==null)e.next=this.first,this.first.prev=e,this.first=e;else{let o=n.next;n.next=e,o&&(o.prev=e),e.prev=n,e.next=o,this.last===n&&(this.last=e)}return this.last.next=void 0,this.first.prev=void 0,this}remove(e){return e===this.first&&e===this.last?(this.first=void 0,this.last=void 0):(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e===this.first&&(this.first=e.next),e===this.last&&(this.last=e.prev)),this}isEmpty(){return this.first===void 0}static testInfiniteLoop(e){let n=e,o=e;do{if(n!=e&&n===o)throw K0.INFINITE_LOOP;n=n.next,o=o.next.next}while(n!=e)}},mwe={stroke:"black"},kOt=class{constructor(e=mwe){for(const n in e)this[n]=e[n];this.stroke=e.stroke??mwe.stroke}toAttributesString(){return Object.keys(this).reduce((e,n)=>e+(this[n]!==void 0?this.toAttrString(n,this[n]):""),"")}toAttrString(e,n){const o=e==="className"?"class":this.convertCamelToKebabCase(e);return n===null?`${o} `:`${o}="${n.toString()}" `}convertCamelToKebabCase(e){return e.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g).join("-").toLowerCase()}};function iS(t){return new kOt(t).toAttributesString()}function IM(t,e){let n=[],[o,r,i]=t.standard,[s,a,c]=e.standard,l=o*a-r*s,u=i*a-r*c,_=o*c-i*s;if(!Ie.Utils.EQ_0(l)){let d,m;r===0?(d=i/o,m=_/l):a===0?(d=c/s,m=_/l):o===0?(d=u/l,m=i/r):s===0?(d=u/l,m=c/a):(d=u/l,m=_/l),n.push(new Ie.Point(d,m))}return n}function sS(t,e){let n=[],o=e.pc.projectionOn(t),r=e.pc.distanceTo(o)[0];if(Ie.Utils.EQ(r,e.r))n.push(o);else if(Ie.Utils.LT(r,e.r)){let i,s,a=Math.sqrt(e.r*e.r-r*r);i=t.norm.rotate90CCW().multiply(a),s=o.translate(i),n.push(s),i=t.norm.rotate90CW().multiply(a),s=o.translate(i),n.push(s)}return n}function LM(t,e){let n=[];for(let o of e.toSegments()){let r=HA(o,t);for(let i of r)Cwe(i,n)||n.push(i)}return n}function Yz(t,e){let n=[];if(LM(t,e.box).length===0)return n;let o=sS(t,new Ie.Circle(e.pc,e.r));for(let r of o)r.on(e)&&n.push(r);return n}function HA(t,e){let n=[];return t.ps.on(e)&&n.push(t.ps),t.pe.on(e)&&!t.isZeroLength()&&n.push(t.pe),n.length>0||t.isZeroLength()||t.ps.leftTo(e)&&t.pe.leftTo(e)||!t.ps.leftTo(e)&&!t.pe.leftTo(e)?n:IM(new Ie.Line(t.ps,t.pe),e)}function qz(t,e){let n=[];if(t.isZeroLength())return t.ps.on(e)&&n.push(t.ps),n;if(e.isZeroLength())return e.ps.on(t)&&n.push(e.ps),n;let o=new Ie.Line(t.ps,t.pe),r=new Ie.Line(e.ps,e.pe);if(o.incidentTo(r))t.ps.on(e)&&n.push(t.ps),t.pe.on(e)&&n.push(t.pe),!e.ps.on(t)||e.ps.equalTo(t.ps)||e.ps.equalTo(t.pe)||n.push(e.ps),!e.pe.on(t)||e.pe.equalTo(t.ps)||e.pe.equalTo(t.pe)||n.push(e.pe);else{let i=IM(o,r);i.length>0&&pwe(i[0],t)&&pwe(i[0],e)&&n.push(i[0])}return n}function pwe(t,e){const n=e.box;return Ie.Utils.LE(t.x,n.xmax)&&Ie.Utils.GE(t.x,n.xmin)&&Ie.Utils.LE(t.y,n.ymax)&&Ie.Utils.GE(t.y,n.ymin)}function Jz(t,e){let n=[];if(t.isZeroLength()){let[r,i]=t.ps.distanceTo(e.pc);return Ie.Utils.EQ(r,e.r)&&n.push(t.ps),n}let o=sS(new Ie.Line(t.ps,t.pe),e);for(let r of o)r.on(t)&&n.push(r);return n}function OM(t,e){let n=[];if(t.isZeroLength())return t.ps.on(e)&&n.push(t.ps),n;let o=sS(new Ie.Line(t.ps,t.pe),new Ie.Circle(e.pc,e.r));for(let r of o)r.on(t)&&r.on(e)&&n.push(r);return n}function fwe(t,e){let n=[],o=new Ie.Vector(t.pc,e.pc),r=t.r,i=e.r;if(Ie.Utils.EQ_0(r)||Ie.Utils.EQ_0(i))return n;if(Ie.Utils.EQ_0(o.x)&&Ie.Utils.EQ_0(o.y)&&Ie.Utils.EQ(r,i))return n.push(t.pc.translate(-r,0)),n;let s,a=t.pc.distanceTo(e.pc)[0];if(Ie.Utils.GT(a,r+i)||Ie.Utils.LT(a,Math.abs(r-i)))return n;if(o.x/=a,o.y/=a,Ie.Utils.EQ(a,r+i)||Ie.Utils.EQ(a,Math.abs(r-i)))return s=t.pc.translate(r*o.x,r*o.y),n.push(s),n;let c=r*r/(2*a)-i*i/(2*a)+a/2,l=t.pc.translate(c*o.x,c*o.y),u=Math.sqrt(r*r-c*c);return s=l.translate(o.rotate90CCW().multiply(u)),n.push(s),s=l.translate(o.rotate90CW().multiply(u)),n.push(s),n}function xwe(t,e){let n=[];if(t.pc.equalTo(e.pc)&&Ie.Utils.EQ(t.r,e.r)){let s;return s=t.start,s.on(e)&&n.push(s),s=t.end,s.on(e)&&n.push(s),s=e.start,s.on(t)&&n.push(s),s=e.end,s.on(t)&&n.push(s),n}let o=new Ie.Circle(t.pc,t.r),r=new Ie.Circle(e.pc,e.r),i=o.intersect(r);for(let s of i)s.on(t)&&s.on(e)&&n.push(s);return n}function Xne(t,e){let n=[];if(e.pc.equalTo(t.pc)&&Ie.Utils.EQ(e.r,t.r))return n.push(t.start),n.push(t.end),n;let o=fwe(e,new Ie.Circle(t.pc,t.r));for(let r of o)r.on(t)&&n.push(r);return n}function gwe(t,e){return t.isSegment?qz(t.shape,e):OM(e,t.shape)}function ywe(t,e){return t.isSegment?OM(t.shape,e):xwe(t.shape,e)}function bwe(t,e){return t.isSegment?HA(t.shape,e):Yz(e,t.shape)}function NOt(t,e){return t.isSegment?Jz(t.shape,e):Xne(t.shape,e)}function jne(t,e){let n=[];for(let o of e.edges)for(let r of gwe(o,t))n.push(r);return n}function Gne(t,e){let n=[];for(let o of e.edges)for(let r of ywe(o,t))n.push(r);return n}function IA(t,e){let n=[];if(e.isEmpty())return n;for(let o of e.edges)for(let r of bwe(o,t))Cwe(r,n)||n.push(r);return t.sortPoints(n)}function Pwe(t,e){let n=[];if(e.isEmpty())return n;for(let o of e.edges)for(let r of NOt(o,t))n.push(r);return n}function vwe(t,e){return t.isSegment?gwe(e,t.shape):t.isArc?ywe(e,t.shape):t.isLine?bwe(e,t.shape):t.isRay?(n=e,o=t.shape,n.isSegment?Yne(o,n.shape):qne(o,n.shape)):[];var n,o}function Swe(t,e){let n=[];if(e.isEmpty()||t.shape.box.not_intersect(e.box))return n;let o=e.edges.search(t.shape.box);for(let r of o)n=[...n,...vwe(t,r)];return n}function Cwe(t,e){return e.some(n=>n.equalTo(t))}function tP(t){return new Ie.Line(t.start,t.norm)}function Yne(t,e){return HA(e,tP(t)).filter(n=>t.contains(n))}function qne(t,e){return Yz(tP(t),e).filter(n=>t.contains(n))}function Mwe(t,e){return sS(tP(t),e).filter(n=>t.contains(n))}function Twe(t,e){return IM(tP(t),e).filter(n=>t.contains(n))}function wwe(t,e){return IA(tP(t),e).filter(n=>t.contains(n))}function Ewe(t,e){if(t.intersect&&t.intersect instanceof Function)return t.intersect(e);throw K0.UNSUPPORTED_SHAPE_TYPE}function FM(t,e){let n=[];for(let o of e)n=[...n,...Ewe(t,o.shape)];return n}var aS=class uL extends Une{constructor(...e){if(super(),this.isInfinite=!1,e.length===1&&e[0]instanceof Array&&e[0].length>0){const n=e[0],o=n.length,r=s=>s instanceof Ie.Segment||s instanceof Ie.Arc||s instanceof Ie.Ray,i=s=>s instanceof Ie.Segment||s instanceof Ie.Arc;if(!(o===1&&(s=>s instanceof Ie.Segment||s instanceof Ie.Arc||s instanceof Ie.Ray||s instanceof Ie.Line)(n[0])||o>1&&r(n[0])&&r(n[o-1])&&n.slice(1,o-1).every(i)))throw Ie.Errors.ILLEGAL_PARAMETERS;this.isInfinite=n.some(s=>s instanceof Ie.Ray||s instanceof Ie.Line);for(let s of n){let a=new Ie.Edge(s);this.append(a)}this.setArcLength()}}get edges(){return[...this]}get box(){return this.edges.reduce((e,n)=>e.merge(n.box),new Ie.Box)}get vertices(){let e=this.edges.map(n=>n.start);return e.push(this.last.end),e}get length(){if(this.isEmpty())return 0;if(this.isInfinite)return Number.POSITIVE_INFINITY;let e=0;for(let n of this)e+=n.length;return e}clone(){return new uL(this.toShapes())}setArcLength(){for(let e of this)this.setOneEdgeArcLength(e)}setOneEdgeArcLength(e){e===this.first?e.arc_length=0:e.arc_length=e.prev.arc_length+e.prev.length}pointAtLength(e){if(e>this.length||e<0||this.isInfinite)return null;let n=null;for(let o of this)if(e>=o.arc_length&&(o===this.last||e<o.next.arc_length)){n=o.pointAtLength(e-o.arc_length);break}return n}addVertex(e,n){let o=n.shape.split(e);if(o[0]===null)return n.prev;if(o[1]===null)return n;let r=new Ie.Edge(o[0]),i=n.prev;return this.insert(r,i),n.shape=o[1],r}getChain(e,n){let o=[];for(let r=e;r!==n.next;r=r.next)o.push(r);return o}split(e){for(let n of e){let o=this.findEdgeByPoint(n);this.addVertex(n,o)}return this}findEdgeByPoint(e){let n;for(let o of this)if(o.shape.contains(e)){n=o;break}return n}distanceTo(e){if(e instanceof Point){const[n,o]=Ie.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ie.Line){const[n,o]=Ie.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ie.Circle){const[n,o]=Ie.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ie.Segment){const[n,o]=Ie.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ie.Arc){const[n,o]=Ie.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ie.Multiline)return Ie.Distance.multiline2multiline(this,e);throw Ie.Errors.UNSUPPORTED_SHAPE_TYPE}intersect(e){return e instanceof Ie.Multiline?(function(n,o){let r=[];for(let i of n)for(let s of o)r=[...r,...Ewe(i.shape,s.shape)];return r})(this,e):FM(e,this)}contains(e){if(e instanceof Ie.Point)return this.edges.some(n=>n.shape.contains(e));throw Ie.Errors.UNSUPPORTED_SHAPE_TYPE}translate(e){return new uL(this.edges.map(n=>n.shape.translate(e)))}rotate(e=0,n=new Ie.Point){return new uL(this.edges.map(o=>o.shape.rotate(e,n)))}transform(e=new Ie.Matrix){return new uL(this.edges.map(n=>n.shape.transform(e)))}toShapes(){return this.edges.map(e=>e.shape.clone())}toJSON(){return this.edges.map(e=>e.toJSON())}svgPoints(){return this.vertices.map(e=>`${e.x},${e.y}`).join(" ")}dpath(){let e=`M${this.first.start.x},${this.first.start.y}`;for(let n of this)e+=n.svg();return e}svg(e={}){let n=`
|
|
662
662
|
<path ${iS({fill:"none",...e})} d="`;n+=`
|
|
663
663
|
M${this.first.start.x},${this.first.start.y}`;for(let o of this)n+=o.svg();return n+=`" >
|
|
664
|
-
</path>`,n}};Ie.Multiline=aS;function BM(t,e,n){let o=n.length,r=t.shape.split(e);if(r.length===0)return;let i=0;i=r[0]===null?0:r[1]===null?t.shape.length:r[0].length;let s,a=0;rS(i,0)&&(a|=1),rS(i,t.shape.length)&&(a|=2),s=i===1/0?r[0].coord(e):2&a&&t.next&&t.next.arc_length===0?0:t.arc_length+i,n.push({id:o,pt:e,arc_length:s,edge_before:t,edge_after:void 0,face:t.face,is_vertex:a})}function LA(t){t.int_points1_sorted=nP(t.int_points1),t.int_points2_sorted=nP(t.int_points2)}function nP(t){let e=new Map,n=0;for(let o of t)e.has(o.face)||(e.set(o.face,n),n++);for(let o of t)o.faceId=e.get(o.face);return t.slice().sort(HOt)}function HOt(t,e){return t.faceId<e.faceId?-1:t.faceId>e.faceId?1:t.arc_length<e.arc_length?-1:t.arc_length>e.arc_length?1:0}function Jne(t){if(t.int_points1.length<2)return;let e,n,o,r,i=!1;for(let s=0;s<t.int_points1_sorted.length;s++)if(t.int_points1_sorted[s].id!==-1){e=t.int_points1_sorted[s],n=t.int_points2[e.id];for(let a=s+1;a<t.int_points1_sorted.length&&(o=t.int_points1_sorted[a],rS(o.arc_length,e.arc_length));a++)o.id!==-1&&(r=t.int_points2[o.id],r.id!==-1&&o.edge_before===e.edge_before&&o.edge_after===e.edge_after&&r.edge_before===n.edge_before&&r.edge_after===n.edge_after&&(o.id=-1,r.id=-1,i=!0))}n=t.int_points2_sorted[0],e=t.int_points1[n.id];for(let s=1;s<t.int_points2_sorted.length;s++){let a=t.int_points2_sorted[s];if(a.id===-1)continue;if(n.id===-1||!rS(a.arc_length,n.arc_length)){n=a,e=t.int_points1[n.id];continue}let c=t.int_points1[a.id];c.edge_before===e.edge_before&&c.edge_after===e.edge_after&&a.edge_before===n.edge_before&&a.edge_after===n.edge_after&&(c.id=-1,a.id=-1,i=!0)}i&&(t.int_points1=t.int_points1.filter(s=>s.id>=0),t.int_points2=t.int_points2.filter(s=>s.id>=0),t.int_points1.forEach((s,a)=>s.id=a),t.int_points2.forEach((s,a)=>s.id=a))}function Kne(t){for(let e of t)e.edge_before&&(e.edge_before.bvStart=void 0,e.edge_before.bvEnd=void 0,e.edge_before.bv=void 0,e.edge_before.overlap=void 0),e.edge_after&&(e.edge_after.bvStart=void 0,e.edge_after.bvEnd=void 0,e.edge_after.bv=void 0,e.edge_after.overlap=void 0);for(let e of t)e.edge_before&&(e.edge_before.bvEnd=2),e.edge_after&&(e.edge_after.bvStart=2)}function Qne(t,e){for(let n of t)n.edge_before&&n.edge_before.setInclusion(e),n.edge_after&&n.edge_after.setInclusion(e)}function zM(t,e,n){let o,r,i=1;if(t.length===1)return 1;o=t[e];for(let s=e+1;s<t.length&&o.face===n&&(r=t[s],r.pt.equalTo(o.pt)&&r.edge_before===o.edge_before&&r.edge_after===o.edge_after);s++)i++;return i}function VM(t,e){if(e){for(let n of e){let o=n.edge_before;if(n.is_vertex=0,o.shape.start&&o.shape.start.equalTo(n.pt)&&(n.is_vertex|=1),o.shape.end&&o.shape.end.equalTo(n.pt)&&(n.is_vertex|=2),1&n.is_vertex){n.edge_before=o.prev,o.prev&&(n.is_vertex=2);continue}if(2&n.is_vertex)continue;let r=t.addVertex(n.pt,o);n.edge_before=r}for(let n of e)n.edge_before?n.edge_after=n.edge_before.next:t instanceof aS&&1&n.is_vertex&&(n.edge_after=t.first)}}function Dwe(t,e,n){const o=t.edge_before,r=e.edge_after,i=n.length;o.next=n[0],n[0].prev=o,n[i-1].next=r,r.prev=n[i-1]}Ie.multiline=(...t)=>new Ie.Multiline(...t);var{INSIDE:C6,OUTSIDE:M6,BOUNDARY:Km,OVERLAP_SAME:IOt,OVERLAP_OPPOSITE:LOt}=Gz,{NOT_VERTEX:Kio,START_VERTEX:Awe,END_VERTEX:Rwe}=Gz;function Zne(t,e){let n=e.clone().reverse(),[o]=OA(t,n,3,!0);return o}function kwe(t,e){let[n]=OA(t,e,2,!0);return n}function Nwe(t,e){let[n,o]=OA(t,e,2,!1),r=[];for(let s of n.faces)r=[...r,...[...s.edges].map(a=>a.shape)];let i=[];for(let s of o.faces)i=[...i,...[...s.edges].map(a=>a.shape)];return[r,i]}function eoe(t,e){let[n]=OA(t,e,3,!1),o=[];for(let r of n.faces)o=[...o,...[...r.edges].map(i=>i.shape)];return o}function Hwe(t,e){let n=t.clone(),o=e.clone(),r=Iwe(n,o);return LA(r),VM(n,r.int_points1_sorted),VM(o,r.int_points2_sorted),Jne(r),LA(r),[r.int_points1_sorted.map(i=>i.pt),r.int_points2_sorted.map(i=>i.pt)]}function OOt(t,e,n,o){let r=Lwe(t,n.int_points1),i=Lwe(e,n.int_points2);for(Owe(r,e),Owe(i,t),Kne(n.int_points1),Kne(n.int_points2),Qne(n.int_points1,e),Qne(n.int_points2,t);FOt(t,e,n.int_points1,n.int_points1_sorted,n.int_points2,n););(function(s){let a,c,l,u=s.int_points1.length;for(let _=0;_<u;_++){let d=s.int_points1_sorted[_];d.face!==a&&(c=_,a=d.face);let m,h=_,p=zM(s.int_points1_sorted,_,a);m=h+p<u&&s.int_points1_sorted[h+p].face===a?h+p:c;let x=zM(s.int_points1_sorted,m,a);l=null;for(let M=m;M<m+x;M++){let w=s.int_points1_sorted[M];if(w.face===a&&s.int_points2[w.id].face===s.int_points2[d.id].face){l=w;break}}if(l===null)continue;let f=d.edge_after,g=l.edge_before;if(f.bv!==2||g.bv!==2||f!==g)continue;let y=s.int_points2[d.id],b=s.int_points2[l.id],v=y.edge_after,S=b.edge_before;v.bv===2&&S.bv===2&&v===S||(y=s.int_points2[l.id],b=s.int_points2[d.id],v=y.edge_after,S=b.edge_before),v.bv===2&&S.bv===2&&v===S&&f.setOverlap(v)}})(n),toe(t,o,n.int_points1_sorted,!0),toe(e,o,n.int_points2_sorted,!1),Fwe(t,r,o,!0),Fwe(e,i,o,!1)}function OA(t,e,n,o){let r=t.clone(),i=e.clone(),s=Iwe(r,i);return LA(s),VM(r,s.int_points1_sorted),VM(i,s.int_points2_sorted),Jne(s),LA(s),OOt(r,i,s,n),o&&(function(a,c,l){(function(u,_,d,m){for(let h of _.faces){for(let p of h)u.edges.add(p);m.find(p=>p.face===h)===void 0&&u.addFace(h.first,h.last)}})(a,c,0,l.int_points2),(function(u,_,d){if(d.int_points1.length!==0)for(let m=0;m<d.int_points1.length;m++){let h=d.int_points1[m],p=d.int_points2[m];if(h.edge_before!==void 0&&h.edge_after===void 0&&p.edge_before===void 0&&p.edge_after!==void 0&&(h.edge_before.next=p.edge_after,p.edge_after.prev=h.edge_before,h.edge_after=p.edge_after,p.edge_before=h.edge_before),p.edge_before!==void 0&&p.edge_after===void 0&&h.edge_before===void 0&&h.edge_after!==void 0&&(p.edge_before.next=h.edge_after,h.edge_after.prev=p.edge_before,p.edge_after=h.edge_after,h.edge_before=p.edge_before),h.edge_before!==void 0&&h.edge_after===void 0)for(let x of d.int_points1_sorted)x!==h&&x.edge_before===void 0&&x.edge_after!==void 0&&x.pt.equalTo(h.pt)&&(h.edge_before.next=x.edge_after,x.edge_after.prev=h.edge_before,h.edge_after=x.edge_after,x.edge_before=h.edge_before);if(p.edge_before!==void 0&&p.edge_after===void 0)for(let x of d.int_points2_sorted)x!==p&&x.edge_before===void 0&&x.edge_after!==void 0&&x.pt.equalTo(p.pt)&&(p.edge_before.next=x.edge_after,x.edge_after.prev=p.edge_before,p.edge_after=x.edge_after,x.edge_before=p.edge_before)}})(0,0,l),noe(a,l.int_points1),noe(c,l.int_points2),ooe(a,l.int_points1,l.int_points2),ooe(a,l.int_points2,l.int_points1)})(r,i,s),[r,i]}function Iwe(t,e){let n={int_points1:[],int_points2:[]};for(let o of t.edges){let r=e.edges.search(o.box);for(let i of r){let s=o.shape.intersect(i.shape);for(let a of s)BM(o,a,n.int_points1),BM(i,a,n.int_points2)}}return n}function Lwe(t,e){let n=[];for(let o of t.faces)e.find(r=>r.face===o)||n.push(o);return n}function Owe(t,e){for(let n of t)n.first.bv=n.first.bvStart=n.first.bvEnd=void 0,n.first.setInclusion(e)}function FOt(t,e,n,o,r,i){let s,a,c,l=o.length,u=!1;for(let _=0;_<l;_++){let d=o[_];d.face!==s&&(a=_,s=d.face);let m,h=_,p=zM(o,_,s);m=h+p<l&&o[h+p].face===s?h+p:a;let x=zM(o,m,s);c=null;for(let y=m;y<m+x;y++){let b=o[y];if(b.face===s&&r[b.id].face===r[d.id].face){c=b;break}}if(c===null)continue;let f=d.edge_after,g=c.edge_before;if(f.bv!==Km||g.bv==Km)if(f.bv==Km||g.bv!==Km){if(f.bv===Km&&g.bv===Km&&f!=g||f.bv===C6&&g.bv===M6||f.bv===M6&&g.bv===C6){let y=f.next;for(;y!=g;)y.bvStart=void 0,y.bvEnd=void 0,y.bv=void 0,y.setInclusion(e),y=y.next}if(f.bv===Km&&g.bv===Km&&f!=g){let y,b=f.next;for(;b!=g;){if(b.bv!=Km){if(y===void 0)y=b.bv;else if(b.bv!=y)throw K0.UNRESOLVED_BOUNDARY_CONFLICT}b=b.next}y!=null&&(f.bv=y,g.bv=y);continue}if(f.bv===C6&&g.bv===M6||f.bv===M6&&g.bv===C6){let y=f;for(;y!=g;){if(y.bvStart===f.bv&&y.bvEnd===g.bv){let[b,v]=y.shape.distanceTo(e);if(b<10*Ie.DP_TOL){BM(y,v.ps,n);let S=n[n.length-1];if(S.is_vertex&Awe)S.edge_after=y,S.edge_before=y.prev,y.bvStart=Km,y.bv=void 0,y.setInclusion(e);else if(S.is_vertex&Rwe)S.edge_after=y.next,y.bvEnd=Km,y.bv=void 0,y.setInclusion(e);else{let D=e.addVertex(S.pt,y);S.edge_before=D,S.edge_after=D.next,D.setInclusion(e),D.next.bvStart=Km,D.next.bvEnd=void 0,D.next.bv=void 0,D.next.setInclusion(e)}let M=e.findEdgeByPoint(v.pe);BM(M,v.pe,r);let w=r[r.length-1];if(w.is_vertex&Awe)w.edge_after=M,w.edge_before=M.prev;else if(w.is_vertex&Rwe)w.edge_after=M.next;else{let D=r.find(I=>I.edge_after===M),A=e.addVertex(w.pt,M);w.edge_before=A,w.edge_after=A.next,D&&(D.edge_after=A),A.bvStart=void 0,A.bvEnd=Km,A.bv=void 0,A.setInclusion(t),A.next.bvStart=Km,A.next.bvEnd=void 0,A.next.bv=void 0,A.next.setInclusion(t)}LA(i),u=!0;break}}y=y.next}if(u)break;throw K0.UNRESOLVED_BOUNDARY_CONFLICT}}else g.bv=f.bv;else f.bv=g.bv}return u}function toe(t,e,n,o){if(!n)return;let r,i,s,a;for(let c=0;c<n.length;c++){if(s=n[c],s.face!==r&&(i=c,r=s.face),r.isEmpty())continue;let l,u=c,_=zM(n,c,r);l=u+_<n.length&&n[u+_].face===s.face?u+_:i,a=n[l];let d=l,m=zM(n,d,r),h=s.edge_after,p=a.edge_before;if(h.bv===C6&&p.bv===C6&&e===1||h.bv===M6&&p.bv===M6&&e===2||(h.bv===M6||p.bv===M6)&&e===3&&!o||(h.bv===C6||p.bv===C6)&&e===3&&o||h.bv===Km&&p.bv===Km&&h.overlap&IOt&&o||h.bv===Km&&p.bv===Km&&h.overlap&LOt){t.removeChain(r,h,p);for(let x=u;x<u+_;x++)n[x].edge_after=void 0;for(let x=d;x<d+m;x++)n[x].edge_before=void 0}c+=_-1}}function noe(t,e){for(let n of e)t.faces.delete(n.face),n.face=void 0,n.edge_before&&(n.edge_before.face=void 0),n.edge_after&&(n.edge_after.face=void 0)}function ooe(t,e,n){for(let o of e){if(o.edge_before===void 0||o.edge_after===void 0||o.face||o.edge_after.face||o.edge_before.face)continue;let r=o.edge_after,i=o.edge_before;try{Une.testInfiniteLoop(r)}catch{throw K0.CANNOT_COMPLETE_BOOLEAN_OPERATION}let s=t.addFace(r,i);for(let a of e)a.edge_before&&a.edge_after&&a.edge_before.face===s&&a.edge_after.face===s&&(a.face=s);for(let a of n)a.edge_before&&a.edge_after&&a.edge_before.face===s&&a.edge_after.face===s&&(a.face=s)}}function Fwe(t,e,n,o){for(let r of e){let i=r.first.bv;(n===1&&i===C6||n===3&&i===C6&&o||n===3&&i===M6&&!o||n===2&&i===M6)&&t.deleteFace(r)}}var BOt=Object.freeze({__proto__:null,BOOLEAN_INTERSECT:2,BOOLEAN_SUBTRACT:3,BOOLEAN_UNION:1,calculateIntersections:Hwe,innerClip:Nwe,intersect:kwe,outerClip:eoe,removeNotRelevantChains:toe,removeOldFaces:noe,restoreFaces:ooe,subtract:Zne,unify:function(t,e){let[n]=OA(t,e,1,!0);return n}}),zOt=RegExp("T.F..FFF.|T.F...F.."),VOt=RegExp("T........|.T.......|...T.....|....T...."),$Ot=RegExp("FT.......|F..T.....|F...T...."),WOt=RegExp("T.F..F..."),UOt=RegExp("T.F..F...|.TF..F...|..FT.F...|..F.TF..."),$M=class{constructor(){this.m=new Array(9).fill(void 0)}get I2I(){return this.m[0]}set I2I(t){this.m[0]=t}get I2B(){return this.m[1]}set I2B(t){this.m[1]=t}get I2E(){return this.m[2]}set I2E(t){this.m[2]=t}get B2I(){return this.m[3]}set B2I(t){this.m[3]=t}get B2B(){return this.m[4]}set B2B(t){this.m[4]=t}get B2E(){return this.m[5]}set B2E(t){this.m[5]=t}get E2I(){return this.m[6]}set E2I(t){this.m[6]=t}get E2B(){return this.m[7]}set E2B(t){this.m[7]=t}get E2E(){return this.m[8]}set E2E(t){this.m[8]=t}toString(){return this.m.map(t=>t instanceof Array&&t.length>0?"T":t instanceof Array&&t.length===0?"F":"*").join("")}equal(){return zOt.test(this.toString())}intersect(){return VOt.test(this.toString())}touch(){return $Ot.test(this.toString())}inside(){return WOt.test(this.toString())}covered(){return UOt.test(this.toString())}};function FA(t,e){let n,o=new Ie.Ray(e),r=new Ie.Line(o.pt,o.norm);const i=new Ie.Box(o.box.xmin-Ie.DP_TOL,o.box.ymin-Ie.DP_TOL,o.box.xmax+Ie.DP_TOL,o.box.ymax+Ie.DP_TOL);if(t.box.not_intersect(i))return Ie.OUTSIDE;let s=t.edges.search(i);if(s.length===0)return Ie.OUTSIDE;for(let u of s)if(u.shape.contains(e))return Ie.BOUNDARY;let a=[...t.faces],c=[];for(let u of s)for(let _ of o.intersect(u.shape)){if(_.equalTo(e))return Ie.BOUNDARY;c.push({pt:_,edge:u,face_index:a.indexOf(u.face)})}c.sort((u,_)=>hwe(u.pt.x,_.pt.x)?-1:dwe(u.pt.x,_.pt.x)?1:u.face_index<_.face_index?-1:u.face_index>_.face_index?1:u.edge.arc_length<_.edge.arc_length?-1:u.edge.arc_length>_.edge.arc_length?1:0);let l=0;for(let u=0;u<c.length;u++){let _=c[u];if(_.pt.equalTo(_.edge.shape.start)){if(u>0&&_.pt.equalTo(c[u-1].pt)&&_.face_index===c[u-1].face_index&&_.edge.prev===c[u-1].edge)continue;let d=_.edge.prev;for(;Wne(d.length);)d=d.prev;let m=d.shape.tangentInEnd(),h=_.pt.translate(m),p=_.edge.shape.tangentInStart(),x=_.pt.translate(p),f=h.leftTo(r),g=x.leftTo(r);(f&&!g||!f&&g)&&l++}else if(_.pt.equalTo(_.edge.shape.end)){if(u>0&&_.pt.equalTo(c[u-1].pt)&&_.face_index===c[u-1].face_index&&_.edge.next===c[u-1].edge)continue;let d=_.edge.next;for(;Wne(d.length);)d=d.next;let m=d.shape.tangentInStart(),h=_.pt.translate(m),p=_.edge.shape.tangentInEnd(),x=_.pt.translate(p),f=h.leftTo(r),g=x.leftTo(r);(f&&!g||!f&&g)&&l++}else if(_.edge.shape instanceof Ie.Segment)l++;else{let d=_.edge.shape.box;rS(_.pt.y,d.ymin)||rS(_.pt.y,d.ymax)||l++}}return n=l%2==1?1:0,n}function Bwe(t,e){return WM(t,e).intersect()}function zwe(t,e){return WM(t,e).inside()}function Vwe(t,e){return WM(t,e).covered()}function $we(t,e){return Vwe(e,t)}function WM(t,e){return t instanceof Ie.Line&&e instanceof Ie.Line?(function(n,o){let r=new $M,i=IM(n,o);return i.length===0?n.contains(o.pt)&&o.contains(n.pt)?(r.I2I=[n],r.I2E=[],r.E2I=[]):(r.I2I=[],r.I2E=[n],r.E2I=[o]):(r.I2I=i,r.I2E=n.split(i),r.E2I=o.split(i)),r})(t,e):t instanceof Ie.Line&&e instanceof Ie.Circle?(function(n,o){let r=new $M,i=sS(n,o);if(i.length===0)r.I2I=[],r.I2B=[],r.I2E=[n],r.E2I=[o];else if(i.length===1)r.I2I=[],r.I2B=i,r.I2E=n.split(i),r.E2I=[o];else{let s=new aS([n]),a=n.sortPoints(i);s.split(a);let c=s.toShapes();r.I2I=[c[1]],r.I2B=a,r.I2E=[c[0],c[2]],r.E2I=new Ie.Polygon([o.toArc()]).cutWithLine(n)}return r})(t,e):t instanceof Ie.Line&&e instanceof Ie.Box?(function(n,o){let r=new $M,i=LM(n,o);if(i.length===0)r.I2I=[],r.I2B=[],r.I2E=[n],r.E2I=[o];else if(i.length===1)r.I2I=[],r.I2B=i,r.I2E=n.split(i),r.E2I=[o];else{let s=new aS([n]),a=n.sortPoints(i);s.split(a);let c=s.toShapes();o.toSegments().some(l=>l.contains(i[0])&&l.contains(i[1]))?(r.I2I=[],r.I2B=[c[1]],r.I2E=[c[0],c[2]],r.E2I=[o]):(r.I2I=[c[1]],r.I2B=a,r.I2E=[c[0],c[2]],r.E2I=new Ie.Polygon(o.toSegments()).cutWithLine(n))}return r})(t,e):t instanceof Ie.Line&&e instanceof Ie.Polygon?(function(n,o){let r=new $M,i=IA(n,o),s=new aS([n]),a=i.length>0?i.slice():n.sortPoints(i);return s.split(a),[...s].forEach(c=>c.setInclusion(o)),r.I2I=[...s].filter(c=>c.bv===Ie.INSIDE).map(c=>c.shape),r.I2B=[...s].slice(1).map(c=>c.bv===Ie.BOUNDARY?c.shape:c.shape.start),r.I2E=[...s].filter(c=>c.bv===Ie.OUTSIDE).map(c=>c.shape),r.E2I=o.cutWithLine(n),r})(t,e):(t instanceof Ie.Segment||t instanceof Ie.Arc)&&e instanceof Ie.Polygon?Wwe(t,e):(t instanceof Ie.Segment||t instanceof Ie.Arc)&&(e instanceof Ie.Circle||e instanceof Ie.Box)?Wwe(t,new Ie.Polygon(e)):t instanceof Ie.Polygon&&e instanceof Ie.Polygon?Kz(t,e):(t instanceof Ie.Circle||t instanceof Ie.Box)&&(e instanceof Ie.Circle||e instanceof Ie.Box)?Kz(new Ie.Polygon(t),new Ie.Polygon(e)):(t instanceof Ie.Circle||t instanceof Ie.Box)&&e instanceof Ie.Polygon?Kz(new Ie.Polygon(t),e):t instanceof Ie.Polygon&&(e instanceof Ie.Circle||e instanceof Ie.Box)?Kz(t,new Ie.Polygon(e)):void 0}function Wwe(t,e){let n=new $M,o=(function(s,a){return s instanceof Ie.Line?IA(s,a):s instanceof Ie.Segment?jne(s,a):s instanceof Ie.Arc?Gne(s,a):[]})(t,e),r=o.length>0?o.slice():t.sortPoints(o),i=new aS([t]);i.split(r),[...i].forEach(s=>s.setInclusion(e)),n.I2I=[...i].filter(s=>s.bv===Ie.INSIDE).map(s=>s.shape),n.I2B=[...i].slice(1).map(s=>s.bv===Ie.BOUNDARY?s.shape:s.shape.start),n.I2E=[...i].filter(s=>s.bv===Ie.OUTSIDE).map(s=>s.shape),n.B2I=[],n.B2B=[],n.B2E=[];for(let s of[t.start,t.end])switch(FA(e,s)){case Ie.INSIDE:n.B2I.push(s);break;case Ie.BOUNDARY:n.B2B.push(s);break;case Ie.OUTSIDE:n.B2E.push(s)}return n}function Kz(t,e){let n=new $M,[o,r]=Hwe(t,e),i=kwe(t,e),s=Zne(t,e),a=Zne(e,t),[c,l]=Nwe(t,e),u=eoe(t,e),_=eoe(e,t);return n.I2I=i.isEmpty()?[]:[i],n.I2B=l,n.I2E=s.isEmpty()?[]:[s],n.B2I=c,n.B2B=o,n.B2E=u,n.E2I=a.isEmpty()?[]:[a],n.E2B=_,n}var XOt=Object.freeze({__proto__:null,contain:function(t,e){return zwe(e,t)},cover:$we,covered:Vwe,disjoint:function(t,e){return!Bwe(t,e)},equal:function(t,e){return WM(t,e).equal()},inside:zwe,intersect:Bwe,relate:WM,touch:function(t,e){return WM(t,e).touch()}}),BA=class NC{constructor(e=1,n=0,o=0,r=1,i=0,s=0){this.a=e,this.b=n,this.c=o,this.d=r,this.tx=i,this.ty=s}fromMatrix3x3(e){const[n,o,r]=e[0],[i,s,a]=e[1];return new NC(n,i,o,s,r,a)}toMatrix3x3(){return[[this.a,this.c,this.tx],[this.b,this.d,this.ty],[0,0,1]]}clone(){return new NC(this.a,this.b,this.c,this.d,this.tx,this.ty)}transform(e){return[e[0]*this.a+e[1]*this.c+this.tx,e[0]*this.b+e[1]*this.d+this.ty]}multiply(e){return new NC(this.a*e.a+this.c*e.b,this.b*e.a+this.d*e.b,this.a*e.c+this.c*e.d,this.b*e.c+this.d*e.d,this.a*e.tx+this.c*e.ty+this.tx,this.b*e.tx+this.d*e.ty+this.ty)}translate(...e){let n,o;if(e.length!=1||isNaN(e[0].x)||isNaN(e[0].y)){if(e.length!==2||typeof e[0]!="number"||typeof e[1]!="number")throw K0.ILLEGAL_PARAMETERS;n=e[0],o=e[1]}else n=e[0].x,o=e[0].y;return this.multiply(new NC(1,0,0,1,n,o))}rotate(e,n=0,o=0){let r=Math.cos(e),i=Math.sin(e);return this.translate(n,o).multiply(new NC(r,i,-i,r,0,0)).translate(-n,-o)}scale(e,n){return this.multiply(new NC(e,0,0,n,0,0))}equalTo(e){return!!Ie.Utils.EQ(this.tx,e.tx)&&!!Ie.Utils.EQ(this.ty,e.ty)&&!!Ie.Utils.EQ(this.a,e.a)&&!!Ie.Utils.EQ(this.b,e.b)&&!!Ie.Utils.EQ(this.c,e.c)&&!!Ie.Utils.EQ(this.d,e.d)}};Ie.Matrix=BA,Ie.matrix=(...t)=>new Ie.Matrix(...t);var jOt=class{constructor(t,e){this.low=t,this.high=e}get max(){return this.clone()}less_than(t){return this.low<t.low||this.low===t.low&&this.high<t.high}equal_to(t){return this.low===t.low&&this.high===t.high}intersect(t){return!this.not_intersect(t)}not_intersect(t){return this.high<t.low||t.high<this.low}merge(t){const e=this.low===void 0?t.low:this.low<t.low?this.low:t.low,n=this.high===void 0?t.high:this.high>t.high?this.high:t.high,o=this.clone();return o.low=e,o.high=n,o}output(){return[this.low,this.high]}comparable_less_than(t,e){return t<e}},GOt=class I1t extends jOt{clone(){return new I1t(this.low,this.high)}},oP=class{constructor(t,e,n=null,o=null,r=null,i=0){if(this.left=n,this.right=o,this.parent=r,this.color=i,this.item={key:void 0,values:[]},e!==void 0&&this.item.values.push(e),t!==void 0)if(Array.isArray(t)){const[s,a]=t;if(!Number.isNaN(s)&&!Number.isNaN(a)){let c=s,l=a;c>l&&([c,l]=[l,c]),this.item.key=new GOt(c,l)}}else this.item.key=t;this.max=this.item.key?this.item.key.max:void 0}isNil(){return this.item.key===void 0&&this.item.values.length===0&&this.left===null&&this.right===null&&this.color===0}requireKey(){if(!this.item.key)throw new Error("Node key is undefined (nil/sentinel). Operation is not applicable.");return this.item.key}less_than(t){const e=this.requireKey(),n=t.requireKey();return e.less_than(n)}_value_equal(t){const e=this.item.values[0],n=t.item.values[0];return e&&n&&e.equal_to?e.equal_to(n):e===n}equal_to(t){const e=this.requireKey(),n=t.requireKey();return e.equal_to(n)}intersect(t){const e=this.requireKey(),n=t.requireKey();return e.intersect(n)}copy_data(t){this.item.key=t.item.key,this.item.values=t.item.values.slice()}update_max(){this.max=this.item.key?this.item.key.max:void 0,this.right&&this.right.max&&(this.max=this.max?this.max.merge(this.right.max):this.right.max),this.left&&this.left.max&&(this.max=this.max?this.max.merge(this.left.max):this.left.max)}not_intersect_left_subtree(t){if(!this.left)return!0;const e=this.left.max?this.left.max.high:this.left.item.key.high,n=this.requireKey(),o=t.requireKey();return n.comparable_less_than(e,o.low)}not_intersect_right_subtree(t){if(!this.right)return!0;const e=this.right.max?this.right.max.low:this.right.item.key.low,n=this.requireKey(),o=t.requireKey();return n.comparable_less_than(o.high,e)}},roe=class L1t{constructor(){this.root=null,this.nil_node=new oP}get size(){let e=0;return this.tree_walk(this.root,n=>e+=n.item.values.length),e}get keys(){const e=[];return this.tree_walk(this.root,n=>e.push(n.item.key.output())),e}get values(){const e=[];return this.tree_walk(this.root,n=>{for(const o of n.item.values)e.push(o)}),e}get items(){const e=[];return this.tree_walk(this.root,n=>{const o=n.item.key.output();for(const r of n.item.values)e.push({key:o,value:r})}),e}isEmpty(){return this.root==null||this.root===this.nil_node}clear(){this.root=null}insert(e,n=e){if(e===void 0)return;const o=this.tree_search(this.root,new oP(e));if(o)return o.item.values.push(n),o;const r=new oP(e,n,this.nil_node,this.nil_node,null,1);return this.tree_insert(r),this.recalc_max(r),r}exist(e,n=e){const o=this.tree_search(this.root,new oP(e));return!!o&&(arguments.length<2||n===e||o.item.values.some(r=>r&&r.equal_to?r.equal_to(n):r===n))}remove(e,n=e){const o=this.tree_search(this.root,new oP(e));if(!o)return;if(arguments.length<2)return this.tree_delete(o),o;const r=o.item.values.findIndex(i=>i&&i.equal_to?i.equal_to(n):i===n);return r>=0?(o.item.values.splice(r,1),o.item.values.length===0&&this.tree_delete(o),o):void 0}search(e,n=(o,r)=>o===r?r.output():o){const o=new oP(e),r=[];this.tree_search_interval(this.root,o,r);const i=[];for(const s of r)for(const a of s.item.values)i.push(n(a,s.item.key));return i}intersect_any(e){const n=new oP(e);return this.tree_find_any_interval(this.root,n)}forEach(e){this.tree_walk(this.root,n=>{for(const o of n.item.values)e(n.item.key,o)})}map(e){const n=new L1t;return this.tree_walk(this.root,o=>{for(const r of o.item.values)n.insert(o.item.key,e(r,o.item.key))}),n}*iterate(e,n=(o,r)=>o===r?r.output():o){let o=null;for(e?o=this.tree_search_nearest_forward(this.root,new oP(e)):this.root&&(o=this.local_minimum(this.root));o;){for(const r of o.item.values)yield n(r,o.item.key);o=this.tree_successor(o)}}recalc_max(e){let n=e;for(;n.parent!=null;)n.parent.update_max(),n=n.parent}tree_insert(e){let n=this.root,o=null;if(this.root==null||this.root===this.nil_node)this.root=e;else{for(;n!==this.nil_node;)o=n,n=e.less_than(n)?n.left:n.right;e.parent=o,e.less_than(o)?o.left=e:o.right=e}this.insert_fixup(e)}insert_fixup(e){let n,o;for(n=e;n!==this.root&&n.parent.color===1;)n.parent===n.parent.parent.left?(o=n.parent.parent.right,o.color===1?(n.parent.color=0,o.color=0,n.parent.parent.color=1,n=n.parent.parent):(n===n.parent.right&&(n=n.parent,this.rotate_left(n)),n.parent.color=0,n.parent.parent.color=1,this.rotate_right(n.parent.parent))):(o=n.parent.parent.left,o.color===1?(n.parent.color=0,o.color=0,n.parent.parent.color=1,n=n.parent.parent):(n===n.parent.left&&(n=n.parent,this.rotate_right(n)),n.parent.color=0,n.parent.parent.color=1,this.rotate_left(n.parent.parent)));this.root.color=0}tree_delete(e){let n,o;n=e.left===this.nil_node||e.right===this.nil_node?e:this.tree_successor(e),o=n.left!==this.nil_node?n.left:n.right,o.parent=n.parent,n===this.root?this.root=o:(n===n.parent.left?n.parent.left=o:n.parent.right=o,n.parent.update_max()),this.recalc_max(o),n!==e&&(e.copy_data(n),e.update_max(),this.recalc_max(e)),n.color===0&&this.delete_fixup(o)}delete_fixup(e){let n,o=e;for(;o!==this.root&&o.parent!=null&&o.color===0;)o===o.parent.left?(n=o.parent.right,n.color===1&&(n.color=0,o.parent.color=1,this.rotate_left(o.parent),n=o.parent.right),n.left.color===0&&n.right.color===0?(n.color=1,o=o.parent):(n.right.color===0&&(n.color=1,n.left.color=0,this.rotate_right(n),n=o.parent.right),n.color=o.parent.color,o.parent.color=0,n.right.color=0,this.rotate_left(o.parent),o=this.root)):(n=o.parent.left,n.color===1&&(n.color=0,o.parent.color=1,this.rotate_right(o.parent),n=o.parent.left),n.left.color===0&&n.right.color===0?(n.color=1,o=o.parent):(n.left.color===0&&(n.color=1,n.right.color=0,this.rotate_left(n),n=o.parent.left),n.color=o.parent.color,o.parent.color=0,n.left.color=0,this.rotate_right(o.parent),o=this.root));o.color=0}tree_search(e,n){if(e!=null&&e!==this.nil_node)return n.equal_to(e)?e:n.less_than(e)?this.tree_search(e.left,n):this.tree_search(e.right,n)}tree_search_nearest_forward(e,n){let o=null,r=e;for(;r&&r!==this.nil_node;)r.less_than(n)?r.intersect(n)?(o=r,r=r.left):r=r.right:(o&&!r.less_than(o)||(o=r),r=r.left);return o||null}tree_search_interval(e,n,o){e!=null&&e!==this.nil_node&&(e.left===this.nil_node||e.not_intersect_left_subtree(n)||this.tree_search_interval(e.left,n,o),e.intersect(n)&&o.push(e),e.right===this.nil_node||e.not_intersect_right_subtree(n)||this.tree_search_interval(e.right,n,o))}tree_find_any_interval(e,n){let o=!1;return e!=null&&e!==this.nil_node&&(e.left===this.nil_node||e.not_intersect_left_subtree(n)||(o=this.tree_find_any_interval(e.left,n)),o||(o=e.intersect(n)),o||e.right===this.nil_node||e.not_intersect_right_subtree(n)||(o=this.tree_find_any_interval(e.right,n))),o}local_minimum(e){let n=e;for(;n.left!=null&&n.left!==this.nil_node;)n=n.left;return n}local_maximum(e){let n=e;for(;n.right!=null&&n.right!==this.nil_node;)n=n.right;return n}tree_successor(e){let n,o,r;if(e.right!==this.nil_node)n=this.local_minimum(e.right);else{for(o=e,r=e.parent;r!=null&&r.right===o;)o=r,r=r.parent;n=r}return n}rotate_left(e){const n=e.right;e.right=n.left,n.left!==this.nil_node&&(n.left.parent=e),n.parent=e.parent,e===this.root?this.root=n:e===e.parent.left?e.parent.left=n:e.parent.right=n,n.left=e,e.parent=n,e!==null&&e!==this.nil_node&&e.update_max(),n!=null&&n!==this.nil_node&&n.update_max()}rotate_right(e){const n=e.left;e.left=n.right,n.right!==this.nil_node&&(n.right.parent=e),n.parent=e.parent,e===this.root?this.root=n:e===e.parent.left?e.parent.left=n:e.parent.right=n,n.right=e,e.parent=n,e!==null&&e!==this.nil_node&&e.update_max(),n!=null&&n!==this.nil_node&&n.update_max()}tree_walk(e,n){e!=null&&e!==this.nil_node&&(this.tree_walk(e.left,n),n(e),this.tree_walk(e.right,n))}testRedBlackProperty(){let e=!0;return this.tree_walk(this.root,function(n){n.color===1&&(n.left.color===0&&n.right.color===0||(e=!1))}),e}testBlackHeightProperty(e){let n=0,o=0,r=0;if(e.color===0&&n++,o=e.left!==this.nil_node?this.testBlackHeightProperty(e.left):1,r=e.right!==this.nil_node?this.testBlackHeightProperty(e.right):1,o!==r)throw new Error("Red-black height property violated");return n+=o,n}},YOt=class extends Set{constructor(t){super(t),this.index=new roe,this.forEach(e=>this.index.insert(e))}add(t){let e=this.size;const{key:n,value:o}=t,r=n||t.box,i=o||t;return super.add(i),this.size>e&&this.index.insert(r,i),this}delete(t){const{key:e,value:n}=t,o=e||t.box,r=n||t;let i=super.delete(r);return i&&this.index.remove(o,r),i}clear(){super.clear(),this.index=new roe}search(t){return this.index.search(t)}hit(t){let e=new Ie.Box(t.x-1,t.y-1,t.x+1,t.y+1);return this.index.search(e).filter(n=>t.on(n))}svg(){return[...this].reduce((t,e)=>t+e.svg(),"")}};Ie.PlanarSet=YOt;var rP=class{get name(){throw K0.CANNOT_INVOKE_ABSTRACT_METHOD}get box(){throw K0.CANNOT_INVOKE_ABSTRACT_METHOD}clone(){throw K0.CANNOT_INVOKE_ABSTRACT_METHOD}translate(...t){return this.transform(new BA().translate(...t))}rotate(t,e=new Ie.Point){return this.transform(new BA().rotate(t,e.x,e.y))}scale(t,e){return this.transform(new BA().scale(t,e))}transform(...t){throw K0.CANNOT_INVOKE_ABSTRACT_METHOD}toJSON(){return Object.assign({},this,{name:this.name})}svg(t={}){throw K0.CANNOT_INVOKE_ABSTRACT_METHOD}};Ie.Point=class O1t extends rP{constructor(...e){if(super(),this.x=0,this.y=0,e.length!==0){if(e.length===1&&e[0]instanceof Array&&e[0].length===2){let n=e[0];if(typeof n[0]=="number"&&typeof n[1]=="number")return this.x=n[0],void(this.y=n[1])}if(e.length===1&&e[0]instanceof Object&&e[0].name==="point"){let{x:n,y:o}=e[0];return this.x=n,void(this.y=o)}if(e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number")return this.x=e[0],void(this.y=e[1]);throw K0.ILLEGAL_PARAMETERS}}get box(){return new Ie.Box(this.x,this.y,this.x,this.y)}clone(){return new Ie.Point(this.x,this.y)}get vertices(){return[this.clone()]}equalTo(e){return Ie.Utils.EQ(this.x,e.x)&&Ie.Utils.EQ(this.y,e.y)}lessThan(e){return!!Ie.Utils.LT(this.y,e.y)||!(!Ie.Utils.EQ(this.y,e.y)||!Ie.Utils.LT(this.x,e.x))}transform(e){return new Ie.Point(e.transform([this.x,this.y]))}projectionOn(e){if(this.equalTo(e.pt))return this.clone();let n=new Ie.Vector(this,e.pt);if(Ie.Utils.EQ_0(n.cross(e.norm)))return e.pt.clone();let o=n.dot(e.norm),r=e.norm.multiply(o);return this.translate(r)}leftTo(e){let n=new Ie.Vector(e.pt,this);return Ie.Utils.GT(n.dot(e.norm),0)}distanceTo(e){if(e instanceof O1t){let n=e.x-this.x,o=e.y-this.y;return[Math.sqrt(n*n+o*o),new Ie.Segment(this,e)]}return e instanceof Ie.Line?Ie.Distance.point2line(this,e):e instanceof Ie.Circle?Ie.Distance.point2circle(this,e):e instanceof Ie.Segment?Ie.Distance.point2segment(this,e):e instanceof Ie.Arc?Ie.Distance.point2arc(this,e):e instanceof Ie.Polygon?Ie.Distance.point2polygon(this,e):e instanceof Ie.PlanarSet?Ie.Distance.shape2planarSet(this,e):e instanceof Ie.Multiline?Ie.Distance.shape2multiline(this,e):void 0}on(e){if(e instanceof Ie.Point)return this.equalTo(e);if(e.contains&&e.contains instanceof Function)return e.contains(this);throw Ie.Errors.UNSUPPORTED_SHAPE_TYPE}get name(){return"point"}svg(e={}){const n=e.r??3;return`
|
|
664
|
+
</path>`,n}};Ie.Multiline=aS;function BM(t,e,n){let o=n.length,r=t.shape.split(e);if(r.length===0)return;let i=0;i=r[0]===null?0:r[1]===null?t.shape.length:r[0].length;let s,a=0;rS(i,0)&&(a|=1),rS(i,t.shape.length)&&(a|=2),s=i===1/0?r[0].coord(e):2&a&&t.next&&t.next.arc_length===0?0:t.arc_length+i,n.push({id:o,pt:e,arc_length:s,edge_before:t,edge_after:void 0,face:t.face,is_vertex:a})}function LA(t){t.int_points1_sorted=nP(t.int_points1),t.int_points2_sorted=nP(t.int_points2)}function nP(t){let e=new Map,n=0;for(let o of t)e.has(o.face)||(e.set(o.face,n),n++);for(let o of t)o.faceId=e.get(o.face);return t.slice().sort(HOt)}function HOt(t,e){return t.faceId<e.faceId?-1:t.faceId>e.faceId?1:t.arc_length<e.arc_length?-1:t.arc_length>e.arc_length?1:0}function Jne(t){if(t.int_points1.length<2)return;let e,n,o,r,i=!1;for(let s=0;s<t.int_points1_sorted.length;s++)if(t.int_points1_sorted[s].id!==-1){e=t.int_points1_sorted[s],n=t.int_points2[e.id];for(let a=s+1;a<t.int_points1_sorted.length&&(o=t.int_points1_sorted[a],rS(o.arc_length,e.arc_length));a++)o.id!==-1&&(r=t.int_points2[o.id],r.id!==-1&&o.edge_before===e.edge_before&&o.edge_after===e.edge_after&&r.edge_before===n.edge_before&&r.edge_after===n.edge_after&&(o.id=-1,r.id=-1,i=!0))}n=t.int_points2_sorted[0],e=t.int_points1[n.id];for(let s=1;s<t.int_points2_sorted.length;s++){let a=t.int_points2_sorted[s];if(a.id===-1)continue;if(n.id===-1||!rS(a.arc_length,n.arc_length)){n=a,e=t.int_points1[n.id];continue}let c=t.int_points1[a.id];c.edge_before===e.edge_before&&c.edge_after===e.edge_after&&a.edge_before===n.edge_before&&a.edge_after===n.edge_after&&(c.id=-1,a.id=-1,i=!0)}i&&(t.int_points1=t.int_points1.filter(s=>s.id>=0),t.int_points2=t.int_points2.filter(s=>s.id>=0),t.int_points1.forEach((s,a)=>s.id=a),t.int_points2.forEach((s,a)=>s.id=a))}function Kne(t){for(let e of t)e.edge_before&&(e.edge_before.bvStart=void 0,e.edge_before.bvEnd=void 0,e.edge_before.bv=void 0,e.edge_before.overlap=void 0),e.edge_after&&(e.edge_after.bvStart=void 0,e.edge_after.bvEnd=void 0,e.edge_after.bv=void 0,e.edge_after.overlap=void 0);for(let e of t)e.edge_before&&(e.edge_before.bvEnd=2),e.edge_after&&(e.edge_after.bvStart=2)}function Qne(t,e){for(let n of t)n.edge_before&&n.edge_before.setInclusion(e),n.edge_after&&n.edge_after.setInclusion(e)}function zM(t,e,n){let o,r,i=1;if(t.length===1)return 1;o=t[e];for(let s=e+1;s<t.length&&o.face===n&&(r=t[s],r.pt.equalTo(o.pt)&&r.edge_before===o.edge_before&&r.edge_after===o.edge_after);s++)i++;return i}function VM(t,e){if(e){for(let n of e){let o=n.edge_before;if(n.is_vertex=0,o.shape.start&&o.shape.start.equalTo(n.pt)&&(n.is_vertex|=1),o.shape.end&&o.shape.end.equalTo(n.pt)&&(n.is_vertex|=2),1&n.is_vertex){n.edge_before=o.prev,o.prev&&(n.is_vertex=2);continue}if(2&n.is_vertex)continue;let r=t.addVertex(n.pt,o);n.edge_before=r}for(let n of e)n.edge_before?n.edge_after=n.edge_before.next:t instanceof aS&&1&n.is_vertex&&(n.edge_after=t.first)}}function Dwe(t,e,n){const o=t.edge_before,r=e.edge_after,i=n.length;o.next=n[0],n[0].prev=o,n[i-1].next=r,r.prev=n[i-1]}Ie.multiline=(...t)=>new Ie.Multiline(...t);var{INSIDE:C6,OUTSIDE:M6,BOUNDARY:Km,OVERLAP_SAME:IOt,OVERLAP_OPPOSITE:LOt}=Gz,{NOT_VERTEX:Qio,START_VERTEX:Awe,END_VERTEX:Rwe}=Gz;function Zne(t,e){let n=e.clone().reverse(),[o]=OA(t,n,3,!0);return o}function kwe(t,e){let[n]=OA(t,e,2,!0);return n}function Nwe(t,e){let[n,o]=OA(t,e,2,!1),r=[];for(let s of n.faces)r=[...r,...[...s.edges].map(a=>a.shape)];let i=[];for(let s of o.faces)i=[...i,...[...s.edges].map(a=>a.shape)];return[r,i]}function eoe(t,e){let[n]=OA(t,e,3,!1),o=[];for(let r of n.faces)o=[...o,...[...r.edges].map(i=>i.shape)];return o}function Hwe(t,e){let n=t.clone(),o=e.clone(),r=Iwe(n,o);return LA(r),VM(n,r.int_points1_sorted),VM(o,r.int_points2_sorted),Jne(r),LA(r),[r.int_points1_sorted.map(i=>i.pt),r.int_points2_sorted.map(i=>i.pt)]}function OOt(t,e,n,o){let r=Lwe(t,n.int_points1),i=Lwe(e,n.int_points2);for(Owe(r,e),Owe(i,t),Kne(n.int_points1),Kne(n.int_points2),Qne(n.int_points1,e),Qne(n.int_points2,t);FOt(t,e,n.int_points1,n.int_points1_sorted,n.int_points2,n););(function(s){let a,c,l,u=s.int_points1.length;for(let _=0;_<u;_++){let d=s.int_points1_sorted[_];d.face!==a&&(c=_,a=d.face);let m,h=_,p=zM(s.int_points1_sorted,_,a);m=h+p<u&&s.int_points1_sorted[h+p].face===a?h+p:c;let x=zM(s.int_points1_sorted,m,a);l=null;for(let M=m;M<m+x;M++){let w=s.int_points1_sorted[M];if(w.face===a&&s.int_points2[w.id].face===s.int_points2[d.id].face){l=w;break}}if(l===null)continue;let f=d.edge_after,g=l.edge_before;if(f.bv!==2||g.bv!==2||f!==g)continue;let y=s.int_points2[d.id],b=s.int_points2[l.id],v=y.edge_after,S=b.edge_before;v.bv===2&&S.bv===2&&v===S||(y=s.int_points2[l.id],b=s.int_points2[d.id],v=y.edge_after,S=b.edge_before),v.bv===2&&S.bv===2&&v===S&&f.setOverlap(v)}})(n),toe(t,o,n.int_points1_sorted,!0),toe(e,o,n.int_points2_sorted,!1),Fwe(t,r,o,!0),Fwe(e,i,o,!1)}function OA(t,e,n,o){let r=t.clone(),i=e.clone(),s=Iwe(r,i);return LA(s),VM(r,s.int_points1_sorted),VM(i,s.int_points2_sorted),Jne(s),LA(s),OOt(r,i,s,n),o&&(function(a,c,l){(function(u,_,d,m){for(let h of _.faces){for(let p of h)u.edges.add(p);m.find(p=>p.face===h)===void 0&&u.addFace(h.first,h.last)}})(a,c,0,l.int_points2),(function(u,_,d){if(d.int_points1.length!==0)for(let m=0;m<d.int_points1.length;m++){let h=d.int_points1[m],p=d.int_points2[m];if(h.edge_before!==void 0&&h.edge_after===void 0&&p.edge_before===void 0&&p.edge_after!==void 0&&(h.edge_before.next=p.edge_after,p.edge_after.prev=h.edge_before,h.edge_after=p.edge_after,p.edge_before=h.edge_before),p.edge_before!==void 0&&p.edge_after===void 0&&h.edge_before===void 0&&h.edge_after!==void 0&&(p.edge_before.next=h.edge_after,h.edge_after.prev=p.edge_before,p.edge_after=h.edge_after,h.edge_before=p.edge_before),h.edge_before!==void 0&&h.edge_after===void 0)for(let x of d.int_points1_sorted)x!==h&&x.edge_before===void 0&&x.edge_after!==void 0&&x.pt.equalTo(h.pt)&&(h.edge_before.next=x.edge_after,x.edge_after.prev=h.edge_before,h.edge_after=x.edge_after,x.edge_before=h.edge_before);if(p.edge_before!==void 0&&p.edge_after===void 0)for(let x of d.int_points2_sorted)x!==p&&x.edge_before===void 0&&x.edge_after!==void 0&&x.pt.equalTo(p.pt)&&(p.edge_before.next=x.edge_after,x.edge_after.prev=p.edge_before,p.edge_after=x.edge_after,x.edge_before=p.edge_before)}})(0,0,l),noe(a,l.int_points1),noe(c,l.int_points2),ooe(a,l.int_points1,l.int_points2),ooe(a,l.int_points2,l.int_points1)})(r,i,s),[r,i]}function Iwe(t,e){let n={int_points1:[],int_points2:[]};for(let o of t.edges){let r=e.edges.search(o.box);for(let i of r){let s=o.shape.intersect(i.shape);for(let a of s)BM(o,a,n.int_points1),BM(i,a,n.int_points2)}}return n}function Lwe(t,e){let n=[];for(let o of t.faces)e.find(r=>r.face===o)||n.push(o);return n}function Owe(t,e){for(let n of t)n.first.bv=n.first.bvStart=n.first.bvEnd=void 0,n.first.setInclusion(e)}function FOt(t,e,n,o,r,i){let s,a,c,l=o.length,u=!1;for(let _=0;_<l;_++){let d=o[_];d.face!==s&&(a=_,s=d.face);let m,h=_,p=zM(o,_,s);m=h+p<l&&o[h+p].face===s?h+p:a;let x=zM(o,m,s);c=null;for(let y=m;y<m+x;y++){let b=o[y];if(b.face===s&&r[b.id].face===r[d.id].face){c=b;break}}if(c===null)continue;let f=d.edge_after,g=c.edge_before;if(f.bv!==Km||g.bv==Km)if(f.bv==Km||g.bv!==Km){if(f.bv===Km&&g.bv===Km&&f!=g||f.bv===C6&&g.bv===M6||f.bv===M6&&g.bv===C6){let y=f.next;for(;y!=g;)y.bvStart=void 0,y.bvEnd=void 0,y.bv=void 0,y.setInclusion(e),y=y.next}if(f.bv===Km&&g.bv===Km&&f!=g){let y,b=f.next;for(;b!=g;){if(b.bv!=Km){if(y===void 0)y=b.bv;else if(b.bv!=y)throw K0.UNRESOLVED_BOUNDARY_CONFLICT}b=b.next}y!=null&&(f.bv=y,g.bv=y);continue}if(f.bv===C6&&g.bv===M6||f.bv===M6&&g.bv===C6){let y=f;for(;y!=g;){if(y.bvStart===f.bv&&y.bvEnd===g.bv){let[b,v]=y.shape.distanceTo(e);if(b<10*Ie.DP_TOL){BM(y,v.ps,n);let S=n[n.length-1];if(S.is_vertex&Awe)S.edge_after=y,S.edge_before=y.prev,y.bvStart=Km,y.bv=void 0,y.setInclusion(e);else if(S.is_vertex&Rwe)S.edge_after=y.next,y.bvEnd=Km,y.bv=void 0,y.setInclusion(e);else{let D=e.addVertex(S.pt,y);S.edge_before=D,S.edge_after=D.next,D.setInclusion(e),D.next.bvStart=Km,D.next.bvEnd=void 0,D.next.bv=void 0,D.next.setInclusion(e)}let M=e.findEdgeByPoint(v.pe);BM(M,v.pe,r);let w=r[r.length-1];if(w.is_vertex&Awe)w.edge_after=M,w.edge_before=M.prev;else if(w.is_vertex&Rwe)w.edge_after=M.next;else{let D=r.find(I=>I.edge_after===M),A=e.addVertex(w.pt,M);w.edge_before=A,w.edge_after=A.next,D&&(D.edge_after=A),A.bvStart=void 0,A.bvEnd=Km,A.bv=void 0,A.setInclusion(t),A.next.bvStart=Km,A.next.bvEnd=void 0,A.next.bv=void 0,A.next.setInclusion(t)}LA(i),u=!0;break}}y=y.next}if(u)break;throw K0.UNRESOLVED_BOUNDARY_CONFLICT}}else g.bv=f.bv;else f.bv=g.bv}return u}function toe(t,e,n,o){if(!n)return;let r,i,s,a;for(let c=0;c<n.length;c++){if(s=n[c],s.face!==r&&(i=c,r=s.face),r.isEmpty())continue;let l,u=c,_=zM(n,c,r);l=u+_<n.length&&n[u+_].face===s.face?u+_:i,a=n[l];let d=l,m=zM(n,d,r),h=s.edge_after,p=a.edge_before;if(h.bv===C6&&p.bv===C6&&e===1||h.bv===M6&&p.bv===M6&&e===2||(h.bv===M6||p.bv===M6)&&e===3&&!o||(h.bv===C6||p.bv===C6)&&e===3&&o||h.bv===Km&&p.bv===Km&&h.overlap&IOt&&o||h.bv===Km&&p.bv===Km&&h.overlap&LOt){t.removeChain(r,h,p);for(let x=u;x<u+_;x++)n[x].edge_after=void 0;for(let x=d;x<d+m;x++)n[x].edge_before=void 0}c+=_-1}}function noe(t,e){for(let n of e)t.faces.delete(n.face),n.face=void 0,n.edge_before&&(n.edge_before.face=void 0),n.edge_after&&(n.edge_after.face=void 0)}function ooe(t,e,n){for(let o of e){if(o.edge_before===void 0||o.edge_after===void 0||o.face||o.edge_after.face||o.edge_before.face)continue;let r=o.edge_after,i=o.edge_before;try{Une.testInfiniteLoop(r)}catch{throw K0.CANNOT_COMPLETE_BOOLEAN_OPERATION}let s=t.addFace(r,i);for(let a of e)a.edge_before&&a.edge_after&&a.edge_before.face===s&&a.edge_after.face===s&&(a.face=s);for(let a of n)a.edge_before&&a.edge_after&&a.edge_before.face===s&&a.edge_after.face===s&&(a.face=s)}}function Fwe(t,e,n,o){for(let r of e){let i=r.first.bv;(n===1&&i===C6||n===3&&i===C6&&o||n===3&&i===M6&&!o||n===2&&i===M6)&&t.deleteFace(r)}}var BOt=Object.freeze({__proto__:null,BOOLEAN_INTERSECT:2,BOOLEAN_SUBTRACT:3,BOOLEAN_UNION:1,calculateIntersections:Hwe,innerClip:Nwe,intersect:kwe,outerClip:eoe,removeNotRelevantChains:toe,removeOldFaces:noe,restoreFaces:ooe,subtract:Zne,unify:function(t,e){let[n]=OA(t,e,1,!0);return n}}),zOt=RegExp("T.F..FFF.|T.F...F.."),VOt=RegExp("T........|.T.......|...T.....|....T...."),$Ot=RegExp("FT.......|F..T.....|F...T...."),WOt=RegExp("T.F..F..."),UOt=RegExp("T.F..F...|.TF..F...|..FT.F...|..F.TF..."),$M=class{constructor(){this.m=new Array(9).fill(void 0)}get I2I(){return this.m[0]}set I2I(t){this.m[0]=t}get I2B(){return this.m[1]}set I2B(t){this.m[1]=t}get I2E(){return this.m[2]}set I2E(t){this.m[2]=t}get B2I(){return this.m[3]}set B2I(t){this.m[3]=t}get B2B(){return this.m[4]}set B2B(t){this.m[4]=t}get B2E(){return this.m[5]}set B2E(t){this.m[5]=t}get E2I(){return this.m[6]}set E2I(t){this.m[6]=t}get E2B(){return this.m[7]}set E2B(t){this.m[7]=t}get E2E(){return this.m[8]}set E2E(t){this.m[8]=t}toString(){return this.m.map(t=>t instanceof Array&&t.length>0?"T":t instanceof Array&&t.length===0?"F":"*").join("")}equal(){return zOt.test(this.toString())}intersect(){return VOt.test(this.toString())}touch(){return $Ot.test(this.toString())}inside(){return WOt.test(this.toString())}covered(){return UOt.test(this.toString())}};function FA(t,e){let n,o=new Ie.Ray(e),r=new Ie.Line(o.pt,o.norm);const i=new Ie.Box(o.box.xmin-Ie.DP_TOL,o.box.ymin-Ie.DP_TOL,o.box.xmax+Ie.DP_TOL,o.box.ymax+Ie.DP_TOL);if(t.box.not_intersect(i))return Ie.OUTSIDE;let s=t.edges.search(i);if(s.length===0)return Ie.OUTSIDE;for(let u of s)if(u.shape.contains(e))return Ie.BOUNDARY;let a=[...t.faces],c=[];for(let u of s)for(let _ of o.intersect(u.shape)){if(_.equalTo(e))return Ie.BOUNDARY;c.push({pt:_,edge:u,face_index:a.indexOf(u.face)})}c.sort((u,_)=>hwe(u.pt.x,_.pt.x)?-1:dwe(u.pt.x,_.pt.x)?1:u.face_index<_.face_index?-1:u.face_index>_.face_index?1:u.edge.arc_length<_.edge.arc_length?-1:u.edge.arc_length>_.edge.arc_length?1:0);let l=0;for(let u=0;u<c.length;u++){let _=c[u];if(_.pt.equalTo(_.edge.shape.start)){if(u>0&&_.pt.equalTo(c[u-1].pt)&&_.face_index===c[u-1].face_index&&_.edge.prev===c[u-1].edge)continue;let d=_.edge.prev;for(;Wne(d.length);)d=d.prev;let m=d.shape.tangentInEnd(),h=_.pt.translate(m),p=_.edge.shape.tangentInStart(),x=_.pt.translate(p),f=h.leftTo(r),g=x.leftTo(r);(f&&!g||!f&&g)&&l++}else if(_.pt.equalTo(_.edge.shape.end)){if(u>0&&_.pt.equalTo(c[u-1].pt)&&_.face_index===c[u-1].face_index&&_.edge.next===c[u-1].edge)continue;let d=_.edge.next;for(;Wne(d.length);)d=d.next;let m=d.shape.tangentInStart(),h=_.pt.translate(m),p=_.edge.shape.tangentInEnd(),x=_.pt.translate(p),f=h.leftTo(r),g=x.leftTo(r);(f&&!g||!f&&g)&&l++}else if(_.edge.shape instanceof Ie.Segment)l++;else{let d=_.edge.shape.box;rS(_.pt.y,d.ymin)||rS(_.pt.y,d.ymax)||l++}}return n=l%2==1?1:0,n}function Bwe(t,e){return WM(t,e).intersect()}function zwe(t,e){return WM(t,e).inside()}function Vwe(t,e){return WM(t,e).covered()}function $we(t,e){return Vwe(e,t)}function WM(t,e){return t instanceof Ie.Line&&e instanceof Ie.Line?(function(n,o){let r=new $M,i=IM(n,o);return i.length===0?n.contains(o.pt)&&o.contains(n.pt)?(r.I2I=[n],r.I2E=[],r.E2I=[]):(r.I2I=[],r.I2E=[n],r.E2I=[o]):(r.I2I=i,r.I2E=n.split(i),r.E2I=o.split(i)),r})(t,e):t instanceof Ie.Line&&e instanceof Ie.Circle?(function(n,o){let r=new $M,i=sS(n,o);if(i.length===0)r.I2I=[],r.I2B=[],r.I2E=[n],r.E2I=[o];else if(i.length===1)r.I2I=[],r.I2B=i,r.I2E=n.split(i),r.E2I=[o];else{let s=new aS([n]),a=n.sortPoints(i);s.split(a);let c=s.toShapes();r.I2I=[c[1]],r.I2B=a,r.I2E=[c[0],c[2]],r.E2I=new Ie.Polygon([o.toArc()]).cutWithLine(n)}return r})(t,e):t instanceof Ie.Line&&e instanceof Ie.Box?(function(n,o){let r=new $M,i=LM(n,o);if(i.length===0)r.I2I=[],r.I2B=[],r.I2E=[n],r.E2I=[o];else if(i.length===1)r.I2I=[],r.I2B=i,r.I2E=n.split(i),r.E2I=[o];else{let s=new aS([n]),a=n.sortPoints(i);s.split(a);let c=s.toShapes();o.toSegments().some(l=>l.contains(i[0])&&l.contains(i[1]))?(r.I2I=[],r.I2B=[c[1]],r.I2E=[c[0],c[2]],r.E2I=[o]):(r.I2I=[c[1]],r.I2B=a,r.I2E=[c[0],c[2]],r.E2I=new Ie.Polygon(o.toSegments()).cutWithLine(n))}return r})(t,e):t instanceof Ie.Line&&e instanceof Ie.Polygon?(function(n,o){let r=new $M,i=IA(n,o),s=new aS([n]),a=i.length>0?i.slice():n.sortPoints(i);return s.split(a),[...s].forEach(c=>c.setInclusion(o)),r.I2I=[...s].filter(c=>c.bv===Ie.INSIDE).map(c=>c.shape),r.I2B=[...s].slice(1).map(c=>c.bv===Ie.BOUNDARY?c.shape:c.shape.start),r.I2E=[...s].filter(c=>c.bv===Ie.OUTSIDE).map(c=>c.shape),r.E2I=o.cutWithLine(n),r})(t,e):(t instanceof Ie.Segment||t instanceof Ie.Arc)&&e instanceof Ie.Polygon?Wwe(t,e):(t instanceof Ie.Segment||t instanceof Ie.Arc)&&(e instanceof Ie.Circle||e instanceof Ie.Box)?Wwe(t,new Ie.Polygon(e)):t instanceof Ie.Polygon&&e instanceof Ie.Polygon?Kz(t,e):(t instanceof Ie.Circle||t instanceof Ie.Box)&&(e instanceof Ie.Circle||e instanceof Ie.Box)?Kz(new Ie.Polygon(t),new Ie.Polygon(e)):(t instanceof Ie.Circle||t instanceof Ie.Box)&&e instanceof Ie.Polygon?Kz(new Ie.Polygon(t),e):t instanceof Ie.Polygon&&(e instanceof Ie.Circle||e instanceof Ie.Box)?Kz(t,new Ie.Polygon(e)):void 0}function Wwe(t,e){let n=new $M,o=(function(s,a){return s instanceof Ie.Line?IA(s,a):s instanceof Ie.Segment?jne(s,a):s instanceof Ie.Arc?Gne(s,a):[]})(t,e),r=o.length>0?o.slice():t.sortPoints(o),i=new aS([t]);i.split(r),[...i].forEach(s=>s.setInclusion(e)),n.I2I=[...i].filter(s=>s.bv===Ie.INSIDE).map(s=>s.shape),n.I2B=[...i].slice(1).map(s=>s.bv===Ie.BOUNDARY?s.shape:s.shape.start),n.I2E=[...i].filter(s=>s.bv===Ie.OUTSIDE).map(s=>s.shape),n.B2I=[],n.B2B=[],n.B2E=[];for(let s of[t.start,t.end])switch(FA(e,s)){case Ie.INSIDE:n.B2I.push(s);break;case Ie.BOUNDARY:n.B2B.push(s);break;case Ie.OUTSIDE:n.B2E.push(s)}return n}function Kz(t,e){let n=new $M,[o,r]=Hwe(t,e),i=kwe(t,e),s=Zne(t,e),a=Zne(e,t),[c,l]=Nwe(t,e),u=eoe(t,e),_=eoe(e,t);return n.I2I=i.isEmpty()?[]:[i],n.I2B=l,n.I2E=s.isEmpty()?[]:[s],n.B2I=c,n.B2B=o,n.B2E=u,n.E2I=a.isEmpty()?[]:[a],n.E2B=_,n}var XOt=Object.freeze({__proto__:null,contain:function(t,e){return zwe(e,t)},cover:$we,covered:Vwe,disjoint:function(t,e){return!Bwe(t,e)},equal:function(t,e){return WM(t,e).equal()},inside:zwe,intersect:Bwe,relate:WM,touch:function(t,e){return WM(t,e).touch()}}),BA=class NC{constructor(e=1,n=0,o=0,r=1,i=0,s=0){this.a=e,this.b=n,this.c=o,this.d=r,this.tx=i,this.ty=s}fromMatrix3x3(e){const[n,o,r]=e[0],[i,s,a]=e[1];return new NC(n,i,o,s,r,a)}toMatrix3x3(){return[[this.a,this.c,this.tx],[this.b,this.d,this.ty],[0,0,1]]}clone(){return new NC(this.a,this.b,this.c,this.d,this.tx,this.ty)}transform(e){return[e[0]*this.a+e[1]*this.c+this.tx,e[0]*this.b+e[1]*this.d+this.ty]}multiply(e){return new NC(this.a*e.a+this.c*e.b,this.b*e.a+this.d*e.b,this.a*e.c+this.c*e.d,this.b*e.c+this.d*e.d,this.a*e.tx+this.c*e.ty+this.tx,this.b*e.tx+this.d*e.ty+this.ty)}translate(...e){let n,o;if(e.length!=1||isNaN(e[0].x)||isNaN(e[0].y)){if(e.length!==2||typeof e[0]!="number"||typeof e[1]!="number")throw K0.ILLEGAL_PARAMETERS;n=e[0],o=e[1]}else n=e[0].x,o=e[0].y;return this.multiply(new NC(1,0,0,1,n,o))}rotate(e,n=0,o=0){let r=Math.cos(e),i=Math.sin(e);return this.translate(n,o).multiply(new NC(r,i,-i,r,0,0)).translate(-n,-o)}scale(e,n){return this.multiply(new NC(e,0,0,n,0,0))}equalTo(e){return!!Ie.Utils.EQ(this.tx,e.tx)&&!!Ie.Utils.EQ(this.ty,e.ty)&&!!Ie.Utils.EQ(this.a,e.a)&&!!Ie.Utils.EQ(this.b,e.b)&&!!Ie.Utils.EQ(this.c,e.c)&&!!Ie.Utils.EQ(this.d,e.d)}};Ie.Matrix=BA,Ie.matrix=(...t)=>new Ie.Matrix(...t);var jOt=class{constructor(t,e){this.low=t,this.high=e}get max(){return this.clone()}less_than(t){return this.low<t.low||this.low===t.low&&this.high<t.high}equal_to(t){return this.low===t.low&&this.high===t.high}intersect(t){return!this.not_intersect(t)}not_intersect(t){return this.high<t.low||t.high<this.low}merge(t){const e=this.low===void 0?t.low:this.low<t.low?this.low:t.low,n=this.high===void 0?t.high:this.high>t.high?this.high:t.high,o=this.clone();return o.low=e,o.high=n,o}output(){return[this.low,this.high]}comparable_less_than(t,e){return t<e}},GOt=class I1t extends jOt{clone(){return new I1t(this.low,this.high)}},oP=class{constructor(t,e,n=null,o=null,r=null,i=0){if(this.left=n,this.right=o,this.parent=r,this.color=i,this.item={key:void 0,values:[]},e!==void 0&&this.item.values.push(e),t!==void 0)if(Array.isArray(t)){const[s,a]=t;if(!Number.isNaN(s)&&!Number.isNaN(a)){let c=s,l=a;c>l&&([c,l]=[l,c]),this.item.key=new GOt(c,l)}}else this.item.key=t;this.max=this.item.key?this.item.key.max:void 0}isNil(){return this.item.key===void 0&&this.item.values.length===0&&this.left===null&&this.right===null&&this.color===0}requireKey(){if(!this.item.key)throw new Error("Node key is undefined (nil/sentinel). Operation is not applicable.");return this.item.key}less_than(t){const e=this.requireKey(),n=t.requireKey();return e.less_than(n)}_value_equal(t){const e=this.item.values[0],n=t.item.values[0];return e&&n&&e.equal_to?e.equal_to(n):e===n}equal_to(t){const e=this.requireKey(),n=t.requireKey();return e.equal_to(n)}intersect(t){const e=this.requireKey(),n=t.requireKey();return e.intersect(n)}copy_data(t){this.item.key=t.item.key,this.item.values=t.item.values.slice()}update_max(){this.max=this.item.key?this.item.key.max:void 0,this.right&&this.right.max&&(this.max=this.max?this.max.merge(this.right.max):this.right.max),this.left&&this.left.max&&(this.max=this.max?this.max.merge(this.left.max):this.left.max)}not_intersect_left_subtree(t){if(!this.left)return!0;const e=this.left.max?this.left.max.high:this.left.item.key.high,n=this.requireKey(),o=t.requireKey();return n.comparable_less_than(e,o.low)}not_intersect_right_subtree(t){if(!this.right)return!0;const e=this.right.max?this.right.max.low:this.right.item.key.low,n=this.requireKey(),o=t.requireKey();return n.comparable_less_than(o.high,e)}},roe=class L1t{constructor(){this.root=null,this.nil_node=new oP}get size(){let e=0;return this.tree_walk(this.root,n=>e+=n.item.values.length),e}get keys(){const e=[];return this.tree_walk(this.root,n=>e.push(n.item.key.output())),e}get values(){const e=[];return this.tree_walk(this.root,n=>{for(const o of n.item.values)e.push(o)}),e}get items(){const e=[];return this.tree_walk(this.root,n=>{const o=n.item.key.output();for(const r of n.item.values)e.push({key:o,value:r})}),e}isEmpty(){return this.root==null||this.root===this.nil_node}clear(){this.root=null}insert(e,n=e){if(e===void 0)return;const o=this.tree_search(this.root,new oP(e));if(o)return o.item.values.push(n),o;const r=new oP(e,n,this.nil_node,this.nil_node,null,1);return this.tree_insert(r),this.recalc_max(r),r}exist(e,n=e){const o=this.tree_search(this.root,new oP(e));return!!o&&(arguments.length<2||n===e||o.item.values.some(r=>r&&r.equal_to?r.equal_to(n):r===n))}remove(e,n=e){const o=this.tree_search(this.root,new oP(e));if(!o)return;if(arguments.length<2)return this.tree_delete(o),o;const r=o.item.values.findIndex(i=>i&&i.equal_to?i.equal_to(n):i===n);return r>=0?(o.item.values.splice(r,1),o.item.values.length===0&&this.tree_delete(o),o):void 0}search(e,n=(o,r)=>o===r?r.output():o){const o=new oP(e),r=[];this.tree_search_interval(this.root,o,r);const i=[];for(const s of r)for(const a of s.item.values)i.push(n(a,s.item.key));return i}intersect_any(e){const n=new oP(e);return this.tree_find_any_interval(this.root,n)}forEach(e){this.tree_walk(this.root,n=>{for(const o of n.item.values)e(n.item.key,o)})}map(e){const n=new L1t;return this.tree_walk(this.root,o=>{for(const r of o.item.values)n.insert(o.item.key,e(r,o.item.key))}),n}*iterate(e,n=(o,r)=>o===r?r.output():o){let o=null;for(e?o=this.tree_search_nearest_forward(this.root,new oP(e)):this.root&&(o=this.local_minimum(this.root));o;){for(const r of o.item.values)yield n(r,o.item.key);o=this.tree_successor(o)}}recalc_max(e){let n=e;for(;n.parent!=null;)n.parent.update_max(),n=n.parent}tree_insert(e){let n=this.root,o=null;if(this.root==null||this.root===this.nil_node)this.root=e;else{for(;n!==this.nil_node;)o=n,n=e.less_than(n)?n.left:n.right;e.parent=o,e.less_than(o)?o.left=e:o.right=e}this.insert_fixup(e)}insert_fixup(e){let n,o;for(n=e;n!==this.root&&n.parent.color===1;)n.parent===n.parent.parent.left?(o=n.parent.parent.right,o.color===1?(n.parent.color=0,o.color=0,n.parent.parent.color=1,n=n.parent.parent):(n===n.parent.right&&(n=n.parent,this.rotate_left(n)),n.parent.color=0,n.parent.parent.color=1,this.rotate_right(n.parent.parent))):(o=n.parent.parent.left,o.color===1?(n.parent.color=0,o.color=0,n.parent.parent.color=1,n=n.parent.parent):(n===n.parent.left&&(n=n.parent,this.rotate_right(n)),n.parent.color=0,n.parent.parent.color=1,this.rotate_left(n.parent.parent)));this.root.color=0}tree_delete(e){let n,o;n=e.left===this.nil_node||e.right===this.nil_node?e:this.tree_successor(e),o=n.left!==this.nil_node?n.left:n.right,o.parent=n.parent,n===this.root?this.root=o:(n===n.parent.left?n.parent.left=o:n.parent.right=o,n.parent.update_max()),this.recalc_max(o),n!==e&&(e.copy_data(n),e.update_max(),this.recalc_max(e)),n.color===0&&this.delete_fixup(o)}delete_fixup(e){let n,o=e;for(;o!==this.root&&o.parent!=null&&o.color===0;)o===o.parent.left?(n=o.parent.right,n.color===1&&(n.color=0,o.parent.color=1,this.rotate_left(o.parent),n=o.parent.right),n.left.color===0&&n.right.color===0?(n.color=1,o=o.parent):(n.right.color===0&&(n.color=1,n.left.color=0,this.rotate_right(n),n=o.parent.right),n.color=o.parent.color,o.parent.color=0,n.right.color=0,this.rotate_left(o.parent),o=this.root)):(n=o.parent.left,n.color===1&&(n.color=0,o.parent.color=1,this.rotate_right(o.parent),n=o.parent.left),n.left.color===0&&n.right.color===0?(n.color=1,o=o.parent):(n.left.color===0&&(n.color=1,n.right.color=0,this.rotate_left(n),n=o.parent.left),n.color=o.parent.color,o.parent.color=0,n.left.color=0,this.rotate_right(o.parent),o=this.root));o.color=0}tree_search(e,n){if(e!=null&&e!==this.nil_node)return n.equal_to(e)?e:n.less_than(e)?this.tree_search(e.left,n):this.tree_search(e.right,n)}tree_search_nearest_forward(e,n){let o=null,r=e;for(;r&&r!==this.nil_node;)r.less_than(n)?r.intersect(n)?(o=r,r=r.left):r=r.right:(o&&!r.less_than(o)||(o=r),r=r.left);return o||null}tree_search_interval(e,n,o){e!=null&&e!==this.nil_node&&(e.left===this.nil_node||e.not_intersect_left_subtree(n)||this.tree_search_interval(e.left,n,o),e.intersect(n)&&o.push(e),e.right===this.nil_node||e.not_intersect_right_subtree(n)||this.tree_search_interval(e.right,n,o))}tree_find_any_interval(e,n){let o=!1;return e!=null&&e!==this.nil_node&&(e.left===this.nil_node||e.not_intersect_left_subtree(n)||(o=this.tree_find_any_interval(e.left,n)),o||(o=e.intersect(n)),o||e.right===this.nil_node||e.not_intersect_right_subtree(n)||(o=this.tree_find_any_interval(e.right,n))),o}local_minimum(e){let n=e;for(;n.left!=null&&n.left!==this.nil_node;)n=n.left;return n}local_maximum(e){let n=e;for(;n.right!=null&&n.right!==this.nil_node;)n=n.right;return n}tree_successor(e){let n,o,r;if(e.right!==this.nil_node)n=this.local_minimum(e.right);else{for(o=e,r=e.parent;r!=null&&r.right===o;)o=r,r=r.parent;n=r}return n}rotate_left(e){const n=e.right;e.right=n.left,n.left!==this.nil_node&&(n.left.parent=e),n.parent=e.parent,e===this.root?this.root=n:e===e.parent.left?e.parent.left=n:e.parent.right=n,n.left=e,e.parent=n,e!==null&&e!==this.nil_node&&e.update_max(),n!=null&&n!==this.nil_node&&n.update_max()}rotate_right(e){const n=e.left;e.left=n.right,n.right!==this.nil_node&&(n.right.parent=e),n.parent=e.parent,e===this.root?this.root=n:e===e.parent.left?e.parent.left=n:e.parent.right=n,n.right=e,e.parent=n,e!==null&&e!==this.nil_node&&e.update_max(),n!=null&&n!==this.nil_node&&n.update_max()}tree_walk(e,n){e!=null&&e!==this.nil_node&&(this.tree_walk(e.left,n),n(e),this.tree_walk(e.right,n))}testRedBlackProperty(){let e=!0;return this.tree_walk(this.root,function(n){n.color===1&&(n.left.color===0&&n.right.color===0||(e=!1))}),e}testBlackHeightProperty(e){let n=0,o=0,r=0;if(e.color===0&&n++,o=e.left!==this.nil_node?this.testBlackHeightProperty(e.left):1,r=e.right!==this.nil_node?this.testBlackHeightProperty(e.right):1,o!==r)throw new Error("Red-black height property violated");return n+=o,n}},YOt=class extends Set{constructor(t){super(t),this.index=new roe,this.forEach(e=>this.index.insert(e))}add(t){let e=this.size;const{key:n,value:o}=t,r=n||t.box,i=o||t;return super.add(i),this.size>e&&this.index.insert(r,i),this}delete(t){const{key:e,value:n}=t,o=e||t.box,r=n||t;let i=super.delete(r);return i&&this.index.remove(o,r),i}clear(){super.clear(),this.index=new roe}search(t){return this.index.search(t)}hit(t){let e=new Ie.Box(t.x-1,t.y-1,t.x+1,t.y+1);return this.index.search(e).filter(n=>t.on(n))}svg(){return[...this].reduce((t,e)=>t+e.svg(),"")}};Ie.PlanarSet=YOt;var rP=class{get name(){throw K0.CANNOT_INVOKE_ABSTRACT_METHOD}get box(){throw K0.CANNOT_INVOKE_ABSTRACT_METHOD}clone(){throw K0.CANNOT_INVOKE_ABSTRACT_METHOD}translate(...t){return this.transform(new BA().translate(...t))}rotate(t,e=new Ie.Point){return this.transform(new BA().rotate(t,e.x,e.y))}scale(t,e){return this.transform(new BA().scale(t,e))}transform(...t){throw K0.CANNOT_INVOKE_ABSTRACT_METHOD}toJSON(){return Object.assign({},this,{name:this.name})}svg(t={}){throw K0.CANNOT_INVOKE_ABSTRACT_METHOD}};Ie.Point=class O1t extends rP{constructor(...e){if(super(),this.x=0,this.y=0,e.length!==0){if(e.length===1&&e[0]instanceof Array&&e[0].length===2){let n=e[0];if(typeof n[0]=="number"&&typeof n[1]=="number")return this.x=n[0],void(this.y=n[1])}if(e.length===1&&e[0]instanceof Object&&e[0].name==="point"){let{x:n,y:o}=e[0];return this.x=n,void(this.y=o)}if(e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number")return this.x=e[0],void(this.y=e[1]);throw K0.ILLEGAL_PARAMETERS}}get box(){return new Ie.Box(this.x,this.y,this.x,this.y)}clone(){return new Ie.Point(this.x,this.y)}get vertices(){return[this.clone()]}equalTo(e){return Ie.Utils.EQ(this.x,e.x)&&Ie.Utils.EQ(this.y,e.y)}lessThan(e){return!!Ie.Utils.LT(this.y,e.y)||!(!Ie.Utils.EQ(this.y,e.y)||!Ie.Utils.LT(this.x,e.x))}transform(e){return new Ie.Point(e.transform([this.x,this.y]))}projectionOn(e){if(this.equalTo(e.pt))return this.clone();let n=new Ie.Vector(this,e.pt);if(Ie.Utils.EQ_0(n.cross(e.norm)))return e.pt.clone();let o=n.dot(e.norm),r=e.norm.multiply(o);return this.translate(r)}leftTo(e){let n=new Ie.Vector(e.pt,this);return Ie.Utils.GT(n.dot(e.norm),0)}distanceTo(e){if(e instanceof O1t){let n=e.x-this.x,o=e.y-this.y;return[Math.sqrt(n*n+o*o),new Ie.Segment(this,e)]}return e instanceof Ie.Line?Ie.Distance.point2line(this,e):e instanceof Ie.Circle?Ie.Distance.point2circle(this,e):e instanceof Ie.Segment?Ie.Distance.point2segment(this,e):e instanceof Ie.Arc?Ie.Distance.point2arc(this,e):e instanceof Ie.Polygon?Ie.Distance.point2polygon(this,e):e instanceof Ie.PlanarSet?Ie.Distance.shape2planarSet(this,e):e instanceof Ie.Multiline?Ie.Distance.shape2multiline(this,e):void 0}on(e){if(e instanceof Ie.Point)return this.equalTo(e);if(e.contains&&e.contains instanceof Function)return e.contains(this);throw Ie.Errors.UNSUPPORTED_SHAPE_TYPE}get name(){return"point"}svg(e={}){const n=e.r??3;return`
|
|
665
665
|
<circle cx="${this.x}" cy="${this.y}" r="${n}"
|
|
666
666
|
${iS({fill:"red",...e})} />`}},Ie.point=(...t)=>new Ie.Point(...t),Ie.Vector=class extends rP{constructor(...t){if(super(),this.x=0,this.y=0,t.length!==0){if(t.length===1&&t[0]instanceof Array&&t[0].length===2){let e=t[0];if(typeof e[0]=="number"&&typeof e[1]=="number")return this.x=e[0],void(this.y=e[1])}if(t.length===1&&t[0]instanceof Object&&t[0].name==="vector"){let{x:e,y:n}=t[0];return this.x=e,void(this.y=n)}if(t.length===1&&t[0]instanceof Object&&t[0].name==="segment"){let{start:e,end:n}=t[0];return this.x=n.x-e.x,void(this.y=n.y-e.y)}if(t.length===2){let e=t[0],n=t[1];if(typeof e=="number"&&typeof n=="number")return this.x=e,void(this.y=n);if(e instanceof Ie.Point&&n instanceof Ie.Point)return this.x=n.x-e.x,void(this.y=n.y-e.y)}throw K0.ILLEGAL_PARAMETERS}}clone(){return new Ie.Vector(this.x,this.y)}get slope(){let t=Math.atan2(this.y,this.x);return t<0&&(t=2*Math.PI+t),t}get length(){return Math.sqrt(this.dot(this))}isZeroLength(){return Ie.Utils.EQ_0(this.length)}equalTo(t){return Ie.Utils.EQ(this.x,t.x)&&Ie.Utils.EQ(this.y,t.y)}multiply(t){return new Ie.Vector(t*this.x,t*this.y)}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}normalize(){if(this.isZeroLength())throw K0.ZERO_DIVISION;return new Ie.Vector(this.x/this.length,this.y/this.length)}rotate(t,e=new Ie.Point){if(e.x===0&&e.y===0)return this.transform(new BA().rotate(t));throw K0.OPERATION_IS_NOT_SUPPORTED}transform(t){return new Ie.Vector(t.transform([this.x,this.y]))}rotate90CCW(){return new Ie.Vector(-this.y,this.x)}rotate90CW(){return new Ie.Vector(this.y,-this.x)}invert(){return new Ie.Vector(-this.x,-this.y)}add(t){return new Ie.Vector(this.x+t.x,this.y+t.y)}subtract(t){return new Ie.Vector(this.x-t.x,this.y-t.y)}angleTo(t){let e=this.normalize(),n=t.normalize(),o=Math.atan2(e.cross(n),e.dot(n));return o<0&&(o+=2*Math.PI),o}projectionOn(t){let e=t.normalize(),n=this.dot(e);return e.multiply(n)}get name(){return"vector"}};var Uwe=(...t)=>new Ie.Vector(...t);Ie.vector=Uwe,Ie.Segment=class N4e extends rP{constructor(...e){if(super(),this.ps=new Ie.Point,this.pe=new Ie.Point,e.length!==0){if(e.length===1&&e[0]instanceof Array&&e[0].length===4){let n=e[0];return this.ps=new Ie.Point(n[0],n[1]),void(this.pe=new Ie.Point(n[2],n[3]))}if(e.length===1&&e[0]instanceof Object&&e[0].name==="segment"){let{ps:n,pe:o}=e[0];return this.ps=new Ie.Point(n.x,n.y),void(this.pe=new Ie.Point(o.x,o.y))}if(!(e.length===1&&e[0]instanceof Ie.Point)){if(e.length===2&&e[0]instanceof Ie.Point&&e[1]instanceof Ie.Point)return this.ps=e[0].clone(),void(this.pe=e[1].clone());if(e.length===4)return this.ps=new Ie.Point(e[0],e[1]),void(this.pe=new Ie.Point(e[2],e[3]));throw K0.ILLEGAL_PARAMETERS}this.ps=e[0].clone()}}clone(){return new Ie.Segment(this.start,this.end)}get start(){return this.ps}get end(){return this.pe}get vertices(){return[this.ps.clone(),this.pe.clone()]}get length(){return this.start.distanceTo(this.end)[0]}get slope(){return new Ie.Vector(this.start,this.end).slope}get box(){return new Ie.Box(Math.min(this.start.x,this.end.x),Math.min(this.start.y,this.end.y),Math.max(this.start.x,this.end.x),Math.max(this.start.y,this.end.y))}equalTo(e){return this.ps.equalTo(e.ps)&&this.pe.equalTo(e.pe)}contains(e){return Ie.Utils.EQ_0(this.distanceToPoint(e))}intersect(e){return e instanceof Ie.Point?this.contains(e)?[e]:[]:e instanceof Ie.Line?HA(this,e):e instanceof Ie.Ray?Yne(e,this):e instanceof Ie.Segment?qz(this,e):e instanceof Ie.Circle?Jz(this,e):e instanceof Ie.Box?(function(n,o){let r=[];for(let i of o.toSegments()){let s=qz(i,n);for(let a of s)r.push(a)}return r})(this,e):e instanceof Ie.Arc?OM(this,e):e instanceof Ie.Polygon?jne(this,e):e instanceof Ie.Multiline?FM(this,e):void 0}distanceTo(e){if(e instanceof Ie.Point){let[n,o]=Ie.Distance.point2segment(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ie.Circle){let[n,o]=Ie.Distance.segment2circle(this,e);return[n,o]}if(e instanceof Ie.Line){let[n,o]=Ie.Distance.segment2line(this,e);return[n,o]}if(e instanceof Ie.Segment){let[n,o]=Ie.Distance.segment2segment(this,e);return[n,o]}if(e instanceof Ie.Arc){let[n,o]=Ie.Distance.segment2arc(this,e);return[n,o]}if(e instanceof Ie.Polygon){let[n,o]=Ie.Distance.shape2polygon(this,e);return[n,o]}if(e instanceof Ie.PlanarSet){let[n,o]=Ie.Distance.shape2planarSet(this,e);return[n,o]}if(e instanceof Ie.Multiline)return Ie.Distance.shape2multiline(this,e)}tangentInStart(){return new Ie.Vector(this.start,this.end).normalize()}tangentInEnd(){return new Ie.Vector(this.end,this.start).normalize()}reverse(){return new N4e(this.end,this.start)}split(e){return this.start.equalTo(e)?[null,this.clone()]:this.end.equalTo(e)?[this.clone(),null]:[new Ie.Segment(this.start,e),new Ie.Segment(e,this.end)]}middle(){return new Ie.Point((this.start.x+this.end.x)/2,(this.start.y+this.end.y)/2)}pointAtLength(e){if(e>this.length||e<0)return null;if(e==0)return this.start;if(e==this.length)return this.end;let n=e/this.length;return new Ie.Point((this.end.x-this.start.x)*n+this.start.x,(this.end.y-this.start.y)*n+this.start.y)}distanceToPoint(e){let[n,...o]=Ie.Distance.point2segment(e,this);return n}definiteIntegral(e=0){return(this.end.x-this.start.x)*(this.start.y-e+(this.end.y-e))/2}transform(e=new Ie.Matrix){return new N4e(this.ps.transform(e),this.pe.transform(e))}isZeroLength(){return this.ps.equalTo(this.pe)}sortPoints(e){return new Ie.Line(this.start,this.end).sortPoints(e)}get name(){return"segment"}svg(e={}){return`
|
|
667
667
|
<line x1="${this.start.x}" y1="${this.start.y}" x2="${this.end.x}" y2="${this.end.y}" ${iS(e)} />`}},Ie.segment=(...t)=>new Ie.Segment(...t);var{vector:zA}=Ie;Ie.Line=class F1t extends rP{constructor(...e){if(super(),this.pt=new Ie.Point,this.norm=new Ie.Vector(0,1),e.length!==0){if(e.length===1&&e[0]instanceof Object&&e[0].name==="line"){let{pt:n,norm:o}=e[0];return this.pt=new Ie.Point(n),void(this.norm=new Ie.Vector(o))}if(e.length===2){let n=e[0],o=e[1];if(n instanceof Ie.Point&&o instanceof Ie.Point)return this.pt=n,this.norm=F1t.points2norm(n,o),void(this.norm.dot(zA(this.pt.x,this.pt.y))>=0&&this.norm.invert());if(n instanceof Ie.Point&&o instanceof Ie.Vector){if(Ie.Utils.EQ_0(o.x)&&Ie.Utils.EQ_0(o.y))throw K0.ILLEGAL_PARAMETERS;return this.pt=n.clone(),this.norm=o.clone(),this.norm=this.norm.normalize(),void(this.norm.dot(zA(this.pt.x,this.pt.y))>=0&&this.norm.invert())}if(n instanceof Ie.Vector&&o instanceof Ie.Point){if(Ie.Utils.EQ_0(n.x)&&Ie.Utils.EQ_0(n.y))throw K0.ILLEGAL_PARAMETERS;return this.pt=o.clone(),this.norm=n.clone(),this.norm=this.norm.normalize(),void(this.norm.dot(zA(this.pt.x,this.pt.y))>=0&&this.norm.invert())}}throw K0.ILLEGAL_PARAMETERS}}clone(){return new Ie.Line(this.pt,this.norm)}get start(){}get end(){}get length(){return Number.POSITIVE_INFINITY}get box(){return new Ie.Box(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY)}get middle(){}get slope(){return new Ie.Vector(this.norm.y,-this.norm.x).slope}get standard(){return[this.norm.x,this.norm.y,this.norm.dot(zA(this.pt.x,this.pt.y))]}parallelTo(e){return Ie.Utils.EQ_0(this.norm.cross(e.norm))}incidentTo(e){return this.parallelTo(e)&&this.pt.on(e)}contains(e){if(this.pt.equalTo(e))return!0;let n=new Ie.Vector(this.pt,e);return Ie.Utils.EQ_0(this.norm.dot(n))}coord(e){return zA(e.x,e.y).cross(this.norm)}intersect(e){return e instanceof Ie.Point?this.contains(e)?[e]:[]:e instanceof Ie.Line?IM(this,e):e instanceof Ie.Ray?Twe(e,this):e instanceof Ie.Circle?sS(this,e):e instanceof Ie.Box?LM(this,e):e instanceof Ie.Segment?HA(e,this):e instanceof Ie.Arc?Yz(this,e):e instanceof Ie.Polygon?IA(this,e):e instanceof Ie.Multiline?FM(this,e):void 0}distanceTo(e){if(e instanceof Ie.Point){let[n,o]=Ie.Distance.point2line(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ie.Circle){let[n,o]=Ie.Distance.circle2line(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ie.Segment){let[n,o]=Ie.Distance.segment2line(e,this);return[n,o.reverse()]}if(e instanceof Ie.Arc){let[n,o]=Ie.Distance.arc2line(e,this);return[n,o.reverse()]}if(e instanceof Ie.Polygon){let[n,o]=Ie.Distance.shape2polygon(this,e);return[n,o]}}split(e){if(e instanceof Ie.Point)return[new Ie.Ray(e,this.norm),new Ie.Ray(e,this.norm)];{let n=new Ie.Multiline([this]),o=this.sortPoints(e);return n.split(o),n.toShapes()}}rotate(e,n=new Ie.Point){return new Ie.Line(this.pt.rotate(e,n),this.norm.rotate(e))}transform(e){return new Ie.Line(this.pt.transform(e),this.norm.clone())}sortPoints(e){return e.slice().sort((n,o)=>this.coord(n)<this.coord(o)?-1:this.coord(n)>this.coord(o)?1:0)}get name(){return"line"}svg(e,n={}){let o=LM(this,e);if(o.length===0)return"";let r=o[0],i=o.length===2?o[1]:o.find(s=>!s.equalTo(r));return i===void 0&&(i=r),new Ie.Segment(r,i).svg(n)}static points2norm(e,n){if(e.equalTo(n))throw K0.ILLEGAL_PARAMETERS;return new Ie.Vector(e,n).normalize().rotate90CCW()}},Ie.line=(...t)=>new Ie.Line(...t),Ie.Circle=class extends rP{constructor(...t){if(super(),this.pc=new Ie.Point,this.r=1,t.length===1&&t[0]instanceof Object&&t[0].name==="circle"){let{pc:e,r:n}=t[0];this.pc=new Ie.Point(e),this.r=n}else{let[e,n]=[...t];e&&e instanceof Ie.Point&&(this.pc=e.clone()),n!==void 0&&(this.r=n)}}clone(){return new Ie.Circle(this.pc.clone(),this.r)}get center(){return this.pc}get box(){return new Ie.Box(this.pc.x-this.r,this.pc.y-this.r,this.pc.x+this.r,this.pc.y+this.r)}contains(t){return t instanceof Ie.Point?Ie.Utils.LE(t.distanceTo(this.center)[0],this.r):t instanceof Ie.Segment?Ie.Utils.LE(t.start.distanceTo(this.center)[0],this.r)&&Ie.Utils.LE(t.end.distanceTo(this.center)[0],this.r):t instanceof Ie.Arc?this.intersect(t).length===0&&Ie.Utils.LE(t.start.distanceTo(this.center)[0],this.r)&&Ie.Utils.LE(t.end.distanceTo(this.center)[0],this.r):t instanceof Ie.Circle?this.intersect(t).length===0&&Ie.Utils.LE(t.r,this.r)&&Ie.Utils.LE(t.center.distanceTo(this.center)[0],this.r):void 0}toArc(t=!0){return new Ie.Arc(this.center,this.r,Math.PI,-Math.PI,t)}scale(t,e){if(t!==e||this.pc.x!==0||this.pc.y!==0)throw K0.OPERATION_IS_NOT_SUPPORTED;return new Ie.Circle(this.pc,this.r*t)}transform(t=new Ie.Matrix){return new Ie.Circle(this.pc.transform(t),this.r)}intersect(t){return t instanceof Ie.Point?this.contains(t)?[t]:[]:t instanceof Ie.Line?sS(t,this):t instanceof Ie.Ray?Mwe(t,this):t instanceof Ie.Segment?Jz(t,this):t instanceof Ie.Circle?fwe(t,this):t instanceof Ie.Box?(function(e,n){let o=[];for(let r of n.toSegments()){let i=Jz(r,e);for(let s of i)o.push(s)}return o})(this,t):t instanceof Ie.Arc?Xne(t,this):t instanceof Ie.Polygon?Pwe(this,t):t instanceof Ie.Multiline?FM(this,t):void 0}distanceTo(t){if(t instanceof Ie.Point){let[e,n]=Ie.Distance.point2circle(t,this);return n=n.reverse(),[e,n]}if(t instanceof Ie.Circle){let[e,n]=Ie.Distance.circle2circle(this,t);return[e,n]}if(t instanceof Ie.Line){let[e,n]=Ie.Distance.circle2line(this,t);return[e,n]}if(t instanceof Ie.Segment){let[e,n]=Ie.Distance.segment2circle(t,this);return n=n.reverse(),[e,n]}if(t instanceof Ie.Arc){let[e,n]=Ie.Distance.arc2circle(t,this);return n=n.reverse(),[e,n]}if(t instanceof Ie.Polygon){let[e,n]=Ie.Distance.shape2polygon(this,t);return[e,n]}if(t instanceof Ie.PlanarSet){let[e,n]=Ie.Distance.shape2planarSet(this,t);return[e,n]}if(t instanceof Ie.Multiline){let[e,n]=Ie.Distance.shape2multiline(this,t);return[e,n]}}get name(){return"circle"}svg(t={}){return`
|
|
@@ -682,7 +682,7 @@ ${o.svg()}`;return n+=`" >
|
|
|
682
682
|
`).map(o=>o.match(/\(([^)]+)\)/)[1]).map(coe).reduce((o,r)=>[...o,...r],[])})(e):[]},Ie.BooleanOperations=BOt,Ie.Relations=XOt,cS=uOt(),Zwe=1,loe=cS!=null?ZLt(tOt(cS)):{},((t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of XTe(e))nOt.call(t,r)||r===n||UTe(t,r,{get:()=>e[r],enumerable:!(o=eOt(e,r))||o.enumerable})})(!Zwe&&cS&&cS.__esModule?loe:UTe(loe,"default",{value:cS,enumerable:!0}),cS);var cS,Zwe,loe,ZOt=Object.create,eEe=Object.defineProperty,eFt=Object.getOwnPropertyDescriptor,tEe=Object.getOwnPropertyNames,tFt=Object.getPrototypeOf,nFt=Object.prototype.hasOwnProperty,lS=(t,e)=>function(){return e||(0,t[tEe(t)[0]])((e={exports:{}}).exports,e),e.exports},nEe=(t,e,n)=>(n=t!=null?ZOt(tFt(t)):{},((o,r,i,s)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of tEe(r))nFt.call(o,a)||a===i||eEe(o,a,{get:()=>r[a],enumerable:!(s=eFt(r,a))||s.enumerable});return o})(t&&t.__esModule?n:eEe(n,"default",{value:t,enumerable:!0}),t)),oFt=lS({"node_modules/is-buffer/index.js"(t,e){function n(o){return!!o.constructor&&typeof o.constructor.isBuffer=="function"&&o.constructor.isBuffer(o)}e.exports=function(o){return o!=null&&(n(o)||(function(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&n(r.slice(0,0))})(o)||!!o._isBuffer)}}}),rFt=lS({"node_modules/kind-of/index.js"(t,e){var n=oFt(),o=Object.prototype.toString;e.exports=function(r){if(r===void 0)return"undefined";if(r===null)return"null";if(r===!0||r===!1||r instanceof Boolean)return"boolean";if(typeof r=="string"||r instanceof String)return"string";if(typeof r=="number"||r instanceof Number)return"number";if(typeof r=="function"||r instanceof Function)return"function";if(Array.isArray!==void 0&&Array.isArray(r))return"array";if(r instanceof RegExp)return"regexp";if(r instanceof Date)return"date";var i=o.call(r);return i==="[object RegExp]"?"regexp":i==="[object Date]"?"date":i==="[object Arguments]"?"arguments":i==="[object Error]"?"error":n(r)?"buffer":i==="[object Set]"?"set":i==="[object WeakSet]"?"weakset":i==="[object Map]"?"map":i==="[object WeakMap]"?"weakmap":i==="[object Symbol]"?"symbol":i==="[object Int8Array]"?"int8array":i==="[object Uint8Array]"?"uint8array":i==="[object Uint8ClampedArray]"?"uint8clampedarray":i==="[object Int16Array]"?"int16array":i==="[object Uint16Array]"?"uint16array":i==="[object Int32Array]"?"int32array":i==="[object Uint32Array]"?"uint32array":i==="[object Float32Array]"?"float32array":i==="[object Float64Array]"?"float64array":"object"}}}),iFt=lS({"node_modules/rename-keys/index.js"(t,e){(function(){function n(o,r){if(typeof r!="function")return o;var i={};for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(i[r(s,o[s])||s]=o[s]);return i}e!==void 0&&e.exports?e.exports=n:typeof define=="function"&&define.amd?define([],function(){return n}):window.rename=n})()}}),sFt=lS({"node_modules/deep-rename-keys/index.js"(t,e){var n=rFt(),o=iFt();e.exports=function r(i,s){var a=n(i);if(a!=="object"&&a!=="array")throw new Error("expected an object");var c=[];for(var l in a==="object"&&(i=o(i,s),c={}),i)if(i.hasOwnProperty(l)){var u=i[l];n(u)==="object"||n(u)==="array"?c[l]=r(u,s):c[l]=u}return c}}}),oEe=lS({"node_modules/eventemitter3/index.js"(t,e){var n=Object.prototype.hasOwnProperty,o="~";function r(){}function i(a,c,l){this.fn=a,this.context=c,this.once=l||!1}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(o=!1)),s.prototype.eventNames=function(){var a,c,l=[];if(this._eventsCount===0)return l;for(c in a=this._events)n.call(a,c)&&l.push(o?c.slice(1):c);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(a)):l},s.prototype.listeners=function(a,c){var l=o?o+a:a,u=this._events[l];if(c)return!!u;if(!u)return[];if(u.fn)return[u.fn];for(var _=0,d=u.length,m=new Array(d);_<d;_++)m[_]=u[_].fn;return m},s.prototype.emit=function(a,c,l,u,_,d){var m=o?o+a:a;if(!this._events[m])return!1;var h,p,x=this._events[m],f=arguments.length;if(x.fn){switch(x.once&&this.removeListener(a,x.fn,void 0,!0),f){case 1:return x.fn.call(x.context),!0;case 2:return x.fn.call(x.context,c),!0;case 3:return x.fn.call(x.context,c,l),!0;case 4:return x.fn.call(x.context,c,l,u),!0;case 5:return x.fn.call(x.context,c,l,u,_),!0;case 6:return x.fn.call(x.context,c,l,u,_,d),!0}for(p=1,h=new Array(f-1);p<f;p++)h[p-1]=arguments[p];x.fn.apply(x.context,h)}else{var g,y=x.length;for(p=0;p<y;p++)switch(x[p].once&&this.removeListener(a,x[p].fn,void 0,!0),f){case 1:x[p].fn.call(x[p].context);break;case 2:x[p].fn.call(x[p].context,c);break;case 3:x[p].fn.call(x[p].context,c,l);break;case 4:x[p].fn.call(x[p].context,c,l,u);break;default:if(!h)for(g=1,h=new Array(f-1);g<f;g++)h[g-1]=arguments[g];x[p].fn.apply(x[p].context,h)}}return!0},s.prototype.on=function(a,c,l){var u=new i(c,l||this),_=o?o+a:a;return this._events[_]?this._events[_].fn?this._events[_]=[this._events[_],u]:this._events[_].push(u):(this._events[_]=u,this._eventsCount++),this},s.prototype.once=function(a,c,l){var u=new i(c,l||this,!0),_=o?o+a:a;return this._events[_]?this._events[_].fn?this._events[_]=[this._events[_],u]:this._events[_].push(u):(this._events[_]=u,this._eventsCount++),this},s.prototype.removeListener=function(a,c,l,u){var _=o?o+a:a;if(!this._events[_])return this;if(!c)return--this._eventsCount===0?this._events=new r:delete this._events[_],this;var d=this._events[_];if(d.fn)d.fn!==c||u&&!d.once||l&&d.context!==l||(--this._eventsCount===0?this._events=new r:delete this._events[_]);else{for(var m=0,h=[],p=d.length;m<p;m++)(d[m].fn!==c||u&&!d[m].once||l&&d[m].context!==l)&&h.push(d[m]);h.length?this._events[_]=h.length===1?h[0]:h:--this._eventsCount===0?this._events=new r:delete this._events[_]}return this},s.prototype.removeAllListeners=function(a){var c;return a?(c=o?o+a:a,this._events[c]&&(--this._eventsCount===0?this._events=new r:delete this._events[c])):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prototype.setMaxListeners=function(){return this},s.prefixed=o,s.EventEmitter=s,e!==void 0&&(e.exports=s)}}),aFt=lS({"node_modules/xml-lexer/dist/lexer.js"(t,e){function n(l,u,_){return u in l?Object.defineProperty(l,u,{value:_,enumerable:!0,configurable:!0,writable:!0}):l[u]=_,l}var o=oEe(),r=function(){},i={data:"state-data",cdata:"state-cdata",tagBegin:"state-tag-begin",tagName:"state-tag-name",tagEnd:"state-tag-end",attributeNameStart:"state-attribute-name-start",attributeName:"state-attribute-name",attributeNameEnd:"state-attribute-name-end",attributeValueBegin:"state-attribute-value-begin",attributeValue:"state-attribute-value"},s={lt:"action-lt",gt:"action-gt",space:"action-space",equal:"action-equal",quote:"action-quote",slash:"action-slash",char:"action-char",error:"action-error"},a={text:"text",openTag:"open-tag",closeTag:"close-tag",attributeName:"attribute-name",attributeValue:"attribute-value"},c={" ":s.space," ":s.space,"\n":s.space,"\r":s.space,"<":s.lt,">":s.gt,'"':s.quote,"'":s.quote,"=":s.equal,"/":s.slash};e.exports={State:i,Action:s,Type:a,create:function(l){var u,_,d,m,h,p,x,f,g,y;l=Object.assign({debug:!1},l);var b=new o,v=i.data,S="",M="",w="",D="",A="",I="",H=function(z,V){if(M[0]!=="?"&&M[0]!=="!"){var j={type:z,value:V};l.debug&&console.log("emit:",j),b.emit("data",j)}};b.stateMachine=(n(y={},i.data,(n(u={},s.lt,function(){S.trim()&&H(a.text,S),M="",A=!1,v=i.tagBegin}),n(u,s.char,function(z){S+=z}),u)),n(y,i.cdata,n({},s.char,function(z){(S+=z).substr(-3)==="]]>"&&(H(a.text,S.slice(0,-3)),S="",v=i.data)})),n(y,i.tagBegin,(n(_={},s.space,r),n(_,s.char,function(z){M=z,v=i.tagName}),n(_,s.slash,function(){M="",A=!0}),_)),n(y,i.tagName,(n(d={},s.space,function(){A?v=i.tagEnd:(v=i.attributeNameStart,H(a.openTag,M))}),n(d,s.gt,function(){H(A?a.closeTag:a.openTag,M),S="",v=i.data}),n(d,s.slash,function(){v=i.tagEnd,H(a.openTag,M)}),n(d,s.char,function(z){(M+=z)==="![CDATA["&&(v=i.cdata,S="",M="")}),d)),n(y,i.tagEnd,(n(m={},s.gt,function(){H(a.closeTag,M),S="",v=i.data}),n(m,s.char,r),m)),n(y,i.attributeNameStart,(n(h={},s.char,function(z){w=z,v=i.attributeName}),n(h,s.gt,function(){S="",v=i.data}),n(h,s.space,r),n(h,s.slash,function(){A=!0,v=i.tagEnd}),h)),n(y,i.attributeName,(n(p={},s.space,function(){v=i.attributeNameEnd}),n(p,s.equal,function(){H(a.attributeName,w),v=i.attributeValueBegin}),n(p,s.gt,function(){D="",H(a.attributeName,w),H(a.attributeValue,D),S="",v=i.data}),n(p,s.slash,function(){A=!0,D="",H(a.attributeName,w),H(a.attributeValue,D),v=i.tagEnd}),n(p,s.char,function(z){w+=z}),p)),n(y,i.attributeNameEnd,(n(x={},s.space,r),n(x,s.equal,function(){H(a.attributeName,w),v=i.attributeValueBegin}),n(x,s.gt,function(){D="",H(a.attributeName,w),H(a.attributeValue,D),S="",v=i.data}),n(x,s.char,function(z){D="",H(a.attributeName,w),H(a.attributeValue,D),w=z,v=i.attributeName}),x)),n(y,i.attributeValueBegin,(n(f={},s.space,r),n(f,s.quote,function(z){I=z,D="",v=i.attributeValue}),n(f,s.gt,function(){H(a.attributeValue,D=""),S="",v=i.data}),n(f,s.char,function(z){I="",D=z,v=i.attributeValue}),f)),n(y,i.attributeValue,(n(g={},s.space,function(z){I?D+=z:(H(a.attributeValue,D),v=i.attributeNameStart)}),n(g,s.quote,function(z){I===z?(H(a.attributeValue,D),v=i.attributeNameStart):D+=z}),n(g,s.gt,function(z){I?D+=z:(H(a.attributeValue,D),S="",v=i.data)}),n(g,s.slash,function(z){I?D+=z:(H(a.attributeValue,D),A=!0,v=i.tagEnd)}),n(g,s.char,function(z){D+=z}),g)),y);var O=function(z){l.debug&&console.log(v,z);var V=b.stateMachine[v],j=V[(function(q){return c[q]||s.char})(z)]||V[s.error]||V[s.char];j(z)};return b.write=function(z){for(var V=z.length,j=0;j<V;j++)O(z[j])},b}}}}),cFt=lS({"node_modules/xml-reader/dist/reader.js"(t,e){var n=oEe(),o=aFt(),r=o.Type,i={element:"element",text:"text"},s=function(c){return Object.assign({name:"",type:i.element,value:"",parent:null,attributes:{},children:[]},c)},a=function(c){c=Object.assign({stream:!1,parentNodes:!0,doneEvent:"done",tagPrefix:"tag:",emitTopLevelOnly:!1,debug:!1},c);var l=void 0,u=void 0,_=void 0,d=void 0,m=new n,h=function(p){switch(p.type){case r.openTag:if(_===null)(_=u).name=p.value;else{var x=s({name:p.value,parent:_});_.children.push(x),_=x}break;case r.closeTag:var f=_.parent;if(c.parentNodes||(_.parent=null),_.name!==p.value)break;c.stream&&f===u&&(u.children=[],_.parent=null),c.emitTopLevelOnly&&f!==u||(m.emit(c.tagPrefix+_.name,_),m.emit("tag",_.name,_)),_===u&&(l.removeAllListeners("data"),m.emit(c.doneEvent,_),u=null),_=f;break;case r.text:_&&_.children.push(s({type:i.text,value:p.value,parent:c.parentNodes?_:null}));break;case r.attributeName:d=p.value,_.attributes[d]="";break;case r.attributeValue:_.attributes[d]=p.value}};return m.reset=function(){(l=o.create({debug:c.debug})).on("data",h),u=s(),_=null,d="",m.parse=l.write},m.reset(),m};e.exports={parseSync:function(c,l){l=Object.assign({},l,{stream:!1,tagPrefix:":"});var u=a(l),_=void 0;return u.on("done",function(d){_=d}),u.parse(c),_},create:a,NodeType:i}}});nEe(sFt()),nEe(cFt());function lFt(t,e){const n=t.x-e.x,o=t.y-e.y;return n*n+o*o}function uoe(t,e,n,o,r){const i=n-e,s=r-o,a=1e-6;if(Math.abs(t.y-r)<a)return t.x-e;if(Math.abs(t.x-n)<a)return i+(r-t.y);if(Math.abs(t.y-o)<a)return i+s+(n-t.x);if(Math.abs(t.x-e)<a)return 2*i+s+(t.y-o);const c=Math.abs(t.y-r),l=Math.abs(t.x-n),u=Math.abs(t.y-o),_=Math.abs(t.x-e),d=Math.min(c,l,u,_);return d===c?Math.max(0,Math.min(i,t.x-e)):d===l?i+Math.max(0,Math.min(s,r-t.y)):d===u?i+s+Math.max(0,Math.min(i,n-t.x)):2*i+s+Math.max(0,Math.min(s,t.y-o))}function uFt(t,e,n){const o=n.x-e.x,r=n.y-e.y,i=t.x-e.x,s=t.y-e.y,a=o*o+r*r,c=a>0?(l=(i*o+s*r)/a,u=0,_=1,Math.max(u,Math.min(_,l))):0;var l,u,_;return{u:c,d2:lFt(t,{x:e.x+c*o,y:e.y+c*r})}}function rEe(t){const e=t.d.polygon;if(!e||e.length<3)return null;const n=t.d.polygonPerimeterCache;if(n)return n;const o=(function(r){const i=r.length,s=new Array(i),a=new Array(i+1);a[0]=0;for(let c=0;c<i;c++){const l=r[c],u=r[(c+1)%i],_=Math.hypot(u.x-l.x,u.y-l.y);s[c]=_,a[c+1]=a[c]+_}return{edgeLengths:s,cumulative:a,perimeter:a[i]}})(e);return t.d.polygonPerimeterCache=o,o}function iEe(t){const e=rEe(t);if(e)return e.perimeter;const{minX:n,maxX:o,minY:r,maxY:i}=t.d.bounds;return 2*(o-n)+2*(i-r)}function iP(t,e){if(t.region1===e){if(typeof t.region1T=="number")return t.region1T;const n=_oe(t.d,e);return t.region1T=n,n}if(t.region2===e){if(typeof t.region2T=="number")return t.region2T;const n=_oe(t.d,e);return t.region2T=n,n}return _oe(t.d,e)}function _oe(t,e){const n=e.d.polygon;if(n&&n.length>=3){const a=rEe(e);if(a)return(function(c,l,u,_=1e-6){let d=0,m=0,h=Number.POSITIVE_INFINITY;const p=_*_;for(let x=0;x<l.length;x++){const f=uFt(c,l[x],l[(x+1)%l.length]);if(f.d2<=p){d=x,m=f.u,h=f.d2;break}f.d2<h&&(d=x,m=f.u,h=f.d2)}return u.cumulative[d]+m*u.edgeLengths[d]})(t,n,a)}const{minX:o,maxX:r,minY:i,maxY:s}=e.d.bounds;return uoe(t,o,r,i,s)}function Zz(t,e,n=1e-6){return Math.abs(t-e)<n}function sP(t,e){return(t%e+e)%e}function eV(t,e,n,o){const r=Math.abs(sP(t-e,n));return r<o||n-r<o}function sEe(t,e,n,o,r){const i=sP(t,o),s=sP(e,o),a=sP(n,o);return!(Math.abs(s-a)<r)&&(s<a?s<i&&i<a:i>s||i<a)}function aEe(t,e,n){if(typeof n=="number"&&n>0){let[a,c]=t,[l,u]=e;return a=sP(a,n),c=sP(c,n),l=sP(l,n),u=sP(u,n),eV(a,l,n,1e-6)||eV(a,u,n,1e-6)||eV(c,l,n,1e-6)||eV(c,u,n,1e-6)?!1:sEe(l,a,c,n,1e-12)!==sEe(u,a,c,n,1e-12)}const[o,r]=t[0]<t[1]?t:[t[1],t[0]],[i,s]=e[0]<e[1]?e:[e[1],e[0]];return!(Zz(o,i)||Zz(o,s)||Zz(r,i)||Zz(r,s))&&(o<i&&i<r&&r<s||i<o&&o<s&&s<r)}var cEe=(t,e,n,o)=>{const r={portId:t,region1:e,region2:n,d:{x:o.x,y:o.y}};return e.ports.push(r),n.ports.push(r),r},lEe=(t,e,n)=>({regionId:t,ports:[],d:{bounds:{minX:e-.2,maxX:e+.2,minY:n-.2,maxY:n+.2},center:{x:e,y:n},isPad:!1,isConnectionRegion:!0}});function _Ft(t,e){let n=1/0,o={x:t.x,y:t.y};for(let r=0;r<e.length;r++){const i=e[r],s=e[(r+1)%e.length],a=s.x-i.x,c=s.y-i.y,l=a*a+c*c;if(l<1e-10)continue;const u=Math.max(0,Math.min(1,((t.x-i.x)*a+(t.y-i.y)*c)/l)),_=i.x+u*a,d=i.y+u*c,m=Math.sqrt((t.x-_)**2+(t.y-d)**2);m<n&&(n=m,o={x:_,y:d})}return{...o,dist:n}}var uEe=t=>{const{x:e,y:n,regions:o}=t,r=o.some(c=>c.regionId.startsWith("filler:"));let i=null,s=1/0,a={x:e,y:n};for(const c of o){if(c.d.isPad||c.d.isThroughJumper||c.d.isConnectionRegion||r&&!c.regionId.startsWith("filler:"))continue;const l=c.d.polygon;if(!l||l.length<3)continue;const u=_Ft({x:e,y:n},l);u.dist<s&&(s=u.dist,i=c,a={x:u.x,y:u.y})}return i?{region:i,portPosition:a}:null},_Ee=!0,UM={CCW:-1,CW:1,NOT_ORIENTABLE:0},dFt=2*Math.PI,tV=Object.freeze({__proto__:null,BOUNDARY:2,CCW:_Ee,CONTAINS:3,CW:!1,END_VERTEX:2,INSIDE:1,INTERLACE:4,NOT_VERTEX:0,ORIENTATION:UM,OUTSIDE:0,OVERLAP_OPPOSITE:2,OVERLAP_SAME:1,PIx2:dFt,START_VERTEX:1}),T6=1e-6;function dEe(t){T6=t}function hEe(){return T6}function doe(t){return t<T6&&t>-T6}function uS(t,e){return t-e<T6&&t-e>-T6}function mEe(t,e){return t-e>T6}function pEe(t,e){return t-e<-T6}var He={Utils:Object.freeze({__proto__:null,DECIMALS:3,EQ:uS,EQ_0:doe,GE:function(t,e){return t-e>-T6},GT:mEe,LE:function(t,e){return t-e<T6},LT:pEe,getTolerance:hEe,setTolerance:dEe}),Errors:void 0,Matrix:void 0,Planar_set:void 0,Point:void 0,Vector:void 0,Line:void 0,Circle:void 0,Segment:void 0,Arc:void 0,Box:void 0,Edge:void 0,Face:void 0,Ray:void 0,Ray_shooting:void 0,Multiline:void 0,Polygon:void 0,Distance:void 0,Inversion:void 0};for(let t in tV)He[t]=tV[t];Object.defineProperty(He,"DP_TOL",{get:function(){return hEe()},set:function(t){dEe(t)}});var Q0=class{static get ILLEGAL_PARAMETERS(){return new ReferenceError("Illegal Parameters")}static get ZERO_DIVISION(){return new Error("Zero division")}static get UNRESOLVED_BOUNDARY_CONFLICT(){return new Error("Unresolved boundary conflict in boolean operation")}static get INFINITE_LOOP(){return new Error("Infinite loop")}static get CANNOT_COMPLETE_BOOLEAN_OPERATION(){return new Error("Cannot complete boolean operation")}static get CANNOT_INVOKE_ABSTRACT_METHOD(){return new Error("Abstract method cannot be invoked")}static get OPERATION_IS_NOT_SUPPORTED(){return new Error("Operation is not supported")}static get UNSUPPORTED_SHAPE_TYPE(){return new Error("Unsupported shape type")}};He.Errors=Q0;var hoe=class{constructor(t,e){this.first=t,this.last=e||this.first}[Symbol.iterator](){let t;return{next:()=>(t=t?t.next:this.first,{value:t,done:t===void 0})}}get size(){let t=0;for(let e of this)t++;return t}toArray(t=void 0,e=void 0){let n=[],o=t||this.first,r=e||this.last,i=o;if(i===void 0)return n;do n.push(i),i=i.next;while(i!==r.next);return n}append(t){return this.isEmpty()?this.first=t:(t.prev=this.last,this.last.next=t),this.last=t,this.last.next=void 0,this.first.prev=void 0,this}insert(t,e){if(this.isEmpty())this.first=t,this.last=t;else if(e==null)t.next=this.first,this.first.prev=t,this.first=t;else{let n=e.next;e.next=t,n&&(n.prev=t),t.prev=e,t.next=n,this.last===e&&(this.last=t)}return this.last.next=void 0,this.first.prev=void 0,this}remove(t){return t===this.first&&t===this.last?(this.first=void 0,this.last=void 0):(t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this.first&&(this.first=t.next),t===this.last&&(this.last=t.prev)),this}isEmpty(){return this.first===void 0}static testInfiniteLoop(t){let e=t,n=t;do{if(e!=t&&e===n)throw Q0.INFINITE_LOOP;e=e.next,n=n.next.next}while(e!=t)}},fEe={stroke:"black"},hFt=class{constructor(t=fEe){for(const e in t)this[e]=t[e];this.stroke=t.stroke??fEe.stroke}toAttributesString(){return Object.keys(this).reduce((t,e)=>t+(this[e]!==void 0?this.toAttrString(e,this[e]):""),"")}toAttrString(t,e){const n=t==="className"?"class":this.convertCamelToKebabCase(t);return e===null?`${n} `:`${n}="${e.toString()}" `}convertCamelToKebabCase(t){return t.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g).join("-").toLowerCase()}};function _S(t){return new hFt(t).toAttributesString()}function XM(t,e){let n=[],[o,r,i]=t.standard,[s,a,c]=e.standard,l=o*a-r*s,u=i*a-r*c,_=o*c-i*s;if(!He.Utils.EQ_0(l)){let d,m;r===0?(d=i/o,m=_/l):a===0?(d=c/s,m=_/l):o===0?(d=u/l,m=i/r):s===0?(d=u/l,m=c/a):(d=u/l,m=_/l),n.push(new He.Point(d,m))}return n}function dS(t,e){let n=[],o=e.pc.projectionOn(t),r=e.pc.distanceTo(o)[0];if(He.Utils.EQ(r,e.r))n.push(o);else if(He.Utils.LT(r,e.r)){let i,s,a=Math.sqrt(e.r*e.r-r*r);i=t.norm.rotate90CCW().multiply(a),s=o.translate(i),n.push(s),i=t.norm.rotate90CW().multiply(a),s=o.translate(i),n.push(s)}return n}function jM(t,e){let n=[];for(let o of e.toSegments()){let r=VA(o,t);for(let i of r)wEe(i,n)||n.push(i)}return n}function nV(t,e){let n=[];if(jM(t,e.box).length===0)return n;let o=dS(t,new He.Circle(e.pc,e.r));for(let r of o)r.on(e)&&n.push(r);return n}function VA(t,e){let n=[];return t.ps.on(e)&&n.push(t.ps),t.pe.on(e)&&!t.isZeroLength()&&n.push(t.pe),n.length>0||t.isZeroLength()||t.ps.leftTo(e)&&t.pe.leftTo(e)||!t.ps.leftTo(e)&&!t.pe.leftTo(e)?n:XM(new He.Line(t.ps,t.pe),e)}function oV(t,e){let n=[];if(t.isZeroLength())return t.ps.on(e)&&n.push(t.ps),n;if(e.isZeroLength())return e.ps.on(t)&&n.push(e.ps),n;let o=new He.Line(t.ps,t.pe),r=new He.Line(e.ps,e.pe);if(o.incidentTo(r))t.ps.on(e)&&n.push(t.ps),t.pe.on(e)&&n.push(t.pe),!e.ps.on(t)||e.ps.equalTo(t.ps)||e.ps.equalTo(t.pe)||n.push(e.ps),!e.pe.on(t)||e.pe.equalTo(t.ps)||e.pe.equalTo(t.pe)||n.push(e.pe);else if(o.parallelTo(r)){const i=new He.Vector(t.ps,t.pe),s=new He.Vector(e.ps,e.pe),a=new He.Vector(t.ps,e.ps),c=i.cross(s);if(!He.Utils.EQ_0(c)){const l=a.cross(s)/c,u=a.cross(i)/c;He.Utils.GE(l,0)&&He.Utils.LE(l,1)&&He.Utils.GE(u,0)&&He.Utils.LE(u,1)&&n.push(xEe(t.ps.translate(i.multiply(l)),t,e))}}else{let i=XM(o,r);i.length>0&&gEe(i[0],t)&&gEe(i[0],e)&&n.push(xEe(i[0],t,e))}return n}function xEe(t,e,n){for(const o of[e.ps,e.pe,n.ps,n.pe])if(t.equalTo(o))return o;return t}function gEe(t,e){const n=e.box;return He.Utils.LE(t.x,n.xmax)&&He.Utils.GE(t.x,n.xmin)&&He.Utils.LE(t.y,n.ymax)&&He.Utils.GE(t.y,n.ymin)}function rV(t,e){let n=[];if(t.isZeroLength()){let[r,i]=t.ps.distanceTo(e.pc);return He.Utils.EQ(r,e.r)&&n.push(t.ps),n}let o=dS(new He.Line(t.ps,t.pe),e);for(let r of o)r.on(t)&&n.push(r);return n}function GM(t,e){let n=[];if(t.isZeroLength())return t.ps.on(e)&&n.push(t.ps),n;let o=dS(new He.Line(t.ps,t.pe),new He.Circle(e.pc,e.r));for(let r of o)r.on(t)&&r.on(e)&&n.push(r);return n}function yEe(t,e){let n=[],o=new He.Vector(t.pc,e.pc),r=t.r,i=e.r;if(He.Utils.EQ_0(r)||He.Utils.EQ_0(i))return n;if(He.Utils.EQ_0(o.x)&&He.Utils.EQ_0(o.y)&&He.Utils.EQ(r,i))return n.push(t.pc.translate(-r,0)),n;let s,a=t.pc.distanceTo(e.pc)[0];if(He.Utils.GT(a,r+i)||He.Utils.LT(a,Math.abs(r-i)))return n;if(o.x/=a,o.y/=a,He.Utils.EQ(a,r+i)||He.Utils.EQ(a,Math.abs(r-i)))return s=t.pc.translate(r*o.x,r*o.y),n.push(s),n;let c=r*r/(2*a)-i*i/(2*a)+a/2,l=t.pc.translate(c*o.x,c*o.y),u=Math.sqrt(r*r-c*c);return s=l.translate(o.rotate90CCW().multiply(u)),n.push(s),s=l.translate(o.rotate90CW().multiply(u)),n.push(s),n}function bEe(t,e){let n=[];if(t.pc.equalTo(e.pc)&&He.Utils.EQ(t.r,e.r)){let s;return s=t.start,s.on(e)&&n.push(s),s=t.end,s.on(e)&&n.push(s),s=e.start,s.on(t)&&n.push(s),s=e.end,s.on(t)&&n.push(s),n}let o=new He.Circle(t.pc,t.r),r=new He.Circle(e.pc,e.r),i=o.intersect(r);for(let s of i)s.on(t)&&s.on(e)&&n.push(s);return n}function moe(t,e){let n=[];if(e.pc.equalTo(t.pc)&&He.Utils.EQ(e.r,t.r))return n.push(t.start),n.push(t.end),n;let o=yEe(e,new He.Circle(t.pc,t.r));for(let r of o)r.on(t)&&n.push(r);return n}function PEe(t,e){return t.isSegment?oV(t.shape,e):GM(e,t.shape)}function vEe(t,e){return t.isSegment?GM(t.shape,e):bEe(t.shape,e)}function SEe(t,e){return t.isSegment?VA(t.shape,e):nV(e,t.shape)}function mFt(t,e){return t.isSegment?rV(t.shape,e):moe(t.shape,e)}function poe(t,e){let n=[];for(let o of e.edges)for(let r of PEe(o,t))n.push(r);return n}function foe(t,e){let n=[];for(let o of e.edges)for(let r of vEe(o,t))n.push(r);return n}function $A(t,e){let n=[];if(e.isEmpty())return n;for(let o of e.edges)for(let r of SEe(o,t))wEe(r,n)||n.push(r);return t.sortPoints(n)}function CEe(t,e){let n=[];if(e.isEmpty())return n;for(let o of e.edges)for(let r of mFt(o,t))n.push(r);return n}function MEe(t,e){return t.isSegment?PEe(e,t.shape):t.isArc?vEe(e,t.shape):t.isLine?SEe(e,t.shape):t.isRay?(n=e,o=t.shape,n.isSegment?xoe(o,n.shape):goe(o,n.shape)):[];var n,o}function TEe(t,e){let n=[];if(e.isEmpty()||t.shape.box.not_intersect(e.box))return n;let o=e.edges.search(t.shape.box);for(let r of o)n=[...n,...MEe(t,r)];return n}function wEe(t,e){return e.some(n=>n.equalTo(t))}function aP(t){return new He.Line(t.start,t.norm)}function xoe(t,e){return VA(e,aP(t)).filter(n=>t.contains(n))}function goe(t,e){return nV(aP(t),e).filter(n=>t.contains(n))}function EEe(t,e){return dS(aP(t),e).filter(n=>t.contains(n))}function DEe(t,e){return XM(aP(t),e).filter(n=>t.contains(n))}function AEe(t,e){return $A(aP(t),e).filter(n=>t.contains(n))}function REe(t,e){if(t.intersect&&t.intersect instanceof Function)return t.intersect(e);throw Q0.UNSUPPORTED_SHAPE_TYPE}function YM(t,e){let n=[];for(let o of e)n=[...n,...REe(t,o.shape)];return n}var hS=class hL extends hoe{constructor(...e){if(super(),this.isInfinite=!1,e.length===1&&e[0]instanceof Array&&e[0].length>0){const n=e[0],o=n.length,r=s=>s instanceof He.Segment||s instanceof He.Arc||s instanceof He.Ray,i=s=>s instanceof He.Segment||s instanceof He.Arc;if(!(o===1&&(s=>s instanceof He.Segment||s instanceof He.Arc||s instanceof He.Ray||s instanceof He.Line)(n[0])||o>1&&r(n[0])&&r(n[o-1])&&n.slice(1,o-1).every(i)))throw He.Errors.ILLEGAL_PARAMETERS;this.isInfinite=n.some(s=>s instanceof He.Ray||s instanceof He.Line);for(let s of n){let a=new He.Edge(s);this.append(a)}this.setArcLength()}}get edges(){return[...this]}get box(){return this.edges.reduce((e,n)=>e.merge(n.box),new He.Box)}get vertices(){let e=this.edges.map(n=>n.start);return e.push(this.last.end),e}get length(){if(this.isEmpty())return 0;if(this.isInfinite)return Number.POSITIVE_INFINITY;let e=0;for(let n of this)e+=n.length;return e}clone(){return new hL(this.toShapes())}setArcLength(){for(let e of this)this.setOneEdgeArcLength(e)}setOneEdgeArcLength(e){e===this.first?e.arc_length=0:e.arc_length=e.prev.arc_length+e.prev.length}pointAtLength(e){if(e>this.length||e<0||this.isInfinite)return null;let n=null;for(let o of this)if(e>=o.arc_length&&(o===this.last||e<o.next.arc_length)){n=o.pointAtLength(e-o.arc_length);break}return n}addVertex(e,n){let o=n.shape.split(e);if(o[0]===null)return n.prev;if(o[1]===null)return n;let r=new He.Edge(o[0]),i=n.prev;return this.insert(r,i),n.shape=o[1],r}getChain(e,n){let o=[];for(let r=e;r!==n.next;r=r.next)o.push(r);return o}split(e){for(let n of e){let o=this.findEdgeByPoint(n);this.addVertex(n,o)}return this}findEdgeByPoint(e){let n;for(let o of this)if(o.shape.contains(e)){n=o;break}return n}distanceTo(e){if(e instanceof Point){const[n,o]=He.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof He.Line){const[n,o]=He.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof He.Circle){const[n,o]=He.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof He.Segment){const[n,o]=He.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof He.Arc){const[n,o]=He.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof He.Multiline)return He.Distance.multiline2multiline(this,e);throw He.Errors.UNSUPPORTED_SHAPE_TYPE}intersect(e){return e instanceof He.Multiline?(function(n,o){let r=[];for(let i of n)for(let s of o)r=[...r,...REe(i.shape,s.shape)];return r})(this,e):YM(e,this)}contains(e){if(e instanceof He.Point)return this.edges.some(n=>n.shape.contains(e));throw He.Errors.UNSUPPORTED_SHAPE_TYPE}translate(e){return new hL(this.edges.map(n=>n.shape.translate(e)))}rotate(e=0,n=new He.Point){return new hL(this.edges.map(o=>o.shape.rotate(e,n)))}transform(e=new He.Matrix){return new hL(this.edges.map(n=>n.shape.transform(e)))}toShapes(){return this.edges.map(e=>e.shape.clone())}toJSON(){return this.edges.map(e=>e.toJSON())}svgPoints(){return this.vertices.map(e=>`${e.x},${e.y}`).join(" ")}dpath(){let e=`M${this.first.start.x},${this.first.start.y}`;for(let n of this)e+=n.svg();return e}svg(e={}){let n=`
|
|
683
683
|
<path ${_S({fill:"none",...e})} d="`;n+=`
|
|
684
684
|
M${this.first.start.x},${this.first.start.y}`;for(let o of this)n+=o.svg();return n+=`" >
|
|
685
|
-
</path>`,n}};He.Multiline=hS;function qM(t,e,n){let o=n.length,r=t.shape.split(e);if(r.length===0)return;let i=0;i=r[0]===null?0:r[1]===null?t.shape.length:r[0].length;let s,a=0;uS(i,0)&&(a|=1),uS(i,t.shape.length)&&(a|=2),s=i===1/0?r[0].coord(e):2&a&&t.next&&t.next.arc_length===0?0:t.arc_length+i,n.push({id:o,pt:e,arc_length:s,edge_before:t,edge_after:void 0,face:t.face,is_vertex:a})}function WA(t){t.int_points1_sorted=cP(t.int_points1),t.int_points2_sorted=cP(t.int_points2)}function cP(t){let e=new Map,n=0;for(let o of t)e.has(o.face)||(e.set(o.face,n),n++);for(let o of t)o.faceId=e.get(o.face);return t.slice().sort(pFt)}function pFt(t,e){return t.faceId<e.faceId?-1:t.faceId>e.faceId?1:t.arc_length<e.arc_length?-1:t.arc_length>e.arc_length?1:0}function yoe(t){if(t.int_points1.length<2)return;let e,n,o,r,i=!1;for(let s=0;s<t.int_points1_sorted.length;s++)if(t.int_points1_sorted[s].id!==-1){e=t.int_points1_sorted[s],n=t.int_points2[e.id];for(let a=s+1;a<t.int_points1_sorted.length&&(o=t.int_points1_sorted[a],uS(o.arc_length,e.arc_length));a++)o.id!==-1&&(r=t.int_points2[o.id],r.id!==-1&&o.edge_before===e.edge_before&&o.edge_after===e.edge_after&&r.edge_before===n.edge_before&&r.edge_after===n.edge_after&&(o.id=-1,r.id=-1,i=!0))}n=t.int_points2_sorted[0],e=t.int_points1[n.id];for(let s=1;s<t.int_points2_sorted.length;s++){let a=t.int_points2_sorted[s];if(a.id===-1)continue;if(n.id===-1||!uS(a.arc_length,n.arc_length)){n=a,e=t.int_points1[n.id];continue}let c=t.int_points1[a.id];c.edge_before===e.edge_before&&c.edge_after===e.edge_after&&a.edge_before===n.edge_before&&a.edge_after===n.edge_after&&(c.id=-1,a.id=-1,i=!0)}i&&(t.int_points1=t.int_points1.filter(s=>s.id>=0),t.int_points2=t.int_points2.filter(s=>s.id>=0),t.int_points1.forEach((s,a)=>s.id=a),t.int_points2.forEach((s,a)=>s.id=a))}function boe(t){for(let e of t)e.edge_before&&(e.edge_before.bvStart=void 0,e.edge_before.bvEnd=void 0,e.edge_before.bv=void 0,e.edge_before.overlap=void 0),e.edge_after&&(e.edge_after.bvStart=void 0,e.edge_after.bvEnd=void 0,e.edge_after.bv=void 0,e.edge_after.overlap=void 0);for(let e of t)e.edge_before&&(e.edge_before.bvEnd=2),e.edge_after&&(e.edge_after.bvStart=2)}function Poe(t,e){for(let n of t)n.edge_before&&n.edge_before.setInclusion(e),n.edge_after&&n.edge_after.setInclusion(e)}function JM(t,e,n){let o,r,i=1;if(t.length===1)return 1;o=t[e];for(let s=e+1;s<t.length&&o.face===n&&(r=t[s],r.pt.equalTo(o.pt)&&r.edge_before===o.edge_before&&r.edge_after===o.edge_after);s++)i++;return i}function KM(t,e){if(e){for(let n of e){let o=n.edge_before;if(n.is_vertex=0,o.shape.start&&o.shape.start.equalTo(n.pt)&&(n.is_vertex|=1),o.shape.end&&o.shape.end.equalTo(n.pt)&&(n.is_vertex|=2),1&n.is_vertex){n.edge_before=o.prev,o.prev&&(n.is_vertex=2);continue}if(2&n.is_vertex)continue;let r=t.addVertex(n.pt,o);n.edge_before=r}for(let n of e)n.edge_before?n.edge_after=n.edge_before.next:t instanceof hS&&1&n.is_vertex&&(n.edge_after=t.first)}}function kEe(t,e,n){const o=t.edge_before,r=e.edge_after,i=n.length;o.next=n[0],n[0].prev=o,n[i-1].next=r,r.prev=n[i-1]}He.multiline=(...t)=>new He.Multiline(...t);var{INSIDE:w6,OUTSIDE:E6,BOUNDARY:Qm,OVERLAP_SAME:fFt,OVERLAP_OPPOSITE:xFt}=tV,{NOT_VERTEX:Qio,START_VERTEX:NEe,END_VERTEX:HEe}=tV;function voe(t,e){let n=e.clone().reverse(),[o]=UA(t,n,3,!0);return o}function IEe(t,e){let[n]=UA(t,e,2,!0);return n}function LEe(t,e){let[n,o]=UA(t,e,2,!1),r=[];for(let s of n.faces)r=[...r,...[...s.edges].map(a=>a.shape)];let i=[];for(let s of o.faces)i=[...i,...[...s.edges].map(a=>a.shape)];return[r,i]}function Soe(t,e){let[n]=UA(t,e,3,!1),o=[];for(let r of n.faces)o=[...o,...[...r.edges].map(i=>i.shape)];return o}function OEe(t,e){let n=t.clone(),o=e.clone(),r=FEe(n,o);return WA(r),KM(n,r.int_points1_sorted),KM(o,r.int_points2_sorted),yoe(r),WA(r),[r.int_points1_sorted.map(i=>i.pt),r.int_points2_sorted.map(i=>i.pt)]}function gFt(t,e,n,o){let r=BEe(t,n.int_points1),i=BEe(e,n.int_points2);for(zEe(r,e),zEe(i,t),boe(n.int_points1),boe(n.int_points2),Poe(n.int_points1,e),Poe(n.int_points2,t);yFt(t,e,n.int_points1,n.int_points1_sorted,n.int_points2,n););(function(s){let a,c,l,u=s.int_points1.length;for(let _=0;_<u;_++){let d=s.int_points1_sorted[_];d.face!==a&&(c=_,a=d.face);let m,h=_,p=JM(s.int_points1_sorted,_,a);m=h+p<u&&s.int_points1_sorted[h+p].face===a?h+p:c;let x=JM(s.int_points1_sorted,m,a);l=null;for(let M=m;M<m+x;M++){let w=s.int_points1_sorted[M];if(w.face===a&&s.int_points2[w.id].face===s.int_points2[d.id].face){l=w;break}}if(l===null)continue;let f=d.edge_after,g=l.edge_before;if(f.bv!==2||g.bv!==2||f!==g)continue;let y=s.int_points2[d.id],b=s.int_points2[l.id],v=y.edge_after,S=b.edge_before;v.bv===2&&S.bv===2&&v===S||(y=s.int_points2[l.id],b=s.int_points2[d.id],v=y.edge_after,S=b.edge_before),v.bv===2&&S.bv===2&&v===S&&f.setOverlap(v)}})(n),Coe(t,o,n.int_points1_sorted,!0),Coe(e,o,n.int_points2_sorted,!1),VEe(t,r,o,!0),VEe(e,i,o,!1)}function UA(t,e,n,o){let r=t.clone(),i=e.clone(),s=FEe(r,i);return WA(s),KM(r,s.int_points1_sorted),KM(i,s.int_points2_sorted),yoe(s),WA(s),gFt(r,i,s,n),o&&(function(a,c,l){(function(u,_,d,m){for(let h of _.faces){for(let p of h)u.edges.add(p);m.find(p=>p.face===h)===void 0&&u.addFace(h.first,h.last)}})(a,c,0,l.int_points2),(function(u,_,d){if(d.int_points1.length!==0)for(let m=0;m<d.int_points1.length;m++){let h=d.int_points1[m],p=d.int_points2[m];if(h.edge_before!==void 0&&h.edge_after===void 0&&p.edge_before===void 0&&p.edge_after!==void 0&&(h.edge_before.next=p.edge_after,p.edge_after.prev=h.edge_before,h.edge_after=p.edge_after,p.edge_before=h.edge_before),p.edge_before!==void 0&&p.edge_after===void 0&&h.edge_before===void 0&&h.edge_after!==void 0&&(p.edge_before.next=h.edge_after,h.edge_after.prev=p.edge_before,p.edge_after=h.edge_after,h.edge_before=p.edge_before),h.edge_before!==void 0&&h.edge_after===void 0)for(let x of d.int_points1_sorted)x!==h&&x.edge_before===void 0&&x.edge_after!==void 0&&x.pt.equalTo(h.pt)&&(h.edge_before.next=x.edge_after,x.edge_after.prev=h.edge_before,h.edge_after=x.edge_after,x.edge_before=h.edge_before);if(p.edge_before!==void 0&&p.edge_after===void 0)for(let x of d.int_points2_sorted)x!==p&&x.edge_before===void 0&&x.edge_after!==void 0&&x.pt.equalTo(p.pt)&&(p.edge_before.next=x.edge_after,x.edge_after.prev=p.edge_before,p.edge_after=x.edge_after,x.edge_before=p.edge_before)}})(0,0,l),Moe(a,l.int_points1),Moe(c,l.int_points2),Toe(a,l.int_points1,l.int_points2),Toe(a,l.int_points2,l.int_points1),$Ee(a),$Ee(c)})(r,i,s),[r,i]}function FEe(t,e){let n={int_points1:[],int_points2:[]};for(let o of t.edges){let r=e.edges.search(o.box);for(let i of r){let s=o.shape.intersect(i.shape);for(let a of s)qM(o,a,n.int_points1),qM(i,a,n.int_points2)}}return n}function BEe(t,e){let n=[];for(let o of t.faces)e.find(r=>r.face===o)||n.push(o);return n}function zEe(t,e){for(let n of t)n.first.bv=n.first.bvStart=n.first.bvEnd=void 0,n.first.setInclusion(e)}function yFt(t,e,n,o,r,i){let s,a,c,l=o.length,u=!1;for(let _=0;_<l;_++){let d=o[_];d.face!==s&&(a=_,s=d.face);let m,h=_,p=JM(o,_,s);m=h+p<l&&o[h+p].face===s?h+p:a;let x=JM(o,m,s);c=null;for(let y=m;y<m+x;y++){let b=o[y];if(b.face===s&&r[b.id].face===r[d.id].face){c=b;break}}if(c===null)continue;let f=d.edge_after,g=c.edge_before;if(f.bv!==Qm||g.bv==Qm)if(f.bv==Qm||g.bv!==Qm){if(f.bv===Qm&&g.bv===Qm&&f!=g||f.bv===w6&&g.bv===E6||f.bv===E6&&g.bv===w6){let y=f.next;for(;y!=g;)y.bvStart=void 0,y.bvEnd=void 0,y.bv=void 0,y.setInclusion(e),y=y.next}if(f.bv===Qm&&g.bv===Qm&&f!=g){let y,b=f.next;for(;b!=g;){if(b.bv!=Qm){if(y===void 0)y=b.bv;else if(b.bv!=y)throw Q0.UNRESOLVED_BOUNDARY_CONFLICT}b=b.next}y!=null&&(f.bv=y,g.bv=y);continue}if(f.bv===w6&&g.bv===E6||f.bv===E6&&g.bv===w6){let y=f;for(;y!=g;){if(y.bvStart===f.bv&&y.bvEnd===g.bv){let[b,v]=y.shape.distanceTo(e);if(b<10*He.DP_TOL){qM(y,v.ps,n);let S=n[n.length-1];if(S.is_vertex&NEe)S.edge_after=y,S.edge_before=y.prev,y.bvStart=Qm,y.bv=void 0,y.setInclusion(e);else if(S.is_vertex&HEe)S.edge_after=y.next,y.bvEnd=Qm,y.bv=void 0,y.setInclusion(e);else{let D=e.addVertex(S.pt,y);S.edge_before=D,S.edge_after=D.next,D.setInclusion(e),D.next.bvStart=Qm,D.next.bvEnd=void 0,D.next.bv=void 0,D.next.setInclusion(e)}let M=e.findEdgeByPoint(v.pe);qM(M,v.pe,r);let w=r[r.length-1];if(w.is_vertex&NEe)w.edge_after=M,w.edge_before=M.prev;else if(w.is_vertex&HEe)w.edge_after=M.next;else{let D=r.find(I=>I.edge_after===M),A=e.addVertex(w.pt,M);w.edge_before=A,w.edge_after=A.next,D&&(D.edge_after=A),A.bvStart=void 0,A.bvEnd=Qm,A.bv=void 0,A.setInclusion(t),A.next.bvStart=Qm,A.next.bvEnd=void 0,A.next.bv=void 0,A.next.setInclusion(t)}WA(i),u=!0;break}}y=y.next}if(u)break;throw Q0.UNRESOLVED_BOUNDARY_CONFLICT}}else g.bv=f.bv;else f.bv=g.bv}return u}function Coe(t,e,n,o){if(!n)return;let r,i,s,a;for(let c=0;c<n.length;c++){if(s=n[c],s.face!==r&&(i=c,r=s.face),r.isEmpty())continue;let l,u=c,_=JM(n,c,r);l=u+_<n.length&&n[u+_].face===s.face?u+_:i,a=n[l];let d=l,m=JM(n,d,r),h=s.edge_after,p=a.edge_before;if(h.bv===w6&&p.bv===w6&&e===1||h.bv===E6&&p.bv===E6&&e===2||(h.bv===E6||p.bv===E6)&&e===3&&!o||(h.bv===w6||p.bv===w6)&&e===3&&o||h.bv===Qm&&p.bv===Qm&&h.overlap&fFt&&o||h.bv===Qm&&p.bv===Qm&&h.overlap&xFt){t.removeChain(r,h,p);for(let x=u;x<u+_;x++)n[x].edge_after=void 0;for(let x=d;x<d+m;x++)n[x].edge_before=void 0}c+=_-1}}function Moe(t,e){for(let n of e)t.faces.delete(n.face),n.face=void 0,n.edge_before&&(n.edge_before.face=void 0),n.edge_after&&(n.edge_after.face=void 0)}function Toe(t,e,n){for(let o of e){if(o.edge_before===void 0||o.edge_after===void 0||o.face||o.edge_after.face||o.edge_before.face)continue;let r=o.edge_after,i=o.edge_before;try{hoe.testInfiniteLoop(r)}catch{throw Q0.CANNOT_COMPLETE_BOOLEAN_OPERATION}let s=t.addFace(r,i);for(let a of e)a.edge_before&&a.edge_after&&a.edge_before.face===s&&a.edge_after.face===s&&(a.face=s);for(let a of n)a.edge_before&&a.edge_after&&a.edge_before.face===s&&a.edge_after.face===s&&(a.face=s)}}function VEe(t,e,n,o){for(let r of e){let i=r.first.bv;(n===1&&i===w6||n===3&&i===w6&&o||n===3&&i===E6&&!o||n===2&&i===E6)&&t.deleteFace(r)}}function $Ee(t){const e=[];for(const n of t.edges)n.face&&t.faces.has(n.face)||e.push(n);for(const n of e)t.edges.delete(n)}var WEe=Object.freeze({__proto__:null,BOOLEAN_INTERSECT:2,BOOLEAN_SUBTRACT:3,BOOLEAN_UNION:1,calculateIntersections:OEe,innerClip:LEe,intersect:IEe,outerClip:Soe,removeNotRelevantChains:Coe,removeOldFaces:Moe,restoreFaces:Toe,subtract:voe,unify:function(t,e){let[n]=UA(t,e,1,!0);return n}}),bFt=RegExp("T.F..FFF.|T.F...F.."),PFt=RegExp("T........|.T.......|...T.....|....T...."),vFt=RegExp("FT.......|F..T.....|F...T...."),SFt=RegExp("T.F..F..."),CFt=RegExp("T.F..F...|.TF..F...|..FT.F...|..F.TF..."),QM=class{constructor(){this.m=new Array(9).fill(void 0)}get I2I(){return this.m[0]}set I2I(t){this.m[0]=t}get I2B(){return this.m[1]}set I2B(t){this.m[1]=t}get I2E(){return this.m[2]}set I2E(t){this.m[2]=t}get B2I(){return this.m[3]}set B2I(t){this.m[3]=t}get B2B(){return this.m[4]}set B2B(t){this.m[4]=t}get B2E(){return this.m[5]}set B2E(t){this.m[5]=t}get E2I(){return this.m[6]}set E2I(t){this.m[6]=t}get E2B(){return this.m[7]}set E2B(t){this.m[7]=t}get E2E(){return this.m[8]}set E2E(t){this.m[8]=t}toString(){return this.m.map(t=>t instanceof Array&&t.length>0?"T":t instanceof Array&&t.length===0?"F":"*").join("")}equal(){return bFt.test(this.toString())}intersect(){return PFt.test(this.toString())}touch(){return vFt.test(this.toString())}inside(){return SFt.test(this.toString())}covered(){return CFt.test(this.toString())}};function XA(t,e){let n,o=new He.Ray(e),r=new He.Line(o.pt,o.norm);const i=new He.Box(o.box.xmin-He.DP_TOL,o.box.ymin-He.DP_TOL,o.box.xmax+He.DP_TOL,o.box.ymax+He.DP_TOL);if(t.box.not_intersect(i))return He.OUTSIDE;let s=t.edges.search(i);if(s.length===0)return He.OUTSIDE;for(let u of s)if(u.shape.contains(e))return He.BOUNDARY;let a=[...t.faces],c=[];for(let u of s)for(let _ of o.intersect(u.shape)){if(_.equalTo(e))return He.BOUNDARY;c.push({pt:_,edge:u,face_index:a.indexOf(u.face)})}c.sort((u,_)=>pEe(u.pt.x,_.pt.x)?-1:mEe(u.pt.x,_.pt.x)?1:u.face_index<_.face_index?-1:u.face_index>_.face_index?1:u.edge.arc_length<_.edge.arc_length?-1:u.edge.arc_length>_.edge.arc_length?1:0);let l=0;for(let u=0;u<c.length;u++){let _=c[u];if(_.pt.equalTo(_.edge.shape.start)){if(u>0&&_.pt.equalTo(c[u-1].pt)&&_.face_index===c[u-1].face_index&&_.edge.prev===c[u-1].edge)continue;let d=_.edge.prev;for(;doe(d.length);)d=d.prev;let m=d.shape.tangentInEnd(),h=_.pt.translate(m),p=_.edge.shape.tangentInStart(),x=_.pt.translate(p),f=h.leftTo(r),g=x.leftTo(r);(f&&!g||!f&&g)&&l++}else if(_.pt.equalTo(_.edge.shape.end)){if(u>0&&_.pt.equalTo(c[u-1].pt)&&_.face_index===c[u-1].face_index&&_.edge.next===c[u-1].edge)continue;let d=_.edge.next;for(;doe(d.length);)d=d.next;let m=d.shape.tangentInStart(),h=_.pt.translate(m),p=_.edge.shape.tangentInEnd(),x=_.pt.translate(p),f=h.leftTo(r),g=x.leftTo(r);(f&&!g||!f&&g)&&l++}else if(_.edge.shape instanceof He.Segment)l++;else{let d=_.edge.shape.box;uS(_.pt.y,d.ymin)||uS(_.pt.y,d.ymax)||l++}}return n=l%2==1?1:0,n}function UEe(t,e){return ZM(t,e).intersect()}function XEe(t,e){return ZM(t,e).inside()}function jEe(t,e){return ZM(t,e).covered()}function GEe(t,e){return jEe(e,t)}function ZM(t,e){return t instanceof He.Line&&e instanceof He.Line?(function(n,o){let r=new QM,i=XM(n,o);return i.length===0?n.contains(o.pt)&&o.contains(n.pt)?(r.I2I=[n],r.I2E=[],r.E2I=[]):(r.I2I=[],r.I2E=[n],r.E2I=[o]):(r.I2I=i,r.I2E=n.split(i),r.E2I=o.split(i)),r})(t,e):t instanceof He.Line&&e instanceof He.Circle?(function(n,o){let r=new QM,i=dS(n,o);if(i.length===0)r.I2I=[],r.I2B=[],r.I2E=[n],r.E2I=[o];else if(i.length===1)r.I2I=[],r.I2B=i,r.I2E=n.split(i),r.E2I=[o];else{let s=new hS([n]),a=n.sortPoints(i);s.split(a);let c=s.toShapes();r.I2I=[c[1]],r.I2B=a,r.I2E=[c[0],c[2]],r.E2I=new He.Polygon([o.toArc()]).cutWithLine(n)}return r})(t,e):t instanceof He.Line&&e instanceof He.Box?(function(n,o){let r=new QM,i=jM(n,o);if(i.length===0)r.I2I=[],r.I2B=[],r.I2E=[n],r.E2I=[o];else if(i.length===1)r.I2I=[],r.I2B=i,r.I2E=n.split(i),r.E2I=[o];else{let s=new hS([n]),a=n.sortPoints(i);s.split(a);let c=s.toShapes();o.toSegments().some(l=>l.contains(i[0])&&l.contains(i[1]))?(r.I2I=[],r.I2B=[c[1]],r.I2E=[c[0],c[2]],r.E2I=[o]):(r.I2I=[c[1]],r.I2B=a,r.I2E=[c[0],c[2]],r.E2I=new He.Polygon(o.toSegments()).cutWithLine(n))}return r})(t,e):t instanceof He.Line&&e instanceof He.Polygon?(function(n,o){let r=new QM,i=$A(n,o),s=new hS([n]),a=i.length>0?i.slice():n.sortPoints(i);return s.split(a),[...s].forEach(c=>c.setInclusion(o)),r.I2I=[...s].filter(c=>c.bv===He.INSIDE).map(c=>c.shape),r.I2B=[...s].slice(1).map(c=>c.bv===He.BOUNDARY?c.shape:c.shape.start),r.I2E=[...s].filter(c=>c.bv===He.OUTSIDE).map(c=>c.shape),r.E2I=o.cutWithLine(n),r})(t,e):(t instanceof He.Segment||t instanceof He.Arc)&&e instanceof He.Polygon?YEe(t,e):(t instanceof He.Segment||t instanceof He.Arc)&&(e instanceof He.Circle||e instanceof He.Box)?YEe(t,new He.Polygon(e)):t instanceof He.Polygon&&e instanceof He.Polygon?iV(t,e):(t instanceof He.Circle||t instanceof He.Box)&&(e instanceof He.Circle||e instanceof He.Box)?iV(new He.Polygon(t),new He.Polygon(e)):(t instanceof He.Circle||t instanceof He.Box)&&e instanceof He.Polygon?iV(new He.Polygon(t),e):t instanceof He.Polygon&&(e instanceof He.Circle||e instanceof He.Box)?iV(t,new He.Polygon(e)):void 0}function YEe(t,e){let n=new QM,o=(function(s,a){return s instanceof He.Line?$A(s,a):s instanceof He.Segment?poe(s,a):s instanceof He.Arc?foe(s,a):[]})(t,e),r=o.length>0?o.slice():t.sortPoints(o),i=new hS([t]);i.split(r),[...i].forEach(s=>s.setInclusion(e)),n.I2I=[...i].filter(s=>s.bv===He.INSIDE).map(s=>s.shape),n.I2B=[...i].slice(1).map(s=>s.bv===He.BOUNDARY?s.shape:s.shape.start),n.I2E=[...i].filter(s=>s.bv===He.OUTSIDE).map(s=>s.shape),n.B2I=[],n.B2B=[],n.B2E=[];for(let s of[t.start,t.end])switch(XA(e,s)){case He.INSIDE:n.B2I.push(s);break;case He.BOUNDARY:n.B2B.push(s);break;case He.OUTSIDE:n.B2E.push(s)}return n}function iV(t,e){let n=new QM,[o,r]=OEe(t,e),i=IEe(t,e),s=voe(t,e),a=voe(e,t),[c,l]=LEe(t,e),u=Soe(t,e),_=Soe(e,t);return n.I2I=i.isEmpty()?[]:[i],n.I2B=l,n.I2E=s.isEmpty()?[]:[s],n.B2I=c,n.B2B=o,n.B2E=u,n.E2I=a.isEmpty()?[]:[a],n.E2B=_,n}var MFt=Object.freeze({__proto__:null,contain:function(t,e){return XEe(e,t)},cover:GEe,covered:jEe,disjoint:function(t,e){return!UEe(t,e)},equal:function(t,e){return ZM(t,e).equal()},inside:XEe,intersect:UEe,relate:ZM,touch:function(t,e){return ZM(t,e).touch()}}),jA=class HC{constructor(e=1,n=0,o=0,r=1,i=0,s=0){this.a=e,this.b=n,this.c=o,this.d=r,this.tx=i,this.ty=s}fromMatrix3x3(e){const[n,o,r]=e[0],[i,s,a]=e[1];return new HC(n,i,o,s,r,a)}toMatrix3x3(){return[[this.a,this.c,this.tx],[this.b,this.d,this.ty],[0,0,1]]}clone(){return new HC(this.a,this.b,this.c,this.d,this.tx,this.ty)}transform(e){return[e[0]*this.a+e[1]*this.c+this.tx,e[0]*this.b+e[1]*this.d+this.ty]}multiply(e){return new HC(this.a*e.a+this.c*e.b,this.b*e.a+this.d*e.b,this.a*e.c+this.c*e.d,this.b*e.c+this.d*e.d,this.a*e.tx+this.c*e.ty+this.tx,this.b*e.tx+this.d*e.ty+this.ty)}translate(...e){let n,o;if(e.length!=1||isNaN(e[0].x)||isNaN(e[0].y)){if(e.length!==2||typeof e[0]!="number"||typeof e[1]!="number")throw Q0.ILLEGAL_PARAMETERS;n=e[0],o=e[1]}else n=e[0].x,o=e[0].y;return this.multiply(new HC(1,0,0,1,n,o))}rotate(e,n=0,o=0){let r=Math.cos(e),i=Math.sin(e);return this.translate(n,o).multiply(new HC(r,i,-i,r,0,0)).translate(-n,-o)}scale(e,n){return this.multiply(new HC(e,0,0,n,0,0))}equalTo(e){return!!He.Utils.EQ(this.tx,e.tx)&&!!He.Utils.EQ(this.ty,e.ty)&&!!He.Utils.EQ(this.a,e.a)&&!!He.Utils.EQ(this.b,e.b)&&!!He.Utils.EQ(this.c,e.c)&&!!He.Utils.EQ(this.d,e.d)}};He.Matrix=jA,He.matrix=(...t)=>new He.Matrix(...t);var TFt=class{constructor(t,e){this.low=t,this.high=e}get max(){return this.clone()}less_than(t){return this.low<t.low||this.low===t.low&&this.high<t.high}equal_to(t){return this.low===t.low&&this.high===t.high}intersect(t){return!this.not_intersect(t)}not_intersect(t){return this.high<t.low||t.high<this.low}merge(t){const e=this.low===void 0?t.low:this.low<t.low?this.low:t.low,n=this.high===void 0?t.high:this.high>t.high?this.high:t.high,o=this.clone();return o.low=e,o.high=n,o}output(){return[this.low,this.high]}comparable_less_than(t,e){return t<e}},wFt=class z1t extends TFt{clone(){return new z1t(this.low,this.high)}},lP=class{constructor(t,e,n=null,o=null,r=null,i=0){if(this.left=n,this.right=o,this.parent=r,this.color=i,this.item={key:void 0,values:[]},e!==void 0&&this.item.values.push(e),t!==void 0)if(Array.isArray(t)){const[s,a]=t;if(!Number.isNaN(s)&&!Number.isNaN(a)){let c=s,l=a;c>l&&([c,l]=[l,c]),this.item.key=new wFt(c,l)}}else this.item.key=t;this.max=this.item.key?this.item.key.max:void 0}isNil(){return this.item.key===void 0&&this.item.values.length===0&&this.left===null&&this.right===null&&this.color===0}requireKey(){if(!this.item.key)throw new Error("Node key is undefined (nil/sentinel). Operation is not applicable.");return this.item.key}less_than(t){const e=this.requireKey(),n=t.requireKey();return e.less_than(n)}_value_equal(t){const e=this.item.values[0],n=t.item.values[0];return e&&n&&e.equal_to?e.equal_to(n):e===n}equal_to(t){const e=this.requireKey(),n=t.requireKey();return e.equal_to(n)}intersect(t){const e=this.requireKey(),n=t.requireKey();return e.intersect(n)}copy_data(t){this.item.key=t.item.key,this.item.values=t.item.values.slice()}update_max(){this.max=this.item.key?this.item.key.max:void 0,this.right&&this.right.max&&(this.max=this.max?this.max.merge(this.right.max):this.right.max),this.left&&this.left.max&&(this.max=this.max?this.max.merge(this.left.max):this.left.max)}not_intersect_left_subtree(t){if(!this.left)return!0;const e=this.left.max?this.left.max.high:this.left.item.key.high,n=this.requireKey(),o=t.requireKey();return n.comparable_less_than(e,o.low)}not_intersect_right_subtree(t){if(!this.right)return!0;const e=this.right.max?this.right.max.low:this.right.item.key.low,n=this.requireKey(),o=t.requireKey();return n.comparable_less_than(o.high,e)}},woe=class V1t{constructor(){this.root=null,this.nil_node=new lP}get size(){let e=0;return this.tree_walk(this.root,n=>e+=n.item.values.length),e}get keys(){const e=[];return this.tree_walk(this.root,n=>e.push(n.item.key.output())),e}get values(){const e=[];return this.tree_walk(this.root,n=>{for(const o of n.item.values)e.push(o)}),e}get items(){const e=[];return this.tree_walk(this.root,n=>{const o=n.item.key.output();for(const r of n.item.values)e.push({key:o,value:r})}),e}isEmpty(){return this.root==null||this.root===this.nil_node}clear(){this.root=null}insert(e,n=e){if(e===void 0)return;const o=this.tree_search(this.root,new lP(e));if(o)return o.item.values.push(n),o;const r=new lP(e,n,this.nil_node,this.nil_node,null,1);return this.tree_insert(r),this.recalc_max(r),r}exist(e,n=e){const o=this.tree_search(this.root,new lP(e));return!!o&&(arguments.length<2||n===e||o.item.values.some(r=>r&&r.equal_to?r.equal_to(n):r===n))}remove(e,n=e){const o=this.tree_search(this.root,new lP(e));if(!o)return;if(arguments.length<2)return this.tree_delete(o),o;const r=o.item.values.findIndex(i=>i&&i.equal_to?i.equal_to(n):i===n);return r>=0?(o.item.values.splice(r,1),o.item.values.length===0&&this.tree_delete(o),o):void 0}search(e,n=(o,r)=>o===r?r.output():o){const o=new lP(e),r=[];this.tree_search_interval(this.root,o,r);const i=[];for(const s of r)for(const a of s.item.values)i.push(n(a,s.item.key));return i}intersect_any(e){const n=new lP(e);return this.tree_find_any_interval(this.root,n)}forEach(e){this.tree_walk(this.root,n=>{for(const o of n.item.values)e(n.item.key,o)})}map(e){const n=new V1t;return this.tree_walk(this.root,o=>{for(const r of o.item.values)n.insert(o.item.key,e(r,o.item.key))}),n}*iterate(e,n=(o,r)=>o===r?r.output():o){let o=null;for(e?o=this.tree_search_nearest_forward(this.root,new lP(e)):this.root&&(o=this.local_minimum(this.root));o;){for(const r of o.item.values)yield n(r,o.item.key);o=this.tree_successor(o)}}recalc_max(e){let n=e;for(;n.parent!=null;)n.parent.update_max(),n=n.parent}tree_insert(e){let n=this.root,o=null;if(this.root==null||this.root===this.nil_node)this.root=e;else{for(;n!==this.nil_node;)o=n,n=e.less_than(n)?n.left:n.right;e.parent=o,e.less_than(o)?o.left=e:o.right=e}this.insert_fixup(e)}insert_fixup(e){let n,o;for(n=e;n!==this.root&&n.parent.color===1;)n.parent===n.parent.parent.left?(o=n.parent.parent.right,o.color===1?(n.parent.color=0,o.color=0,n.parent.parent.color=1,n=n.parent.parent):(n===n.parent.right&&(n=n.parent,this.rotate_left(n)),n.parent.color=0,n.parent.parent.color=1,this.rotate_right(n.parent.parent))):(o=n.parent.parent.left,o.color===1?(n.parent.color=0,o.color=0,n.parent.parent.color=1,n=n.parent.parent):(n===n.parent.left&&(n=n.parent,this.rotate_right(n)),n.parent.color=0,n.parent.parent.color=1,this.rotate_left(n.parent.parent)));this.root.color=0}tree_delete(e){let n,o;n=e.left===this.nil_node||e.right===this.nil_node?e:this.tree_successor(e),o=n.left!==this.nil_node?n.left:n.right,o.parent=n.parent,n===this.root?this.root=o:(n===n.parent.left?n.parent.left=o:n.parent.right=o,n.parent.update_max()),this.recalc_max(o),n!==e&&(e.copy_data(n),e.update_max(),this.recalc_max(e)),n.color===0&&this.delete_fixup(o)}delete_fixup(e){let n,o=e;for(;o!==this.root&&o.parent!=null&&o.color===0;)o===o.parent.left?(n=o.parent.right,n.color===1&&(n.color=0,o.parent.color=1,this.rotate_left(o.parent),n=o.parent.right),n.left.color===0&&n.right.color===0?(n.color=1,o=o.parent):(n.right.color===0&&(n.color=1,n.left.color=0,this.rotate_right(n),n=o.parent.right),n.color=o.parent.color,o.parent.color=0,n.right.color=0,this.rotate_left(o.parent),o=this.root)):(n=o.parent.left,n.color===1&&(n.color=0,o.parent.color=1,this.rotate_right(o.parent),n=o.parent.left),n.left.color===0&&n.right.color===0?(n.color=1,o=o.parent):(n.left.color===0&&(n.color=1,n.right.color=0,this.rotate_left(n),n=o.parent.left),n.color=o.parent.color,o.parent.color=0,n.left.color=0,this.rotate_right(o.parent),o=this.root));o.color=0}tree_search(e,n){if(e!=null&&e!==this.nil_node)return n.equal_to(e)?e:n.less_than(e)?this.tree_search(e.left,n):this.tree_search(e.right,n)}tree_search_nearest_forward(e,n){let o=null,r=e;for(;r&&r!==this.nil_node;)r.less_than(n)?r.intersect(n)?(o=r,r=r.left):r=r.right:(o&&!r.less_than(o)||(o=r),r=r.left);return o||null}tree_search_interval(e,n,o){e!=null&&e!==this.nil_node&&(e.left===this.nil_node||e.not_intersect_left_subtree(n)||this.tree_search_interval(e.left,n,o),e.intersect(n)&&o.push(e),e.right===this.nil_node||e.not_intersect_right_subtree(n)||this.tree_search_interval(e.right,n,o))}tree_find_any_interval(e,n){let o=!1;return e!=null&&e!==this.nil_node&&(e.left===this.nil_node||e.not_intersect_left_subtree(n)||(o=this.tree_find_any_interval(e.left,n)),o||(o=e.intersect(n)),o||e.right===this.nil_node||e.not_intersect_right_subtree(n)||(o=this.tree_find_any_interval(e.right,n))),o}local_minimum(e){let n=e;for(;n.left!=null&&n.left!==this.nil_node;)n=n.left;return n}local_maximum(e){let n=e;for(;n.right!=null&&n.right!==this.nil_node;)n=n.right;return n}tree_successor(e){let n,o,r;if(e.right!==this.nil_node)n=this.local_minimum(e.right);else{for(o=e,r=e.parent;r!=null&&r.right===o;)o=r,r=r.parent;n=r}return n}rotate_left(e){const n=e.right;e.right=n.left,n.left!==this.nil_node&&(n.left.parent=e),n.parent=e.parent,e===this.root?this.root=n:e===e.parent.left?e.parent.left=n:e.parent.right=n,n.left=e,e.parent=n,e!==null&&e!==this.nil_node&&e.update_max(),n!=null&&n!==this.nil_node&&n.update_max()}rotate_right(e){const n=e.left;e.left=n.right,n.right!==this.nil_node&&(n.right.parent=e),n.parent=e.parent,e===this.root?this.root=n:e===e.parent.left?e.parent.left=n:e.parent.right=n,n.right=e,e.parent=n,e!==null&&e!==this.nil_node&&e.update_max(),n!=null&&n!==this.nil_node&&n.update_max()}tree_walk(e,n){e!=null&&e!==this.nil_node&&(this.tree_walk(e.left,n),n(e),this.tree_walk(e.right,n))}testRedBlackProperty(){let e=!0;return this.tree_walk(this.root,function(n){n.color===1&&(n.left.color===0&&n.right.color===0||(e=!1))}),e}testBlackHeightProperty(e){let n=0,o=0,r=0;if(e.color===0&&n++,o=e.left!==this.nil_node?this.testBlackHeightProperty(e.left):1,r=e.right!==this.nil_node?this.testBlackHeightProperty(e.right):1,o!==r)throw new Error("Red-black height property violated");return n+=o,n}},EFt=class extends Set{constructor(t){super(t),this.index=new woe,this.forEach(e=>this.index.insert(e))}add(t){let e=this.size;const{key:n,value:o}=t,r=n||t.box,i=o||t;return super.add(i),this.size>e&&this.index.insert(r,i),this}delete(t){const{key:e,value:n}=t,o=e||t.box,r=n||t;let i=super.delete(r);return i&&this.index.remove(o,r),i}clear(){super.clear(),this.index=new woe}search(t){return this.index.search(t)}hit(t){let e=new He.Box(t.x-1,t.y-1,t.x+1,t.y+1);return this.index.search(e).filter(n=>t.on(n))}svg(){return[...this].reduce((t,e)=>t+e.svg(),"")}};He.PlanarSet=EFt;var uP=class{get name(){throw Q0.CANNOT_INVOKE_ABSTRACT_METHOD}get box(){throw Q0.CANNOT_INVOKE_ABSTRACT_METHOD}clone(){throw Q0.CANNOT_INVOKE_ABSTRACT_METHOD}translate(...t){return this.transform(new jA().translate(...t))}rotate(t,e=new He.Point){return this.transform(new jA().rotate(t,e.x,e.y))}scale(t,e){return this.transform(new jA().scale(t,e))}transform(...t){throw Q0.CANNOT_INVOKE_ABSTRACT_METHOD}toJSON(){return Object.assign({},this,{name:this.name})}svg(t={}){throw Q0.CANNOT_INVOKE_ABSTRACT_METHOD}};He.Point=class $1t extends uP{constructor(...e){if(super(),this.x=0,this.y=0,e.length!==0){if(e.length===1&&e[0]instanceof Array&&e[0].length===2){let n=e[0];if(typeof n[0]=="number"&&typeof n[1]=="number")return this.x=n[0],void(this.y=n[1])}if(e.length===1&&e[0]instanceof Object&&e[0].name==="point"){let{x:n,y:o}=e[0];return this.x=n,void(this.y=o)}if(e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number")return this.x=e[0],void(this.y=e[1]);throw Q0.ILLEGAL_PARAMETERS}}get box(){return new He.Box(this.x,this.y,this.x,this.y)}clone(){return new He.Point(this.x,this.y)}get vertices(){return[this.clone()]}equalTo(e){return He.Utils.EQ(this.x,e.x)&&He.Utils.EQ(this.y,e.y)}lessThan(e){return!!He.Utils.LT(this.y,e.y)||!(!He.Utils.EQ(this.y,e.y)||!He.Utils.LT(this.x,e.x))}transform(e){return new He.Point(e.transform([this.x,this.y]))}projectionOn(e){if(this.equalTo(e.pt))return this.clone();let n=new He.Vector(this,e.pt);if(He.Utils.EQ_0(n.cross(e.norm)))return e.pt.clone();let o=n.dot(e.norm),r=e.norm.multiply(o);return this.translate(r)}leftTo(e){let n=new He.Vector(e.pt,this);return He.Utils.GT(n.dot(e.norm),0)}distanceTo(e){if(e instanceof $1t){let n=e.x-this.x,o=e.y-this.y;return[Math.sqrt(n*n+o*o),new He.Segment(this,e)]}return e instanceof He.Line?He.Distance.point2line(this,e):e instanceof He.Circle?He.Distance.point2circle(this,e):e instanceof He.Segment?He.Distance.point2segment(this,e):e instanceof He.Arc?He.Distance.point2arc(this,e):e instanceof He.Polygon?He.Distance.point2polygon(this,e):e instanceof He.PlanarSet?He.Distance.shape2planarSet(this,e):e instanceof He.Multiline?He.Distance.shape2multiline(this,e):void 0}on(e){if(e instanceof He.Point)return this.equalTo(e);if(e.contains&&e.contains instanceof Function)return e.contains(this);throw He.Errors.UNSUPPORTED_SHAPE_TYPE}get name(){return"point"}svg(e={}){const n=e.r??3;return`
|
|
685
|
+
</path>`,n}};He.Multiline=hS;function qM(t,e,n){let o=n.length,r=t.shape.split(e);if(r.length===0)return;let i=0;i=r[0]===null?0:r[1]===null?t.shape.length:r[0].length;let s,a=0;uS(i,0)&&(a|=1),uS(i,t.shape.length)&&(a|=2),s=i===1/0?r[0].coord(e):2&a&&t.next&&t.next.arc_length===0?0:t.arc_length+i,n.push({id:o,pt:e,arc_length:s,edge_before:t,edge_after:void 0,face:t.face,is_vertex:a})}function WA(t){t.int_points1_sorted=cP(t.int_points1),t.int_points2_sorted=cP(t.int_points2)}function cP(t){let e=new Map,n=0;for(let o of t)e.has(o.face)||(e.set(o.face,n),n++);for(let o of t)o.faceId=e.get(o.face);return t.slice().sort(pFt)}function pFt(t,e){return t.faceId<e.faceId?-1:t.faceId>e.faceId?1:t.arc_length<e.arc_length?-1:t.arc_length>e.arc_length?1:0}function yoe(t){if(t.int_points1.length<2)return;let e,n,o,r,i=!1;for(let s=0;s<t.int_points1_sorted.length;s++)if(t.int_points1_sorted[s].id!==-1){e=t.int_points1_sorted[s],n=t.int_points2[e.id];for(let a=s+1;a<t.int_points1_sorted.length&&(o=t.int_points1_sorted[a],uS(o.arc_length,e.arc_length));a++)o.id!==-1&&(r=t.int_points2[o.id],r.id!==-1&&o.edge_before===e.edge_before&&o.edge_after===e.edge_after&&r.edge_before===n.edge_before&&r.edge_after===n.edge_after&&(o.id=-1,r.id=-1,i=!0))}n=t.int_points2_sorted[0],e=t.int_points1[n.id];for(let s=1;s<t.int_points2_sorted.length;s++){let a=t.int_points2_sorted[s];if(a.id===-1)continue;if(n.id===-1||!uS(a.arc_length,n.arc_length)){n=a,e=t.int_points1[n.id];continue}let c=t.int_points1[a.id];c.edge_before===e.edge_before&&c.edge_after===e.edge_after&&a.edge_before===n.edge_before&&a.edge_after===n.edge_after&&(c.id=-1,a.id=-1,i=!0)}i&&(t.int_points1=t.int_points1.filter(s=>s.id>=0),t.int_points2=t.int_points2.filter(s=>s.id>=0),t.int_points1.forEach((s,a)=>s.id=a),t.int_points2.forEach((s,a)=>s.id=a))}function boe(t){for(let e of t)e.edge_before&&(e.edge_before.bvStart=void 0,e.edge_before.bvEnd=void 0,e.edge_before.bv=void 0,e.edge_before.overlap=void 0),e.edge_after&&(e.edge_after.bvStart=void 0,e.edge_after.bvEnd=void 0,e.edge_after.bv=void 0,e.edge_after.overlap=void 0);for(let e of t)e.edge_before&&(e.edge_before.bvEnd=2),e.edge_after&&(e.edge_after.bvStart=2)}function Poe(t,e){for(let n of t)n.edge_before&&n.edge_before.setInclusion(e),n.edge_after&&n.edge_after.setInclusion(e)}function JM(t,e,n){let o,r,i=1;if(t.length===1)return 1;o=t[e];for(let s=e+1;s<t.length&&o.face===n&&(r=t[s],r.pt.equalTo(o.pt)&&r.edge_before===o.edge_before&&r.edge_after===o.edge_after);s++)i++;return i}function KM(t,e){if(e){for(let n of e){let o=n.edge_before;if(n.is_vertex=0,o.shape.start&&o.shape.start.equalTo(n.pt)&&(n.is_vertex|=1),o.shape.end&&o.shape.end.equalTo(n.pt)&&(n.is_vertex|=2),1&n.is_vertex){n.edge_before=o.prev,o.prev&&(n.is_vertex=2);continue}if(2&n.is_vertex)continue;let r=t.addVertex(n.pt,o);n.edge_before=r}for(let n of e)n.edge_before?n.edge_after=n.edge_before.next:t instanceof hS&&1&n.is_vertex&&(n.edge_after=t.first)}}function kEe(t,e,n){const o=t.edge_before,r=e.edge_after,i=n.length;o.next=n[0],n[0].prev=o,n[i-1].next=r,r.prev=n[i-1]}He.multiline=(...t)=>new He.Multiline(...t);var{INSIDE:w6,OUTSIDE:E6,BOUNDARY:Qm,OVERLAP_SAME:fFt,OVERLAP_OPPOSITE:xFt}=tV,{NOT_VERTEX:Zio,START_VERTEX:NEe,END_VERTEX:HEe}=tV;function voe(t,e){let n=e.clone().reverse(),[o]=UA(t,n,3,!0);return o}function IEe(t,e){let[n]=UA(t,e,2,!0);return n}function LEe(t,e){let[n,o]=UA(t,e,2,!1),r=[];for(let s of n.faces)r=[...r,...[...s.edges].map(a=>a.shape)];let i=[];for(let s of o.faces)i=[...i,...[...s.edges].map(a=>a.shape)];return[r,i]}function Soe(t,e){let[n]=UA(t,e,3,!1),o=[];for(let r of n.faces)o=[...o,...[...r.edges].map(i=>i.shape)];return o}function OEe(t,e){let n=t.clone(),o=e.clone(),r=FEe(n,o);return WA(r),KM(n,r.int_points1_sorted),KM(o,r.int_points2_sorted),yoe(r),WA(r),[r.int_points1_sorted.map(i=>i.pt),r.int_points2_sorted.map(i=>i.pt)]}function gFt(t,e,n,o){let r=BEe(t,n.int_points1),i=BEe(e,n.int_points2);for(zEe(r,e),zEe(i,t),boe(n.int_points1),boe(n.int_points2),Poe(n.int_points1,e),Poe(n.int_points2,t);yFt(t,e,n.int_points1,n.int_points1_sorted,n.int_points2,n););(function(s){let a,c,l,u=s.int_points1.length;for(let _=0;_<u;_++){let d=s.int_points1_sorted[_];d.face!==a&&(c=_,a=d.face);let m,h=_,p=JM(s.int_points1_sorted,_,a);m=h+p<u&&s.int_points1_sorted[h+p].face===a?h+p:c;let x=JM(s.int_points1_sorted,m,a);l=null;for(let M=m;M<m+x;M++){let w=s.int_points1_sorted[M];if(w.face===a&&s.int_points2[w.id].face===s.int_points2[d.id].face){l=w;break}}if(l===null)continue;let f=d.edge_after,g=l.edge_before;if(f.bv!==2||g.bv!==2||f!==g)continue;let y=s.int_points2[d.id],b=s.int_points2[l.id],v=y.edge_after,S=b.edge_before;v.bv===2&&S.bv===2&&v===S||(y=s.int_points2[l.id],b=s.int_points2[d.id],v=y.edge_after,S=b.edge_before),v.bv===2&&S.bv===2&&v===S&&f.setOverlap(v)}})(n),Coe(t,o,n.int_points1_sorted,!0),Coe(e,o,n.int_points2_sorted,!1),VEe(t,r,o,!0),VEe(e,i,o,!1)}function UA(t,e,n,o){let r=t.clone(),i=e.clone(),s=FEe(r,i);return WA(s),KM(r,s.int_points1_sorted),KM(i,s.int_points2_sorted),yoe(s),WA(s),gFt(r,i,s,n),o&&(function(a,c,l){(function(u,_,d,m){for(let h of _.faces){for(let p of h)u.edges.add(p);m.find(p=>p.face===h)===void 0&&u.addFace(h.first,h.last)}})(a,c,0,l.int_points2),(function(u,_,d){if(d.int_points1.length!==0)for(let m=0;m<d.int_points1.length;m++){let h=d.int_points1[m],p=d.int_points2[m];if(h.edge_before!==void 0&&h.edge_after===void 0&&p.edge_before===void 0&&p.edge_after!==void 0&&(h.edge_before.next=p.edge_after,p.edge_after.prev=h.edge_before,h.edge_after=p.edge_after,p.edge_before=h.edge_before),p.edge_before!==void 0&&p.edge_after===void 0&&h.edge_before===void 0&&h.edge_after!==void 0&&(p.edge_before.next=h.edge_after,h.edge_after.prev=p.edge_before,p.edge_after=h.edge_after,h.edge_before=p.edge_before),h.edge_before!==void 0&&h.edge_after===void 0)for(let x of d.int_points1_sorted)x!==h&&x.edge_before===void 0&&x.edge_after!==void 0&&x.pt.equalTo(h.pt)&&(h.edge_before.next=x.edge_after,x.edge_after.prev=h.edge_before,h.edge_after=x.edge_after,x.edge_before=h.edge_before);if(p.edge_before!==void 0&&p.edge_after===void 0)for(let x of d.int_points2_sorted)x!==p&&x.edge_before===void 0&&x.edge_after!==void 0&&x.pt.equalTo(p.pt)&&(p.edge_before.next=x.edge_after,x.edge_after.prev=p.edge_before,p.edge_after=x.edge_after,x.edge_before=p.edge_before)}})(0,0,l),Moe(a,l.int_points1),Moe(c,l.int_points2),Toe(a,l.int_points1,l.int_points2),Toe(a,l.int_points2,l.int_points1),$Ee(a),$Ee(c)})(r,i,s),[r,i]}function FEe(t,e){let n={int_points1:[],int_points2:[]};for(let o of t.edges){let r=e.edges.search(o.box);for(let i of r){let s=o.shape.intersect(i.shape);for(let a of s)qM(o,a,n.int_points1),qM(i,a,n.int_points2)}}return n}function BEe(t,e){let n=[];for(let o of t.faces)e.find(r=>r.face===o)||n.push(o);return n}function zEe(t,e){for(let n of t)n.first.bv=n.first.bvStart=n.first.bvEnd=void 0,n.first.setInclusion(e)}function yFt(t,e,n,o,r,i){let s,a,c,l=o.length,u=!1;for(let _=0;_<l;_++){let d=o[_];d.face!==s&&(a=_,s=d.face);let m,h=_,p=JM(o,_,s);m=h+p<l&&o[h+p].face===s?h+p:a;let x=JM(o,m,s);c=null;for(let y=m;y<m+x;y++){let b=o[y];if(b.face===s&&r[b.id].face===r[d.id].face){c=b;break}}if(c===null)continue;let f=d.edge_after,g=c.edge_before;if(f.bv!==Qm||g.bv==Qm)if(f.bv==Qm||g.bv!==Qm){if(f.bv===Qm&&g.bv===Qm&&f!=g||f.bv===w6&&g.bv===E6||f.bv===E6&&g.bv===w6){let y=f.next;for(;y!=g;)y.bvStart=void 0,y.bvEnd=void 0,y.bv=void 0,y.setInclusion(e),y=y.next}if(f.bv===Qm&&g.bv===Qm&&f!=g){let y,b=f.next;for(;b!=g;){if(b.bv!=Qm){if(y===void 0)y=b.bv;else if(b.bv!=y)throw Q0.UNRESOLVED_BOUNDARY_CONFLICT}b=b.next}y!=null&&(f.bv=y,g.bv=y);continue}if(f.bv===w6&&g.bv===E6||f.bv===E6&&g.bv===w6){let y=f;for(;y!=g;){if(y.bvStart===f.bv&&y.bvEnd===g.bv){let[b,v]=y.shape.distanceTo(e);if(b<10*He.DP_TOL){qM(y,v.ps,n);let S=n[n.length-1];if(S.is_vertex&NEe)S.edge_after=y,S.edge_before=y.prev,y.bvStart=Qm,y.bv=void 0,y.setInclusion(e);else if(S.is_vertex&HEe)S.edge_after=y.next,y.bvEnd=Qm,y.bv=void 0,y.setInclusion(e);else{let D=e.addVertex(S.pt,y);S.edge_before=D,S.edge_after=D.next,D.setInclusion(e),D.next.bvStart=Qm,D.next.bvEnd=void 0,D.next.bv=void 0,D.next.setInclusion(e)}let M=e.findEdgeByPoint(v.pe);qM(M,v.pe,r);let w=r[r.length-1];if(w.is_vertex&NEe)w.edge_after=M,w.edge_before=M.prev;else if(w.is_vertex&HEe)w.edge_after=M.next;else{let D=r.find(I=>I.edge_after===M),A=e.addVertex(w.pt,M);w.edge_before=A,w.edge_after=A.next,D&&(D.edge_after=A),A.bvStart=void 0,A.bvEnd=Qm,A.bv=void 0,A.setInclusion(t),A.next.bvStart=Qm,A.next.bvEnd=void 0,A.next.bv=void 0,A.next.setInclusion(t)}WA(i),u=!0;break}}y=y.next}if(u)break;throw Q0.UNRESOLVED_BOUNDARY_CONFLICT}}else g.bv=f.bv;else f.bv=g.bv}return u}function Coe(t,e,n,o){if(!n)return;let r,i,s,a;for(let c=0;c<n.length;c++){if(s=n[c],s.face!==r&&(i=c,r=s.face),r.isEmpty())continue;let l,u=c,_=JM(n,c,r);l=u+_<n.length&&n[u+_].face===s.face?u+_:i,a=n[l];let d=l,m=JM(n,d,r),h=s.edge_after,p=a.edge_before;if(h.bv===w6&&p.bv===w6&&e===1||h.bv===E6&&p.bv===E6&&e===2||(h.bv===E6||p.bv===E6)&&e===3&&!o||(h.bv===w6||p.bv===w6)&&e===3&&o||h.bv===Qm&&p.bv===Qm&&h.overlap&fFt&&o||h.bv===Qm&&p.bv===Qm&&h.overlap&xFt){t.removeChain(r,h,p);for(let x=u;x<u+_;x++)n[x].edge_after=void 0;for(let x=d;x<d+m;x++)n[x].edge_before=void 0}c+=_-1}}function Moe(t,e){for(let n of e)t.faces.delete(n.face),n.face=void 0,n.edge_before&&(n.edge_before.face=void 0),n.edge_after&&(n.edge_after.face=void 0)}function Toe(t,e,n){for(let o of e){if(o.edge_before===void 0||o.edge_after===void 0||o.face||o.edge_after.face||o.edge_before.face)continue;let r=o.edge_after,i=o.edge_before;try{hoe.testInfiniteLoop(r)}catch{throw Q0.CANNOT_COMPLETE_BOOLEAN_OPERATION}let s=t.addFace(r,i);for(let a of e)a.edge_before&&a.edge_after&&a.edge_before.face===s&&a.edge_after.face===s&&(a.face=s);for(let a of n)a.edge_before&&a.edge_after&&a.edge_before.face===s&&a.edge_after.face===s&&(a.face=s)}}function VEe(t,e,n,o){for(let r of e){let i=r.first.bv;(n===1&&i===w6||n===3&&i===w6&&o||n===3&&i===E6&&!o||n===2&&i===E6)&&t.deleteFace(r)}}function $Ee(t){const e=[];for(const n of t.edges)n.face&&t.faces.has(n.face)||e.push(n);for(const n of e)t.edges.delete(n)}var WEe=Object.freeze({__proto__:null,BOOLEAN_INTERSECT:2,BOOLEAN_SUBTRACT:3,BOOLEAN_UNION:1,calculateIntersections:OEe,innerClip:LEe,intersect:IEe,outerClip:Soe,removeNotRelevantChains:Coe,removeOldFaces:Moe,restoreFaces:Toe,subtract:voe,unify:function(t,e){let[n]=UA(t,e,1,!0);return n}}),bFt=RegExp("T.F..FFF.|T.F...F.."),PFt=RegExp("T........|.T.......|...T.....|....T...."),vFt=RegExp("FT.......|F..T.....|F...T...."),SFt=RegExp("T.F..F..."),CFt=RegExp("T.F..F...|.TF..F...|..FT.F...|..F.TF..."),QM=class{constructor(){this.m=new Array(9).fill(void 0)}get I2I(){return this.m[0]}set I2I(t){this.m[0]=t}get I2B(){return this.m[1]}set I2B(t){this.m[1]=t}get I2E(){return this.m[2]}set I2E(t){this.m[2]=t}get B2I(){return this.m[3]}set B2I(t){this.m[3]=t}get B2B(){return this.m[4]}set B2B(t){this.m[4]=t}get B2E(){return this.m[5]}set B2E(t){this.m[5]=t}get E2I(){return this.m[6]}set E2I(t){this.m[6]=t}get E2B(){return this.m[7]}set E2B(t){this.m[7]=t}get E2E(){return this.m[8]}set E2E(t){this.m[8]=t}toString(){return this.m.map(t=>t instanceof Array&&t.length>0?"T":t instanceof Array&&t.length===0?"F":"*").join("")}equal(){return bFt.test(this.toString())}intersect(){return PFt.test(this.toString())}touch(){return vFt.test(this.toString())}inside(){return SFt.test(this.toString())}covered(){return CFt.test(this.toString())}};function XA(t,e){let n,o=new He.Ray(e),r=new He.Line(o.pt,o.norm);const i=new He.Box(o.box.xmin-He.DP_TOL,o.box.ymin-He.DP_TOL,o.box.xmax+He.DP_TOL,o.box.ymax+He.DP_TOL);if(t.box.not_intersect(i))return He.OUTSIDE;let s=t.edges.search(i);if(s.length===0)return He.OUTSIDE;for(let u of s)if(u.shape.contains(e))return He.BOUNDARY;let a=[...t.faces],c=[];for(let u of s)for(let _ of o.intersect(u.shape)){if(_.equalTo(e))return He.BOUNDARY;c.push({pt:_,edge:u,face_index:a.indexOf(u.face)})}c.sort((u,_)=>pEe(u.pt.x,_.pt.x)?-1:mEe(u.pt.x,_.pt.x)?1:u.face_index<_.face_index?-1:u.face_index>_.face_index?1:u.edge.arc_length<_.edge.arc_length?-1:u.edge.arc_length>_.edge.arc_length?1:0);let l=0;for(let u=0;u<c.length;u++){let _=c[u];if(_.pt.equalTo(_.edge.shape.start)){if(u>0&&_.pt.equalTo(c[u-1].pt)&&_.face_index===c[u-1].face_index&&_.edge.prev===c[u-1].edge)continue;let d=_.edge.prev;for(;doe(d.length);)d=d.prev;let m=d.shape.tangentInEnd(),h=_.pt.translate(m),p=_.edge.shape.tangentInStart(),x=_.pt.translate(p),f=h.leftTo(r),g=x.leftTo(r);(f&&!g||!f&&g)&&l++}else if(_.pt.equalTo(_.edge.shape.end)){if(u>0&&_.pt.equalTo(c[u-1].pt)&&_.face_index===c[u-1].face_index&&_.edge.next===c[u-1].edge)continue;let d=_.edge.next;for(;doe(d.length);)d=d.next;let m=d.shape.tangentInStart(),h=_.pt.translate(m),p=_.edge.shape.tangentInEnd(),x=_.pt.translate(p),f=h.leftTo(r),g=x.leftTo(r);(f&&!g||!f&&g)&&l++}else if(_.edge.shape instanceof He.Segment)l++;else{let d=_.edge.shape.box;uS(_.pt.y,d.ymin)||uS(_.pt.y,d.ymax)||l++}}return n=l%2==1?1:0,n}function UEe(t,e){return ZM(t,e).intersect()}function XEe(t,e){return ZM(t,e).inside()}function jEe(t,e){return ZM(t,e).covered()}function GEe(t,e){return jEe(e,t)}function ZM(t,e){return t instanceof He.Line&&e instanceof He.Line?(function(n,o){let r=new QM,i=XM(n,o);return i.length===0?n.contains(o.pt)&&o.contains(n.pt)?(r.I2I=[n],r.I2E=[],r.E2I=[]):(r.I2I=[],r.I2E=[n],r.E2I=[o]):(r.I2I=i,r.I2E=n.split(i),r.E2I=o.split(i)),r})(t,e):t instanceof He.Line&&e instanceof He.Circle?(function(n,o){let r=new QM,i=dS(n,o);if(i.length===0)r.I2I=[],r.I2B=[],r.I2E=[n],r.E2I=[o];else if(i.length===1)r.I2I=[],r.I2B=i,r.I2E=n.split(i),r.E2I=[o];else{let s=new hS([n]),a=n.sortPoints(i);s.split(a);let c=s.toShapes();r.I2I=[c[1]],r.I2B=a,r.I2E=[c[0],c[2]],r.E2I=new He.Polygon([o.toArc()]).cutWithLine(n)}return r})(t,e):t instanceof He.Line&&e instanceof He.Box?(function(n,o){let r=new QM,i=jM(n,o);if(i.length===0)r.I2I=[],r.I2B=[],r.I2E=[n],r.E2I=[o];else if(i.length===1)r.I2I=[],r.I2B=i,r.I2E=n.split(i),r.E2I=[o];else{let s=new hS([n]),a=n.sortPoints(i);s.split(a);let c=s.toShapes();o.toSegments().some(l=>l.contains(i[0])&&l.contains(i[1]))?(r.I2I=[],r.I2B=[c[1]],r.I2E=[c[0],c[2]],r.E2I=[o]):(r.I2I=[c[1]],r.I2B=a,r.I2E=[c[0],c[2]],r.E2I=new He.Polygon(o.toSegments()).cutWithLine(n))}return r})(t,e):t instanceof He.Line&&e instanceof He.Polygon?(function(n,o){let r=new QM,i=$A(n,o),s=new hS([n]),a=i.length>0?i.slice():n.sortPoints(i);return s.split(a),[...s].forEach(c=>c.setInclusion(o)),r.I2I=[...s].filter(c=>c.bv===He.INSIDE).map(c=>c.shape),r.I2B=[...s].slice(1).map(c=>c.bv===He.BOUNDARY?c.shape:c.shape.start),r.I2E=[...s].filter(c=>c.bv===He.OUTSIDE).map(c=>c.shape),r.E2I=o.cutWithLine(n),r})(t,e):(t instanceof He.Segment||t instanceof He.Arc)&&e instanceof He.Polygon?YEe(t,e):(t instanceof He.Segment||t instanceof He.Arc)&&(e instanceof He.Circle||e instanceof He.Box)?YEe(t,new He.Polygon(e)):t instanceof He.Polygon&&e instanceof He.Polygon?iV(t,e):(t instanceof He.Circle||t instanceof He.Box)&&(e instanceof He.Circle||e instanceof He.Box)?iV(new He.Polygon(t),new He.Polygon(e)):(t instanceof He.Circle||t instanceof He.Box)&&e instanceof He.Polygon?iV(new He.Polygon(t),e):t instanceof He.Polygon&&(e instanceof He.Circle||e instanceof He.Box)?iV(t,new He.Polygon(e)):void 0}function YEe(t,e){let n=new QM,o=(function(s,a){return s instanceof He.Line?$A(s,a):s instanceof He.Segment?poe(s,a):s instanceof He.Arc?foe(s,a):[]})(t,e),r=o.length>0?o.slice():t.sortPoints(o),i=new hS([t]);i.split(r),[...i].forEach(s=>s.setInclusion(e)),n.I2I=[...i].filter(s=>s.bv===He.INSIDE).map(s=>s.shape),n.I2B=[...i].slice(1).map(s=>s.bv===He.BOUNDARY?s.shape:s.shape.start),n.I2E=[...i].filter(s=>s.bv===He.OUTSIDE).map(s=>s.shape),n.B2I=[],n.B2B=[],n.B2E=[];for(let s of[t.start,t.end])switch(XA(e,s)){case He.INSIDE:n.B2I.push(s);break;case He.BOUNDARY:n.B2B.push(s);break;case He.OUTSIDE:n.B2E.push(s)}return n}function iV(t,e){let n=new QM,[o,r]=OEe(t,e),i=IEe(t,e),s=voe(t,e),a=voe(e,t),[c,l]=LEe(t,e),u=Soe(t,e),_=Soe(e,t);return n.I2I=i.isEmpty()?[]:[i],n.I2B=l,n.I2E=s.isEmpty()?[]:[s],n.B2I=c,n.B2B=o,n.B2E=u,n.E2I=a.isEmpty()?[]:[a],n.E2B=_,n}var MFt=Object.freeze({__proto__:null,contain:function(t,e){return XEe(e,t)},cover:GEe,covered:jEe,disjoint:function(t,e){return!UEe(t,e)},equal:function(t,e){return ZM(t,e).equal()},inside:XEe,intersect:UEe,relate:ZM,touch:function(t,e){return ZM(t,e).touch()}}),jA=class HC{constructor(e=1,n=0,o=0,r=1,i=0,s=0){this.a=e,this.b=n,this.c=o,this.d=r,this.tx=i,this.ty=s}fromMatrix3x3(e){const[n,o,r]=e[0],[i,s,a]=e[1];return new HC(n,i,o,s,r,a)}toMatrix3x3(){return[[this.a,this.c,this.tx],[this.b,this.d,this.ty],[0,0,1]]}clone(){return new HC(this.a,this.b,this.c,this.d,this.tx,this.ty)}transform(e){return[e[0]*this.a+e[1]*this.c+this.tx,e[0]*this.b+e[1]*this.d+this.ty]}multiply(e){return new HC(this.a*e.a+this.c*e.b,this.b*e.a+this.d*e.b,this.a*e.c+this.c*e.d,this.b*e.c+this.d*e.d,this.a*e.tx+this.c*e.ty+this.tx,this.b*e.tx+this.d*e.ty+this.ty)}translate(...e){let n,o;if(e.length!=1||isNaN(e[0].x)||isNaN(e[0].y)){if(e.length!==2||typeof e[0]!="number"||typeof e[1]!="number")throw Q0.ILLEGAL_PARAMETERS;n=e[0],o=e[1]}else n=e[0].x,o=e[0].y;return this.multiply(new HC(1,0,0,1,n,o))}rotate(e,n=0,o=0){let r=Math.cos(e),i=Math.sin(e);return this.translate(n,o).multiply(new HC(r,i,-i,r,0,0)).translate(-n,-o)}scale(e,n){return this.multiply(new HC(e,0,0,n,0,0))}equalTo(e){return!!He.Utils.EQ(this.tx,e.tx)&&!!He.Utils.EQ(this.ty,e.ty)&&!!He.Utils.EQ(this.a,e.a)&&!!He.Utils.EQ(this.b,e.b)&&!!He.Utils.EQ(this.c,e.c)&&!!He.Utils.EQ(this.d,e.d)}};He.Matrix=jA,He.matrix=(...t)=>new He.Matrix(...t);var TFt=class{constructor(t,e){this.low=t,this.high=e}get max(){return this.clone()}less_than(t){return this.low<t.low||this.low===t.low&&this.high<t.high}equal_to(t){return this.low===t.low&&this.high===t.high}intersect(t){return!this.not_intersect(t)}not_intersect(t){return this.high<t.low||t.high<this.low}merge(t){const e=this.low===void 0?t.low:this.low<t.low?this.low:t.low,n=this.high===void 0?t.high:this.high>t.high?this.high:t.high,o=this.clone();return o.low=e,o.high=n,o}output(){return[this.low,this.high]}comparable_less_than(t,e){return t<e}},wFt=class z1t extends TFt{clone(){return new z1t(this.low,this.high)}},lP=class{constructor(t,e,n=null,o=null,r=null,i=0){if(this.left=n,this.right=o,this.parent=r,this.color=i,this.item={key:void 0,values:[]},e!==void 0&&this.item.values.push(e),t!==void 0)if(Array.isArray(t)){const[s,a]=t;if(!Number.isNaN(s)&&!Number.isNaN(a)){let c=s,l=a;c>l&&([c,l]=[l,c]),this.item.key=new wFt(c,l)}}else this.item.key=t;this.max=this.item.key?this.item.key.max:void 0}isNil(){return this.item.key===void 0&&this.item.values.length===0&&this.left===null&&this.right===null&&this.color===0}requireKey(){if(!this.item.key)throw new Error("Node key is undefined (nil/sentinel). Operation is not applicable.");return this.item.key}less_than(t){const e=this.requireKey(),n=t.requireKey();return e.less_than(n)}_value_equal(t){const e=this.item.values[0],n=t.item.values[0];return e&&n&&e.equal_to?e.equal_to(n):e===n}equal_to(t){const e=this.requireKey(),n=t.requireKey();return e.equal_to(n)}intersect(t){const e=this.requireKey(),n=t.requireKey();return e.intersect(n)}copy_data(t){this.item.key=t.item.key,this.item.values=t.item.values.slice()}update_max(){this.max=this.item.key?this.item.key.max:void 0,this.right&&this.right.max&&(this.max=this.max?this.max.merge(this.right.max):this.right.max),this.left&&this.left.max&&(this.max=this.max?this.max.merge(this.left.max):this.left.max)}not_intersect_left_subtree(t){if(!this.left)return!0;const e=this.left.max?this.left.max.high:this.left.item.key.high,n=this.requireKey(),o=t.requireKey();return n.comparable_less_than(e,o.low)}not_intersect_right_subtree(t){if(!this.right)return!0;const e=this.right.max?this.right.max.low:this.right.item.key.low,n=this.requireKey(),o=t.requireKey();return n.comparable_less_than(o.high,e)}},woe=class V1t{constructor(){this.root=null,this.nil_node=new lP}get size(){let e=0;return this.tree_walk(this.root,n=>e+=n.item.values.length),e}get keys(){const e=[];return this.tree_walk(this.root,n=>e.push(n.item.key.output())),e}get values(){const e=[];return this.tree_walk(this.root,n=>{for(const o of n.item.values)e.push(o)}),e}get items(){const e=[];return this.tree_walk(this.root,n=>{const o=n.item.key.output();for(const r of n.item.values)e.push({key:o,value:r})}),e}isEmpty(){return this.root==null||this.root===this.nil_node}clear(){this.root=null}insert(e,n=e){if(e===void 0)return;const o=this.tree_search(this.root,new lP(e));if(o)return o.item.values.push(n),o;const r=new lP(e,n,this.nil_node,this.nil_node,null,1);return this.tree_insert(r),this.recalc_max(r),r}exist(e,n=e){const o=this.tree_search(this.root,new lP(e));return!!o&&(arguments.length<2||n===e||o.item.values.some(r=>r&&r.equal_to?r.equal_to(n):r===n))}remove(e,n=e){const o=this.tree_search(this.root,new lP(e));if(!o)return;if(arguments.length<2)return this.tree_delete(o),o;const r=o.item.values.findIndex(i=>i&&i.equal_to?i.equal_to(n):i===n);return r>=0?(o.item.values.splice(r,1),o.item.values.length===0&&this.tree_delete(o),o):void 0}search(e,n=(o,r)=>o===r?r.output():o){const o=new lP(e),r=[];this.tree_search_interval(this.root,o,r);const i=[];for(const s of r)for(const a of s.item.values)i.push(n(a,s.item.key));return i}intersect_any(e){const n=new lP(e);return this.tree_find_any_interval(this.root,n)}forEach(e){this.tree_walk(this.root,n=>{for(const o of n.item.values)e(n.item.key,o)})}map(e){const n=new V1t;return this.tree_walk(this.root,o=>{for(const r of o.item.values)n.insert(o.item.key,e(r,o.item.key))}),n}*iterate(e,n=(o,r)=>o===r?r.output():o){let o=null;for(e?o=this.tree_search_nearest_forward(this.root,new lP(e)):this.root&&(o=this.local_minimum(this.root));o;){for(const r of o.item.values)yield n(r,o.item.key);o=this.tree_successor(o)}}recalc_max(e){let n=e;for(;n.parent!=null;)n.parent.update_max(),n=n.parent}tree_insert(e){let n=this.root,o=null;if(this.root==null||this.root===this.nil_node)this.root=e;else{for(;n!==this.nil_node;)o=n,n=e.less_than(n)?n.left:n.right;e.parent=o,e.less_than(o)?o.left=e:o.right=e}this.insert_fixup(e)}insert_fixup(e){let n,o;for(n=e;n!==this.root&&n.parent.color===1;)n.parent===n.parent.parent.left?(o=n.parent.parent.right,o.color===1?(n.parent.color=0,o.color=0,n.parent.parent.color=1,n=n.parent.parent):(n===n.parent.right&&(n=n.parent,this.rotate_left(n)),n.parent.color=0,n.parent.parent.color=1,this.rotate_right(n.parent.parent))):(o=n.parent.parent.left,o.color===1?(n.parent.color=0,o.color=0,n.parent.parent.color=1,n=n.parent.parent):(n===n.parent.left&&(n=n.parent,this.rotate_right(n)),n.parent.color=0,n.parent.parent.color=1,this.rotate_left(n.parent.parent)));this.root.color=0}tree_delete(e){let n,o;n=e.left===this.nil_node||e.right===this.nil_node?e:this.tree_successor(e),o=n.left!==this.nil_node?n.left:n.right,o.parent=n.parent,n===this.root?this.root=o:(n===n.parent.left?n.parent.left=o:n.parent.right=o,n.parent.update_max()),this.recalc_max(o),n!==e&&(e.copy_data(n),e.update_max(),this.recalc_max(e)),n.color===0&&this.delete_fixup(o)}delete_fixup(e){let n,o=e;for(;o!==this.root&&o.parent!=null&&o.color===0;)o===o.parent.left?(n=o.parent.right,n.color===1&&(n.color=0,o.parent.color=1,this.rotate_left(o.parent),n=o.parent.right),n.left.color===0&&n.right.color===0?(n.color=1,o=o.parent):(n.right.color===0&&(n.color=1,n.left.color=0,this.rotate_right(n),n=o.parent.right),n.color=o.parent.color,o.parent.color=0,n.right.color=0,this.rotate_left(o.parent),o=this.root)):(n=o.parent.left,n.color===1&&(n.color=0,o.parent.color=1,this.rotate_right(o.parent),n=o.parent.left),n.left.color===0&&n.right.color===0?(n.color=1,o=o.parent):(n.left.color===0&&(n.color=1,n.right.color=0,this.rotate_left(n),n=o.parent.left),n.color=o.parent.color,o.parent.color=0,n.left.color=0,this.rotate_right(o.parent),o=this.root));o.color=0}tree_search(e,n){if(e!=null&&e!==this.nil_node)return n.equal_to(e)?e:n.less_than(e)?this.tree_search(e.left,n):this.tree_search(e.right,n)}tree_search_nearest_forward(e,n){let o=null,r=e;for(;r&&r!==this.nil_node;)r.less_than(n)?r.intersect(n)?(o=r,r=r.left):r=r.right:(o&&!r.less_than(o)||(o=r),r=r.left);return o||null}tree_search_interval(e,n,o){e!=null&&e!==this.nil_node&&(e.left===this.nil_node||e.not_intersect_left_subtree(n)||this.tree_search_interval(e.left,n,o),e.intersect(n)&&o.push(e),e.right===this.nil_node||e.not_intersect_right_subtree(n)||this.tree_search_interval(e.right,n,o))}tree_find_any_interval(e,n){let o=!1;return e!=null&&e!==this.nil_node&&(e.left===this.nil_node||e.not_intersect_left_subtree(n)||(o=this.tree_find_any_interval(e.left,n)),o||(o=e.intersect(n)),o||e.right===this.nil_node||e.not_intersect_right_subtree(n)||(o=this.tree_find_any_interval(e.right,n))),o}local_minimum(e){let n=e;for(;n.left!=null&&n.left!==this.nil_node;)n=n.left;return n}local_maximum(e){let n=e;for(;n.right!=null&&n.right!==this.nil_node;)n=n.right;return n}tree_successor(e){let n,o,r;if(e.right!==this.nil_node)n=this.local_minimum(e.right);else{for(o=e,r=e.parent;r!=null&&r.right===o;)o=r,r=r.parent;n=r}return n}rotate_left(e){const n=e.right;e.right=n.left,n.left!==this.nil_node&&(n.left.parent=e),n.parent=e.parent,e===this.root?this.root=n:e===e.parent.left?e.parent.left=n:e.parent.right=n,n.left=e,e.parent=n,e!==null&&e!==this.nil_node&&e.update_max(),n!=null&&n!==this.nil_node&&n.update_max()}rotate_right(e){const n=e.left;e.left=n.right,n.right!==this.nil_node&&(n.right.parent=e),n.parent=e.parent,e===this.root?this.root=n:e===e.parent.left?e.parent.left=n:e.parent.right=n,n.right=e,e.parent=n,e!==null&&e!==this.nil_node&&e.update_max(),n!=null&&n!==this.nil_node&&n.update_max()}tree_walk(e,n){e!=null&&e!==this.nil_node&&(this.tree_walk(e.left,n),n(e),this.tree_walk(e.right,n))}testRedBlackProperty(){let e=!0;return this.tree_walk(this.root,function(n){n.color===1&&(n.left.color===0&&n.right.color===0||(e=!1))}),e}testBlackHeightProperty(e){let n=0,o=0,r=0;if(e.color===0&&n++,o=e.left!==this.nil_node?this.testBlackHeightProperty(e.left):1,r=e.right!==this.nil_node?this.testBlackHeightProperty(e.right):1,o!==r)throw new Error("Red-black height property violated");return n+=o,n}},EFt=class extends Set{constructor(t){super(t),this.index=new woe,this.forEach(e=>this.index.insert(e))}add(t){let e=this.size;const{key:n,value:o}=t,r=n||t.box,i=o||t;return super.add(i),this.size>e&&this.index.insert(r,i),this}delete(t){const{key:e,value:n}=t,o=e||t.box,r=n||t;let i=super.delete(r);return i&&this.index.remove(o,r),i}clear(){super.clear(),this.index=new woe}search(t){return this.index.search(t)}hit(t){let e=new He.Box(t.x-1,t.y-1,t.x+1,t.y+1);return this.index.search(e).filter(n=>t.on(n))}svg(){return[...this].reduce((t,e)=>t+e.svg(),"")}};He.PlanarSet=EFt;var uP=class{get name(){throw Q0.CANNOT_INVOKE_ABSTRACT_METHOD}get box(){throw Q0.CANNOT_INVOKE_ABSTRACT_METHOD}clone(){throw Q0.CANNOT_INVOKE_ABSTRACT_METHOD}translate(...t){return this.transform(new jA().translate(...t))}rotate(t,e=new He.Point){return this.transform(new jA().rotate(t,e.x,e.y))}scale(t,e){return this.transform(new jA().scale(t,e))}transform(...t){throw Q0.CANNOT_INVOKE_ABSTRACT_METHOD}toJSON(){return Object.assign({},this,{name:this.name})}svg(t={}){throw Q0.CANNOT_INVOKE_ABSTRACT_METHOD}};He.Point=class $1t extends uP{constructor(...e){if(super(),this.x=0,this.y=0,e.length!==0){if(e.length===1&&e[0]instanceof Array&&e[0].length===2){let n=e[0];if(typeof n[0]=="number"&&typeof n[1]=="number")return this.x=n[0],void(this.y=n[1])}if(e.length===1&&e[0]instanceof Object&&e[0].name==="point"){let{x:n,y:o}=e[0];return this.x=n,void(this.y=o)}if(e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number")return this.x=e[0],void(this.y=e[1]);throw Q0.ILLEGAL_PARAMETERS}}get box(){return new He.Box(this.x,this.y,this.x,this.y)}clone(){return new He.Point(this.x,this.y)}get vertices(){return[this.clone()]}equalTo(e){return He.Utils.EQ(this.x,e.x)&&He.Utils.EQ(this.y,e.y)}lessThan(e){return!!He.Utils.LT(this.y,e.y)||!(!He.Utils.EQ(this.y,e.y)||!He.Utils.LT(this.x,e.x))}transform(e){return new He.Point(e.transform([this.x,this.y]))}projectionOn(e){if(this.equalTo(e.pt))return this.clone();let n=new He.Vector(this,e.pt);if(He.Utils.EQ_0(n.cross(e.norm)))return e.pt.clone();let o=n.dot(e.norm),r=e.norm.multiply(o);return this.translate(r)}leftTo(e){let n=new He.Vector(e.pt,this);return He.Utils.GT(n.dot(e.norm),0)}distanceTo(e){if(e instanceof $1t){let n=e.x-this.x,o=e.y-this.y;return[Math.sqrt(n*n+o*o),new He.Segment(this,e)]}return e instanceof He.Line?He.Distance.point2line(this,e):e instanceof He.Circle?He.Distance.point2circle(this,e):e instanceof He.Segment?He.Distance.point2segment(this,e):e instanceof He.Arc?He.Distance.point2arc(this,e):e instanceof He.Polygon?He.Distance.point2polygon(this,e):e instanceof He.PlanarSet?He.Distance.shape2planarSet(this,e):e instanceof He.Multiline?He.Distance.shape2multiline(this,e):void 0}on(e){if(e instanceof He.Point)return this.equalTo(e);if(e.contains&&e.contains instanceof Function)return e.contains(this);throw He.Errors.UNSUPPORTED_SHAPE_TYPE}get name(){return"point"}svg(e={}){const n=e.r??3;return`
|
|
686
686
|
<circle cx="${this.x}" cy="${this.y}" r="${n}"
|
|
687
687
|
${_S({fill:"red",...e})} />`}};var n9=(...t)=>new He.Point(...t);He.point=n9,He.Vector=class extends uP{constructor(...t){if(super(),this.x=0,this.y=0,t.length!==0){if(t.length===1&&t[0]instanceof Array&&t[0].length===2){let e=t[0];if(typeof e[0]=="number"&&typeof e[1]=="number")return this.x=e[0],void(this.y=e[1])}if(t.length===1&&t[0]instanceof Object&&t[0].name==="vector"){let{x:e,y:n}=t[0];return this.x=e,void(this.y=n)}if(t.length===1&&t[0]instanceof Object&&t[0].name==="segment"){let{start:e,end:n}=t[0];return this.x=n.x-e.x,void(this.y=n.y-e.y)}if(t.length===2){let e=t[0],n=t[1];if(typeof e=="number"&&typeof n=="number")return this.x=e,void(this.y=n);if(e instanceof He.Point&&n instanceof He.Point)return this.x=n.x-e.x,void(this.y=n.y-e.y)}throw Q0.ILLEGAL_PARAMETERS}}clone(){return new He.Vector(this.x,this.y)}get slope(){let t=Math.atan2(this.y,this.x);return t<0&&(t=2*Math.PI+t),t}get length(){return Math.sqrt(this.dot(this))}isZeroLength(){return He.Utils.EQ_0(this.length)}equalTo(t){return He.Utils.EQ(this.x,t.x)&&He.Utils.EQ(this.y,t.y)}multiply(t){return new He.Vector(t*this.x,t*this.y)}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}normalize(){if(this.isZeroLength())throw Q0.ZERO_DIVISION;return new He.Vector(this.x/this.length,this.y/this.length)}rotate(t,e=new He.Point){if(e.x===0&&e.y===0)return this.transform(new jA().rotate(t));throw Q0.OPERATION_IS_NOT_SUPPORTED}transform(t){return new He.Vector(t.transform([this.x,this.y]))}rotate90CCW(){return new He.Vector(-this.y,this.x)}rotate90CW(){return new He.Vector(this.y,-this.x)}invert(){return new He.Vector(-this.x,-this.y)}add(t){return new He.Vector(this.x+t.x,this.y+t.y)}subtract(t){return new He.Vector(this.x-t.x,this.y-t.y)}angleTo(t){let e=this.normalize(),n=t.normalize(),o=Math.atan2(e.cross(n),e.dot(n));return o<0&&(o+=2*Math.PI),o}projectionOn(t){let e=t.normalize(),n=this.dot(e);return e.multiply(n)}get name(){return"vector"}};var eT=(...t)=>new He.Vector(...t);He.vector=eT,He.Segment=class H4e extends uP{constructor(...e){if(super(),this.ps=new He.Point,this.pe=new He.Point,e.length!==0){if(e.length===1&&e[0]instanceof Array&&e[0].length===4){let n=e[0];return this.ps=new He.Point(n[0],n[1]),void(this.pe=new He.Point(n[2],n[3]))}if(e.length===1&&e[0]instanceof Object&&e[0].name==="segment"){let{ps:n,pe:o}=e[0];return this.ps=new He.Point(n.x,n.y),void(this.pe=new He.Point(o.x,o.y))}if(!(e.length===1&&e[0]instanceof He.Point)){if(e.length===2&&e[0]instanceof He.Point&&e[1]instanceof He.Point)return this.ps=e[0].clone(),void(this.pe=e[1].clone());if(e.length===4)return this.ps=new He.Point(e[0],e[1]),void(this.pe=new He.Point(e[2],e[3]));throw Q0.ILLEGAL_PARAMETERS}this.ps=e[0].clone()}}clone(){return new He.Segment(this.start,this.end)}get start(){return this.ps}get end(){return this.pe}get vertices(){return[this.ps.clone(),this.pe.clone()]}get length(){return this.start.distanceTo(this.end)[0]}get slope(){return new He.Vector(this.start,this.end).slope}get box(){return new He.Box(Math.min(this.start.x,this.end.x),Math.min(this.start.y,this.end.y),Math.max(this.start.x,this.end.x),Math.max(this.start.y,this.end.y))}equalTo(e){return this.ps.equalTo(e.ps)&&this.pe.equalTo(e.pe)}contains(e){return He.Utils.EQ_0(this.distanceToPoint(e))}intersect(e){return e instanceof He.Point?this.contains(e)?[e]:[]:e instanceof He.Line?VA(this,e):e instanceof He.Ray?xoe(e,this):e instanceof He.Segment?oV(this,e):e instanceof He.Circle?rV(this,e):e instanceof He.Box?(function(n,o){let r=[];for(let i of o.toSegments()){let s=oV(i,n);for(let a of s)r.push(a)}return r})(this,e):e instanceof He.Arc?GM(this,e):e instanceof He.Polygon?poe(this,e):e instanceof He.Multiline?YM(this,e):void 0}distanceTo(e){if(e instanceof He.Point){let[n,o]=He.Distance.point2segment(e,this);return o=o.reverse(),[n,o]}if(e instanceof He.Circle){let[n,o]=He.Distance.segment2circle(this,e);return[n,o]}if(e instanceof He.Line){let[n,o]=He.Distance.segment2line(this,e);return[n,o]}if(e instanceof He.Segment){let[n,o]=He.Distance.segment2segment(this,e);return[n,o]}if(e instanceof He.Arc){let[n,o]=He.Distance.segment2arc(this,e);return[n,o]}if(e instanceof He.Polygon){let[n,o]=He.Distance.shape2polygon(this,e);return[n,o]}if(e instanceof He.PlanarSet){let[n,o]=He.Distance.shape2planarSet(this,e);return[n,o]}if(e instanceof He.Multiline)return He.Distance.shape2multiline(this,e)}tangentInStart(){return new He.Vector(this.start,this.end).normalize()}tangentInEnd(){return new He.Vector(this.end,this.start).normalize()}reverse(){return new H4e(this.end,this.start)}split(e){return this.start.equalTo(e)?[null,this.clone()]:this.end.equalTo(e)?[this.clone(),null]:[new He.Segment(this.start,e),new He.Segment(e,this.end)]}middle(){return new He.Point((this.start.x+this.end.x)/2,(this.start.y+this.end.y)/2)}pointAtLength(e){if(e>this.length||e<0)return null;if(e==0)return this.start;if(e==this.length)return this.end;let n=e/this.length;return new He.Point((this.end.x-this.start.x)*n+this.start.x,(this.end.y-this.start.y)*n+this.start.y)}distanceToPoint(e){let[n,...o]=He.Distance.point2segment(e,this);return n}definiteIntegral(e=0){return(this.end.x-this.start.x)*(this.start.y-e+(this.end.y-e))/2}transform(e=new He.Matrix){return new H4e(this.ps.transform(e),this.pe.transform(e))}isZeroLength(){return this.ps.equalTo(this.pe)}sortPoints(e){return new He.Line(this.start,this.end).sortPoints(e)}get name(){return"segment"}svg(e={}){return`
|
|
688
688
|
<line x1="${this.start.x}" y1="${this.start.y}" x2="${this.end.x}" y2="${this.end.y}" ${_S(e)} />`}};var Eoe=(...t)=>new He.Segment(...t);He.segment=Eoe;var{vector:GA}=He;He.Line=class W1t extends uP{constructor(...e){if(super(),this.pt=new He.Point,this.norm=new He.Vector(0,1),e.length!==0){if(e.length===1&&e[0]instanceof Object&&e[0].name==="line"){let{pt:n,norm:o}=e[0];return this.pt=new He.Point(n),void(this.norm=new He.Vector(o))}if(e.length===2){let n=e[0],o=e[1];if(n instanceof He.Point&&o instanceof He.Point)return this.pt=n,this.norm=W1t.points2norm(n,o),void(this.norm.dot(GA(this.pt.x,this.pt.y))>=0&&this.norm.invert());if(n instanceof He.Point&&o instanceof He.Vector){if(He.Utils.EQ_0(o.x)&&He.Utils.EQ_0(o.y))throw Q0.ILLEGAL_PARAMETERS;return this.pt=n.clone(),this.norm=o.clone(),this.norm=this.norm.normalize(),void(this.norm.dot(GA(this.pt.x,this.pt.y))>=0&&this.norm.invert())}if(n instanceof He.Vector&&o instanceof He.Point){if(He.Utils.EQ_0(n.x)&&He.Utils.EQ_0(n.y))throw Q0.ILLEGAL_PARAMETERS;return this.pt=o.clone(),this.norm=n.clone(),this.norm=this.norm.normalize(),void(this.norm.dot(GA(this.pt.x,this.pt.y))>=0&&this.norm.invert())}}throw Q0.ILLEGAL_PARAMETERS}}clone(){return new He.Line(this.pt,this.norm)}get start(){}get end(){}get length(){return Number.POSITIVE_INFINITY}get box(){return new He.Box(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY)}get middle(){}get slope(){return new He.Vector(this.norm.y,-this.norm.x).slope}get standard(){return[this.norm.x,this.norm.y,this.norm.dot(GA(this.pt.x,this.pt.y))]}parallelTo(e){return He.Utils.EQ_0(this.norm.cross(e.norm))}incidentTo(e){return this.parallelTo(e)&&this.pt.on(e)}contains(e){if(this.pt.equalTo(e))return!0;let n=new He.Vector(this.pt,e);return He.Utils.EQ_0(this.norm.dot(n))}coord(e){return GA(e.x,e.y).cross(this.norm)}intersect(e){return e instanceof He.Point?this.contains(e)?[e]:[]:e instanceof He.Line?XM(this,e):e instanceof He.Ray?DEe(e,this):e instanceof He.Circle?dS(this,e):e instanceof He.Box?jM(this,e):e instanceof He.Segment?VA(e,this):e instanceof He.Arc?nV(this,e):e instanceof He.Polygon?$A(this,e):e instanceof He.Multiline?YM(this,e):void 0}distanceTo(e){if(e instanceof He.Point){let[n,o]=He.Distance.point2line(e,this);return o=o.reverse(),[n,o]}if(e instanceof He.Circle){let[n,o]=He.Distance.circle2line(e,this);return o=o.reverse(),[n,o]}if(e instanceof He.Segment){let[n,o]=He.Distance.segment2line(e,this);return[n,o.reverse()]}if(e instanceof He.Arc){let[n,o]=He.Distance.arc2line(e,this);return[n,o.reverse()]}if(e instanceof He.Polygon){let[n,o]=He.Distance.shape2polygon(this,e);return[n,o]}}split(e){if(e instanceof He.Point)return[new He.Ray(e,this.norm),new He.Ray(e,this.norm)];{let n=new He.Multiline([this]),o=this.sortPoints(e);return n.split(o),n.toShapes()}}rotate(e,n=new He.Point){return new He.Line(this.pt.rotate(e,n),this.norm.rotate(e))}transform(e){return new He.Line(this.pt.transform(e),this.norm.clone())}sortPoints(e){return e.slice().sort((n,o)=>this.coord(n)<this.coord(o)?-1:this.coord(n)>this.coord(o)?1:0)}get name(){return"line"}svg(e,n={}){let o=jM(this,e);if(o.length===0)return"";let r=o[0],i=o.length===2?o[1]:o.find(s=>!s.equalTo(r));return i===void 0&&(i=r),new He.Segment(r,i).svg(n)}static points2norm(e,n){if(e.equalTo(n))throw Q0.ILLEGAL_PARAMETERS;return new He.Vector(e,n).normalize().rotate90CCW()}};var Doe=(...t)=>new He.Line(...t);He.line=Doe,He.Circle=class extends uP{constructor(...t){if(super(),this.pc=new He.Point,this.r=1,t.length===1&&t[0]instanceof Object&&t[0].name==="circle"){let{pc:e,r:n}=t[0];this.pc=new He.Point(e),this.r=n}else{let[e,n]=[...t];e&&e instanceof He.Point&&(this.pc=e.clone()),n!==void 0&&(this.r=n)}}clone(){return new He.Circle(this.pc.clone(),this.r)}get center(){return this.pc}get box(){return new He.Box(this.pc.x-this.r,this.pc.y-this.r,this.pc.x+this.r,this.pc.y+this.r)}contains(t){return t instanceof He.Point?He.Utils.LE(t.distanceTo(this.center)[0],this.r):t instanceof He.Segment?He.Utils.LE(t.start.distanceTo(this.center)[0],this.r)&&He.Utils.LE(t.end.distanceTo(this.center)[0],this.r):t instanceof He.Arc?this.intersect(t).length===0&&He.Utils.LE(t.start.distanceTo(this.center)[0],this.r)&&He.Utils.LE(t.end.distanceTo(this.center)[0],this.r):t instanceof He.Circle?this.intersect(t).length===0&&He.Utils.LE(t.r,this.r)&&He.Utils.LE(t.center.distanceTo(this.center)[0],this.r):void 0}toArc(t=!0){return new He.Arc(this.center,this.r,Math.PI,-Math.PI,t)}scale(t,e){if(t!==e||this.pc.x!==0||this.pc.y!==0)throw Q0.OPERATION_IS_NOT_SUPPORTED;return new He.Circle(this.pc,this.r*t)}transform(t=new He.Matrix){return new He.Circle(this.pc.transform(t),this.r)}intersect(t){return t instanceof He.Point?this.contains(t)?[t]:[]:t instanceof He.Line?dS(t,this):t instanceof He.Ray?EEe(t,this):t instanceof He.Segment?rV(t,this):t instanceof He.Circle?yEe(t,this):t instanceof He.Box?(function(e,n){let o=[];for(let r of n.toSegments()){let i=rV(r,e);for(let s of i)o.push(s)}return o})(this,t):t instanceof He.Arc?moe(t,this):t instanceof He.Polygon?CEe(this,t):t instanceof He.Multiline?YM(this,t):void 0}distanceTo(t){if(t instanceof He.Point){let[e,n]=He.Distance.point2circle(t,this);return n=n.reverse(),[e,n]}if(t instanceof He.Circle){let[e,n]=He.Distance.circle2circle(this,t);return[e,n]}if(t instanceof He.Line){let[e,n]=He.Distance.circle2line(this,t);return[e,n]}if(t instanceof He.Segment){let[e,n]=He.Distance.segment2circle(t,this);return n=n.reverse(),[e,n]}if(t instanceof He.Arc){let[e,n]=He.Distance.arc2circle(t,this);return n=n.reverse(),[e,n]}if(t instanceof He.Polygon){let[e,n]=He.Distance.shape2polygon(this,t);return[e,n]}if(t instanceof He.PlanarSet){let[e,n]=He.Distance.shape2planarSet(this,t);return[e,n]}if(t instanceof He.Multiline){let[e,n]=He.Distance.shape2multiline(this,t);return[e,n]}}get name(){return"circle"}svg(t={}){return`
|
|
@@ -5368,7 +5368,7 @@ svg { font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif; }
|
|
|
5368
5368
|
.chart-title { fill: rgba(0, 0, 0, 0.85); font-size: 18px; font-weight: 600; }
|
|
5369
5369
|
`;return El("style",{},[A8(t)])}function ILn(t,e){return El("rect",{class:"background",x:"0",y:"0",width:ri(t),height:ri(e)})}function LLn(t,e,n){return El("defs",{},[El("clipPath",{id:t},[El("rect",{x:ri(au.left),y:ri(au.top),width:ri(e),height:ri(n)})])])}function OLn(t,e){return El("rect",{class:"plot-background",x:ri(au.left),y:ri(au.top),width:ri(t),height:ri(e)})}function FLn({timeAxis:t,voltageAxis:e,scaleX:n,scaleY:o,plotWidth:r,plotHeight:i}){const s=au.top,a=au.top+i,c=au.left,l=au.left+r,u=[];for(const _ of t.ticks){const d=ri(n(_));u.push(El("line",{class:"grid-line grid-line-x",x1:d,y1:ri(s),x2:d,y2:ri(a)}))}for(const _ of e.ticks){const d=ri(o(_));u.push(El("line",{class:"grid-line grid-line-y",x1:ri(c),y1:d,x2:ri(l),y2:d}))}return El("g",{class:"grid"},u)}function BLn({timeAxis:t,voltageAxis:e,scaleX:n,scaleY:o,plotWidth:r,plotHeight:i}){const s=au.top+i,a=au.left,c=au.left+r,l=[El("line",{class:"axis axis-x",x1:ri(a),y1:ri(s),x2:ri(c),y2:ri(s)}),El("line",{class:"axis axis-y",x1:ri(a),y1:ri(au.top),x2:ri(a),y2:ri(s)})];for(const u of t.ticks){const _=ri(n(u));l.push(El("line",{class:"axis-tick axis-tick-x",x1:_,y1:ri(s),x2:_,y2:ri(s+6)})),l.push(El("text",{class:"axis-label axis-label-x",x:_,y:ri(s+22),"text-anchor":"middle"},[A8(tst(u,t.ticks))]))}for(const u of e.ticks){const _=ri(o(u));l.push(El("line",{class:"axis-tick axis-tick-y",x1:ri(a-6),y1:_,x2:ri(a),y2:_})),l.push(El("text",{class:"axis-label axis-label-y",x:ri(a-10),y:_,"text-anchor":"end","dominant-baseline":"middle"},[A8(tst(u,e.ticks))]))}return l.push(El("text",{class:"axis-title axis-title-x",x:ri(a+r/2),y:ri(s+48),"text-anchor":"middle"},[A8("Time (ms)")]),El("text",{class:"axis-title axis-title-y",x:ri(a-64),y:ri(au.top+i/2),transform:`rotate(-90 ${ri(a-64)} ${ri(au.top+i/2)})`,"text-anchor":"middle"},[A8("Voltage (V)")])),El("g",{class:"axes"},l)}var zLn=15,est=16,VLn=24;function $Ln(t,e){let n=au.top;const o=t.map(r=>{const i=e-au.right+10,s=WLn(r.label),a=ULn(r,i,n,s),c=s.length*est;return n+=Math.max(c,VLn),a});return El("g",{class:"legend"},o)}function WLn(t){const e=t.split("_");if(e.length<=1)return[t];const n=[];let o=e[0]??"";for(let r=1;r<e.length;r++){const i=e[r]??"",s=o+"_"+i;s.length>zLn?(n.push(o),o=i):o=s}return o&&n.push(o),n}function ULn(t,e,n,o){const r=o.map((i,s)=>El("tspan",{x:"20",dy:s===0?"0":String(est)},[A8(i)]));return El("g",{class:"legend-item",transform:`translate(${ri(e)} ${ri(n)})`},[El("line",{class:"legend-line",x1:"0",y1:"0",x2:"16",y2:"0",stroke:t.color}),El("text",{class:"legend-label",x:"20",y:"0","dominant-baseline":"middle"},r)])}function XLn(t,e,n,o){const i=[4,8],s=i.map(d=>ri(d)).join(" "),c=i.reduce((d,m)=>d+m,0)/3,l=[];t.forEach((d,m)=>{if(d.points.length===0)return;const h=[];d.points.forEach((f,g)=>{const y=ri(n(f.timeMs)),b=ri(o(f.voltage));h.push(`${g===0?"M":"L"} ${y} ${b}`)});const p={class:"simulation-line",d:h.join(" "),stroke:d.color,"clip-path":`url(#${e})`,"data-simulation-transient-voltage-graph-id":d.graph.simulation_transient_voltage_graph_id};d.graph.source_component_id&&(p["data-source-component-id"]=d.graph.source_component_id),d.graph.subcircuit_connectivity_map_key&&(p["data-subcircuit-connectivity-map-key"]=d.graph.subcircuit_connectivity_map_key);const x=d.points.map(f=>{const g=ri(n(f.timeMs)),y=ri(o(f.voltage));return El("circle",{class:"simulation-point",cx:g,cy:y,r:"2.5",fill:d.color,"clip-path":`url(#${e})`})});l.push({entry:d,graphIndex:m,pathAttributes:p,pointElements:x})});const u=[];for(let d=0;d<3;d++)l.forEach(m=>{const h=(m.graphIndex+d)%3,p=ri(h*c);u.push(El("path",{...m.pathAttributes,"stroke-dasharray":s,"stroke-dashoffset":p}))});const _=l.flatMap(d=>d.pointElements);return El("g",{class:"data-series"},[...u,..._])}function jLn(t,e){return t?.name?El("text",{class:"chart-title",x:ri(e/2),y:ri(au.top-40),"text-anchor":"middle"},[A8(t.name)]):null}function GLn(t){return`simulation-graph-${t.replace(/[^a-zA-Z0-9_-]+/g,"-")}`}function ri(t){if(!Number.isFinite(t))return"0";const e=Number.parseFloat(t.toFixed(6));return Number.isInteger(e),e.toString()}function tst(t,e){if(e.length<=1)return ri(t);const n=e[e.length-1]-e[0];if(!Number.isFinite(n)||n===0)return ri(t);const o=n>=100?0:n>=10?1:n>=1?2:3,r=Math.pow(10,o);return(Math.round(t*r)/r).toFixed(o).replace(/\.0+$/,"").replace(/(\.\d*?)0+$/,"$1").replace(/\.$/,"")}function El(t,e,n=[]){return{name:t,type:"element",value:"",attributes:e,children:n}}function A8(t){return{name:"",type:"text",value:t,attributes:{},children:[]}}var YLn=1200,qLn=1200,nst=.55;function ost({circuitJson:t,simulation_experiment_id:e,simulation_transient_voltage_graph_ids:n,width:o=YLn,height:r=qLn,schematicHeightRatio:i=nst,schematicOptions:s,includeVersion:a,graphAboveSchematic:c=!1,showErrorsInTextOverlay:l}){const u=t.filter(D=>!Sxe(D)&&!vxe(D)),_=JLn(i),d=Math.max(1,r*_),m=Math.max(1,r-d),h=d+m,p=h===0?1:r/h,x=d*p,f=m*p,g=eG(u,{...s,width:o,height:x,includeVersion:!1,showErrorsInTextOverlay:l}),y=Kit({circuitJson:t,simulation_experiment_id:e,simulation_transient_voltage_graph_ids:n,width:o,height:f,includeVersion:!1}),b=rst(Pke(g)),v=rst(Pke(y)),S=[];c?(S.push(tG(v,0,0,o,f)),S.push(tG(b,0,f,o,x))):(S.push(tG(b,0,0,o,x)),S.push(tG(v,0,x,o,f)));const M=vv(u),w={name:"svg",type:"element",value:"",attributes:{xmlns:"http://www.w3.org/2000/svg",width:Mv(o),height:Mv(r),viewBox:`0 0 ${Mv(o)} ${Mv(r)}`,"data-simulation-experiment-id":e,...M&&{"data-software-used-string":M},...a&&{"data-circuit-to-svg-version":Sv}},children:S};return SS(w)}function tG(t,e,n,o,r){const i=ist(t);return i.attributes={...i.attributes,x:Mv(e),y:Mv(n),width:Mv(o),height:Mv(r)},delete i.attributes.xmlns,i}function rst(t){if(t.type!=="element")throw new Error("Expected SVG root element to be of type 'element'");return t}function ist(t){return{...t,attributes:{...t.attributes??{}},children:t.children?.map(ist)??[]}}function JLn(t){return Number.isFinite(t)?t<=0?0:t>=1?1:t:nst}function Mv(t){if(!Number.isFinite(t))return"0";const e=Number.parseFloat(t.toFixed(6));return Number.isInteger(e),e.toString()}function KLn(t,e){const{transform:n,layer:o}=e;if(o&&t.layer!==o)return[];const[r,i]=ft(n,[t.x,t.y]);if(t.shape==="rect"||t.shape==="rotated_rect"){const s=t.width*Math.abs(n.a),a=t.height*Math.abs(n.d);return t.shape==="rotated_rect"&&t.ccw_rotation?[{name:"rect",type:"element",attributes:{class:"pcb-solder-paste",fill:Kj(t.layer),x:(-s/2).toString(),y:(-a/2).toString(),width:s.toString(),height:a.toString(),transform:`translate(${r} ${i}) rotate(${-t.ccw_rotation})`,"data-type":"pcb_solder_paste","data-pcb-layer":t.layer}}]:[{name:"rect",type:"element",attributes:{class:"pcb-solder-paste",fill:Kj(t.layer),x:(r-s/2).toString(),y:(i-a/2).toString(),width:s.toString(),height:a.toString(),"data-type":"pcb_solder_paste","data-pcb-layer":t.layer}}]}if(t.shape==="pill"){const s=t.width*Math.abs(n.a),a=t.height*Math.abs(n.d),c=t.radius*Math.abs(n.a);return[{name:"rect",type:"element",attributes:{class:"pcb-solder-paste",fill:Kj(t.layer),x:(r-s/2).toString(),y:(i-a/2).toString(),width:s.toString(),height:a.toString(),rx:c.toString(),"data-type":"pcb_solder_paste","data-pcb-layer":t.layer}}]}if(t.shape==="circle"){const s=t.radius*Math.abs(n.a);return[{name:"circle",type:"element",attributes:{class:"pcb-solder-paste",fill:Kj(t.layer),cx:r.toString(),cy:i.toString(),r:s.toString(),"data-type":"pcb_solder_paste","data-pcb-layer":t.layer}}]}}var sst=["pcb_board","pcb_solder_paste"];function QLn(t,e){let n=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,i=Number.NEGATIVE_INFINITY;const s=t.filter(A=>A.type==="pcb_board"||A.type==="pcb_panel"||A.type==="pcb_solder_paste"&&A.layer===e.layer);for(const A of s)if(A.type==="pcb_board")A.outline&&Array.isArray(A.outline)&&A.outline.length>=3?D(A.outline):"center"in A&&"width"in A&&"height"in A&&w(A.center,A.width,A.height);else if(A.type==="pcb_panel"){const I=A,H=nt.parse(I.width),O=nt.parse(I.height);if(H!==void 0&&O!==void 0){const z=I.center??{x:H/2,y:O/2};w(z,H,O)}}else A.type==="pcb_solder_paste"&&"x"in A&&"y"in A&&w({x:A.x,y:A.y},0,0);const a=1,c=r-n+2*a,l=i-o+2*a,u=e.width??800,_=e.height??600,d=u/c,m=_/l,h=Math.min(d,m),p=(u-c*h)/2,x=(_-l*h)/2,f=ar(mr(p-n*h+a*h,_-x+o*h-a*h),P0(h,-h)),g={transform:f,layer:e.layer,colorMap:d_},y=s.sort((A,I)=>(sst.indexOf(I.type)??9999)-(sst.indexOf(A.type)??9999)).flatMap(A=>ZLn({elm:A,ctx:g})),b=vv(t),v=Sv,S=[{name:"style",type:"element",children:[{type:"text",value:""}]},{name:"rect",type:"element",attributes:{class:"boundary",x:"0",y:"0",fill:"#000",width:u.toString(),height:_.toString()}},eOn(f,n,o,r,i),...y].filter(A=>A!==null);if(e?.showErrorsInTextOverlay){const A=kE(t);A&&S.push(A)}const M={name:"svg",type:"element",attributes:{xmlns:"http://www.w3.org/2000/svg",width:u.toString(),height:_.toString(),...b&&{"data-software-used-string":b},...e.includeVersion&&{"data-circuit-to-svg-version":v}},value:"",children:S};try{return SS(M)}catch(A){throw console.error("Error stringifying SVG object:",A),A}function w(A,I,H){const O=I/2,z=H/2;n=Math.min(n,A.x-O),o=Math.min(o,A.y-z),r=Math.max(r,A.x+O),i=Math.max(i,A.y+z)}function D(A){for(const I of A)n=Math.min(n,I.x),o=Math.min(o,I.y),r=Math.max(r,I.x),i=Math.max(i,I.y)}}function ZLn({elm:t,ctx:e}){const{transform:n}=e;switch(t.type){case"pcb_board":return Pit(t,e);case"pcb_solder_paste":return KLn(t,e);default:return[]}}function eOn(t,e,n,o,r){const[i,s]=ft(t,[e,n]),[a,c]=ft(t,[o,r]),l=Math.abs(a-i),u=Math.abs(c-s),_=Math.min(i,a),d=Math.min(s,c);return{name:"rect",type:"element",value:"",children:[],attributes:{class:"pcb-boundary",fill:"none",stroke:"#fff","stroke-width":"0.3",x:_.toString(),y:d.toString(),width:l.toString(),height:u.toString()}}}const tOn=Object.freeze(Object.defineProperty({__proto__:null,CIRCUIT_TO_SVG_VERSION:Sv,circuitJsonToPcbSvg:hIn,circuitJsonToSchematicSvg:TLn,convertCircuitJsonToAssemblySvg:kit,convertCircuitJsonToPcbSvg:Ait,convertCircuitJsonToPinoutSvg:Vit,convertCircuitJsonToSchematicSimulationSvg:ost,convertCircuitJsonToSchematicSvg:eG,convertCircuitJsonToSimulationGraphSvg:Kit,convertCircuitJsonToSolderPasteMask:QLn,createErrorTextOverlay:kE,createSvgObjectsForSchComponentPortHovers:Yit,getSoftwareUsedString:vv,isSimulationExperiment:Sxe,isSimulationTransientVoltageGraph:vxe,isSimulationVoltageProbe:qit},Symbol.toStringTag,{value:"Module"}));function nOn(t,e){return Array.isArray(e)?[t.a*e[0]+t.c*e[1]+t.e,t.b*e[0]+t.d*e[1]+t.f]:{x:t.a*e.x+t.c*e.y+t.e,y:t.b*e.x+t.d*e.y+t.f}}function oOn(){return{a:1,c:0,e:0,b:0,d:1,f:0}}function Cxe(t){return typeof t>"u"}function w5(t,e=0){return{a:1,c:0,e:t,b:0,d:1,f:e}}function Mxe(...t){t=Array.isArray(t[0])?t[0]:t;const e=(n,o)=>({a:n.a*o.a+n.c*o.b,c:n.a*o.c+n.c*o.d,e:n.a*o.e+n.c*o.f+n.e,b:n.b*o.a+n.d*o.b,d:n.b*o.c+n.d*o.d,f:n.b*o.e+n.d*o.f+n.f});switch(t.length){case 0:throw new Error("no matrices provided");case 1:return t[0];case 2:return e(t[0],t[1]);default:{const[n,o,...r]=t,i=e(n,o);return Mxe(i,...r)}}}function R8(...t){return Mxe(...t)}function ast(t,e=void 0,n=void 0,o=void 0){Cxe(e)&&(e=t);const r={a:t,c:0,e:0,b:0,d:e,f:0};return Cxe(n)||Cxe(o)?r:Mxe([w5(n,o),r,w5(-n,-o)])}var cst=({initialTransform:t,initialTouch1:e,initialTouch2:n,finalTouch1:o,finalTouch2:r})=>{if(!o||!r)return t;const i={x:(e.x+n.x)/2,y:(e.y+n.y)/2},s={x:(o.x+r.x)/2,y:(o.y+r.y)/2},a=Math.hypot(n.x-e.x,n.y-e.y),c=Math.hypot(r.x-o.x,r.y-o.y),l=a===0?1:c/a,u=s.x-i.x,_=s.y-i.y;return R8(w5(u,_),w5(i.x,i.y),ast(l,l),w5(-i.x,-i.y),t)},PH=(t={})=>{const e=Y.useRef(null),[n,o]=Y.useState(0),r=t.canvasElm??e.current,[i,s]=Y.useState(t.initialTransform??oOn()),[a,c]=Y.useState(0),[l,u]=Y.useReducer(y=>y+1,0),_=Y.useCallback(y=>{t.onSetTransform&&t.onSetTransform(y),t.transform||s(y)},[t.onSetTransform,s]),d=Y.useCallback(y=>{_(y),u()},[_]),m=t.transform??i,h=Y.useCallback(()=>{o(Date.now())},[]),p=Y.useRef("none"),x=Y.useRef(null),f=Y.useRef(null);Y.useEffect(()=>{const y=t.canvasElm??e.current;if(y&&!r){c(a+1);return}if(!y){const q=setTimeout(()=>{c(a+1)},100);return()=>clearTimeout(q)}let b=t.transform??i,v={x:0,y:0},S={x:0,y:0},M=!1;const w=q=>({x:q.pageX-y.getBoundingClientRect().left-window.scrollX,y:q.pageY-y.getBoundingClientRect().top-window.scrollY});function D(q){t.enabled!==!1&&(t.shouldDrag&&!t.shouldDrag(q)||(v=w(q),!(Date.now()-n<100)&&(M=!0,q.preventDefault())))}function A(q){if(!M||t.enabled===!1||t.shouldDrag&&!t.shouldDrag(q))return;S=w(q);const K=R8(w5(S.x-v.x,S.y-v.y),b);_(K),b=K,M=!1}function I(q){if(w(q),!M||t.enabled===!1||t.shouldDrag&&!t.shouldDrag(q))return;S=w(q);const K=R8(w5(S.x-v.x,S.y-v.y),b);_(K)}function H(q){if(t.enabled===!1||t.shouldDrag&&!t.shouldDrag(q))return;const K=w(q),ne=R8(w5(K.x,K.y),ast(1-q.deltaY/1e3,1-q.deltaY/1e3),w5(-K.x,-K.y),b);_(ne),b=ne,q.preventDefault()}function O(q){if(!M||t.shouldDrag&&!t.shouldDrag(q))return;if(y){const ne=y.getBoundingClientRect();if(q.clientX>=ne.left+10&&q.clientX<=ne.right-10&&q.clientY>=ne.top+10&&q.clientY<=ne.bottom-10)return}M=!1,S=w(q);const K=R8(w5(S.x-v.x,S.y-v.y),b);_(K),b=K}function z(q){if(q.preventDefault(),t.enabled!==!1){if(q.touches.length===1){p.current="drag";const K=q.touches[0];x.current={initialTransform:b,initialTouch:{x:K.clientX,y:K.clientY}}}else if(q.touches.length===2){p.current="pinch";const K=q.touches[0],ne=q.touches[1];f.current={initialTransform:b,initialTouch1:{x:K.clientX,y:K.clientY},initialTouch2:{x:ne.clientX,y:ne.clientY},finalTouch1:null,finalTouch2:null}}}}function V(q){if(q.preventDefault(),t.enabled!==!1){if(p.current==="drag"&&q.touches.length===1&&x.current){const K=q.touches[0],ne={x:K.clientX,y:K.clientY},ce=ne.x-x.current.initialTouch.x,ee=ne.y-x.current.initialTouch.y,oe=R8(w5(ce,ee),x.current.initialTransform);_(oe)}else if(p.current==="pinch"&&q.touches.length===2&&f.current){const K=q.touches[0],ne=q.touches[1];f.current.finalTouch1={x:K.clientX,y:K.clientY},f.current.finalTouch2={x:ne.clientX,y:ne.clientY};const ce=cst(f.current);_(ce)}}}function j(q){q.preventDefault();const K=q.changedTouches[0];if(p.current==="drag"&&x.current&&K){const ne={x:K.clientX,y:K.clientY},ce=ne.x-x.current.initialTouch.x,ee=ne.y-x.current.initialTouch.y,oe=R8(w5(ce,ee),x.current.initialTransform);_(oe),b=oe}else if(p.current==="pinch"&&f.current){const ne=cst(f.current);_(ne),b=ne}p.current="none",x.current=null,f.current=null}return y.addEventListener("mousedown",D),y.addEventListener("mouseup",A),window.addEventListener("mousemove",I),y.addEventListener("mouseout",O),y.addEventListener("wheel",H),y.addEventListener("touchstart",z,{passive:!1}),y.addEventListener("touchmove",V,{passive:!1}),y.addEventListener("touchend",j,{passive:!1}),y.addEventListener("touchcancel",j,{passive:!1}),()=>{y.removeEventListener("mousedown",D),y.removeEventListener("mouseup",A),window.removeEventListener("mousemove",I),y.removeEventListener("mouseout",O),y.removeEventListener("wheel",H),y.removeEventListener("touchstart",z),y.removeEventListener("touchmove",V),y.removeEventListener("touchend",j),y.removeEventListener("touchcancel",j)}},[r,a,l,n,t.enabled,t.shouldDrag]);const g=Y.useCallback(y=>nOn(m,y),[m]);return{ref:e,transform:m,applyTransformToPoint:g,setTransform:d,cancelDrag:h}},rOn=PH;function vH(t){return t+.5|0}const Tv=(t,e,n)=>Math.max(Math.min(t,n),e);function SH(t){return Tv(vH(t*2.55),0,255)}function wv(t){return Tv(vH(t*255),0,255)}function j9(t){return Tv(vH(t/2.55)/100,0,1)}function lst(t){return Tv(vH(t*100),0,100)}const E5={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Txe=[..."0123456789ABCDEF"],iOn=t=>Txe[t&15],sOn=t=>Txe[(t&240)>>4]+Txe[t&15],nG=t=>(t&240)>>4===(t&15),aOn=t=>nG(t.r)&&nG(t.g)&&nG(t.b)&&nG(t.a);function cOn(t){var e=t.length,n;return t[0]==="#"&&(e===4||e===5?n={r:255&E5[t[1]]*17,g:255&E5[t[2]]*17,b:255&E5[t[3]]*17,a:e===5?E5[t[4]]*17:255}:(e===7||e===9)&&(n={r:E5[t[1]]<<4|E5[t[2]],g:E5[t[3]]<<4|E5[t[4]],b:E5[t[5]]<<4|E5[t[6]],a:e===9?E5[t[7]]<<4|E5[t[8]]:255})),n}const lOn=(t,e)=>t<255?e(t):"";function uOn(t){var e=aOn(t)?iOn:sOn;return t?"#"+e(t.r)+e(t.g)+e(t.b)+lOn(t.a,e):void 0}const _On=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function ust(t,e,n){const o=e*Math.min(n,1-n),r=(i,s=(i+t/30)%12)=>n-o*Math.max(Math.min(s-3,9-s,1),-1);return[r(0),r(8),r(4)]}function dOn(t,e,n){const o=(r,i=(r+t/60)%6)=>n-n*e*Math.max(Math.min(i,4-i,1),0);return[o(5),o(3),o(1)]}function hOn(t,e,n){const o=ust(t,1,.5);let r;for(e+n>1&&(r=1/(e+n),e*=r,n*=r),r=0;r<3;r++)o[r]*=1-e-n,o[r]+=e;return o}function mOn(t,e,n,o,r){return t===r?(e-n)/o+(e<n?6:0):e===r?(n-t)/o+2:(t-e)/o+4}function wxe(t){const n=t.r/255,o=t.g/255,r=t.b/255,i=Math.max(n,o,r),s=Math.min(n,o,r),a=(i+s)/2;let c,l,u;return i!==s&&(u=i-s,l=a>.5?u/(2-i-s):u/(i+s),c=mOn(n,o,r,u,i),c=c*60+.5),[c|0,l||0,a]}function Exe(t,e,n,o){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,o)).map(wv)}function Dxe(t,e,n){return Exe(ust,t,e,n)}function pOn(t,e,n){return Exe(hOn,t,e,n)}function fOn(t,e,n){return Exe(dOn,t,e,n)}function _st(t){return(t%360+360)%360}function xOn(t){const e=_On.exec(t);let n=255,o;if(!e)return;e[5]!==o&&(n=e[6]?SH(+e[5]):wv(+e[5]));const r=_st(+e[2]),i=+e[3]/100,s=+e[4]/100;return e[1]==="hwb"?o=pOn(r,i,s):e[1]==="hsv"?o=fOn(r,i,s):o=Dxe(r,i,s),{r:o[0],g:o[1],b:o[2],a:n}}function gOn(t,e){var n=wxe(t);n[0]=_st(n[0]+e),n=Dxe(n),t.r=n[0],t.g=n[1],t.b=n[2]}function yOn(t){if(!t)return;const e=wxe(t),n=e[0],o=lst(e[1]),r=lst(e[2]);return t.a<255?`hsla(${n}, ${o}%, ${r}%, ${j9(t.a)})`:`hsl(${n}, ${o}%, ${r}%)`}const dst={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},hst={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function bOn(){const t={},e=Object.keys(hst),n=Object.keys(dst);let o,r,i,s,a;for(o=0;o<e.length;o++){for(s=a=e[o],r=0;r<n.length;r++)i=n[r],a=a.replace(i,dst[i]);i=parseInt(hst[s],16),t[a]=[i>>16&255,i>>8&255,i&255]}return t}let oG;function POn(t){oG||(oG=bOn(),oG.transparent=[0,0,0,0]);const e=oG[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const vOn=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function SOn(t){const e=vOn.exec(t);let n=255,o,r,i;if(e){if(e[7]!==o){const s=+e[7];n=e[8]?SH(s):Tv(s*255,0,255)}return o=+e[1],r=+e[3],i=+e[5],o=255&(e[2]?SH(o):Tv(o,0,255)),r=255&(e[4]?SH(r):Tv(r,0,255)),i=255&(e[6]?SH(i):Tv(i,0,255)),{r:o,g:r,b:i,a:n}}}function COn(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${j9(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const Axe=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,LE=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function MOn(t,e,n){const o=LE(j9(t.r)),r=LE(j9(t.g)),i=LE(j9(t.b));return{r:wv(Axe(o+n*(LE(j9(e.r))-o))),g:wv(Axe(r+n*(LE(j9(e.g))-r))),b:wv(Axe(i+n*(LE(j9(e.b))-i))),a:t.a+n*(e.a-t.a)}}function rG(t,e,n){if(t){let o=wxe(t);o[e]=Math.max(0,Math.min(o[e]+o[e]*n,e===0?360:1)),o=Dxe(o),t.r=o[0],t.g=o[1],t.b=o[2]}}function mst(t,e){return t&&Object.assign(e||{},t)}function pst(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=wv(t[3]))):(e=mst(t,{r:0,g:0,b:0,a:1}),e.a=wv(e.a)),e}function TOn(t){return t.charAt(0)==="r"?SOn(t):xOn(t)}class CH{constructor(e){if(e instanceof CH)return e;const n=typeof e;let o;n==="object"?o=pst(e):n==="string"&&(o=cOn(e)||POn(e)||TOn(e)),this._rgb=o,this._valid=!!o}get valid(){return this._valid}get rgb(){var e=mst(this._rgb);return e&&(e.a=j9(e.a)),e}set rgb(e){this._rgb=pst(e)}rgbString(){return this._valid?COn(this._rgb):void 0}hexString(){return this._valid?uOn(this._rgb):void 0}hslString(){return this._valid?yOn(this._rgb):void 0}mix(e,n){if(e){const o=this.rgb,r=e.rgb;let i;const s=n===i?.5:n,a=2*s-1,c=o.a-r.a,l=((a*c===-1?a:(a+c)/(1+a*c))+1)/2;i=1-l,o.r=255&l*o.r+i*r.r+.5,o.g=255&l*o.g+i*r.g+.5,o.b=255&l*o.b+i*r.b+.5,o.a=s*o.a+(1-s)*r.a,this.rgb=o}return this}interpolate(e,n){return e&&(this._rgb=MOn(this._rgb,e._rgb,n)),this}clone(){return new CH(this.rgb)}alpha(e){return this._rgb.a=wv(e),this}clearer(e){const n=this._rgb;return n.a*=1-e,this}greyscale(){const e=this._rgb,n=vH(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=n,this}opaquer(e){const n=this._rgb;return n.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return rG(this._rgb,2,e),this}darken(e){return rG(this._rgb,2,-e),this}saturate(e){return rG(this._rgb,1,e),this}desaturate(e){return rG(this._rgb,1,-e),this}rotate(e){return gOn(this._rgb,e),this}}function G9(){}const wOn=(()=>{let t=0;return()=>t++})();function D0(t){return t==null}function sp(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function wc(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function D5(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function d3(t,e){return D5(t)?t:e}function Wa(t,e){return typeof t>"u"?e:t}const EOn=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function cu(t,e,n){if(t&&typeof t.call=="function")return t.apply(n,e)}function ll(t,e,n,o){let r,i,s;if(sp(t))for(i=t.length,r=0;r<i;r++)e.call(n,t[r],r);else if(wc(t))for(s=Object.keys(t),i=s.length,r=0;r<i;r++)e.call(n,t[s[r]],s[r])}function iG(t,e){let n,o,r,i;if(!t||!e||t.length!==e.length)return!1;for(n=0,o=t.length;n<o;++n)if(r=t[n],i=e[n],r.datasetIndex!==i.datasetIndex||r.index!==i.index)return!1;return!0}function sG(t){if(sp(t))return t.map(sG);if(wc(t)){const e=Object.create(null),n=Object.keys(t),o=n.length;let r=0;for(;r<o;++r)e[n[r]]=sG(t[n[r]]);return e}return t}function fst(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}function DOn(t,e,n,o){if(!fst(t))return;const r=e[t],i=n[t];wc(r)&&wc(i)?MH(r,i,o):e[t]=sG(i)}function MH(t,e,n){const o=sp(e)?e:[e],r=o.length;if(!wc(t))return t;n=n||{};const i=n.merger||DOn;let s;for(let a=0;a<r;++a){if(s=o[a],!wc(s))continue;const c=Object.keys(s);for(let l=0,u=c.length;l<u;++l)i(c[l],t,s,n)}return t}function TH(t,e){return MH(t,e,{merger:AOn})}function AOn(t,e,n){if(!fst(t))return;const o=e[t],r=n[t];wc(o)&&wc(r)?TH(o,r):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=sG(r))}const xst={"":t=>t,x:t=>t.x,y:t=>t.y};function ROn(t){const e=t.split("."),n=[];let o="";for(const r of e)o+=r,o.endsWith("\\")?o=o.slice(0,-1)+".":(n.push(o),o="");return n}function kOn(t){const e=ROn(t);return n=>{for(const o of e){if(o==="")break;n=n&&n[o]}return n}}function aG(t,e){return(xst[e]||(xst[e]=kOn(e)))(t)}function Rxe(t){return t.charAt(0).toUpperCase()+t.slice(1)}const cG=t=>typeof t<"u",Ev=t=>typeof t=="function",gst=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0};function NOn(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const ap=Math.PI,h3=2*ap,HOn=h3+ap,lG=Number.POSITIVE_INFINITY,IOn=ap/180,L4=ap/2,k8=ap/4,yst=ap*2/3,bst=Math.log10,OE=Math.sign;function wH(t,e,n){return Math.abs(t-e)<n}function Pst(t){const e=Math.round(t);t=wH(t,e,t/1e3)?e:t;const n=Math.pow(10,Math.floor(bst(t))),o=t/n;return(o<=1?1:o<=2?2:o<=5?5:10)*n}function LOn(t){const e=[],n=Math.sqrt(t);let o;for(o=1;o<n;o++)t%o===0&&(e.push(o),e.push(t/o));return n===(n|0)&&e.push(n),e.sort((r,i)=>r-i).pop(),e}function OOn(t){return typeof t=="symbol"||typeof t=="object"&&t!==null&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}function EH(t){return!OOn(t)&&!isNaN(parseFloat(t))&&isFinite(t)}function FOn(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}function BOn(t,e,n){let o,r,i;for(o=0,r=t.length;o<r;o++)i=t[o][n],isNaN(i)||(e.min=Math.min(e.min,i),e.max=Math.max(e.max,i))}function N8(t){return t*(ap/180)}function zOn(t){return t*(180/ap)}function vst(t){if(!D5(t))return;let e=1,n=0;for(;Math.round(t*e)/e!==t;)e*=10,n++;return n}function VOn(t,e){const n=e.x-t.x,o=e.y-t.y,r=Math.sqrt(n*n+o*o);let i=Math.atan2(o,n);return i<-.5*ap&&(i+=h3),{angle:i,distance:r}}function kxe(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function $On(t,e){return(t-e+HOn)%h3-ap}function Dv(t){return(t%h3+h3)%h3}function Sst(t,e,n,o){const r=Dv(t),i=Dv(e),s=Dv(n),a=Dv(i-r),c=Dv(s-r),l=Dv(r-i),u=Dv(r-s);return r===i||r===s||o&&i===s||a>c&&l<u}function A5(t,e,n){return Math.max(e,Math.min(n,t))}function WOn(t){return A5(t,-32768,32767)}function DH(t,e,n,o=1e-6){return t>=Math.min(e,n)-o&&t<=Math.max(e,n)+o}function Nxe(t,e,n){n=n||(s=>t[s]<e);let o=t.length-1,r=0,i;for(;o-r>1;)i=r+o>>1,n(i)?r=i:o=i;return{lo:r,hi:o}}const H8=(t,e,n,o)=>Nxe(t,n,o?r=>{const i=t[r][e];return i<n||i===n&&t[r+1][e]===n}:r=>t[r][e]<n),UOn=(t,e,n)=>Nxe(t,n,o=>t[o][e]>=n);function XOn(t,e,n){let o=0,r=t.length;for(;o<r&&t[o]<e;)o++;for(;r>o&&t[r-1]>n;)r--;return o>0||r<t.length?t.slice(o,r):t}const Cst=["push","pop","shift","splice","unshift"];function jOn(t,e){if(t._chartjs){t._chartjs.listeners.push(e);return}Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),Cst.forEach(n=>{const o="_onData"+Rxe(n),r=t[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!1,value(...i){const s=r.apply(this,i);return t._chartjs.listeners.forEach(a=>{typeof a[o]=="function"&&a[o](...i)}),s}})})}function Mst(t,e){const n=t._chartjs;if(!n)return;const o=n.listeners,r=o.indexOf(e);r!==-1&&o.splice(r,1),!(o.length>0)&&(Cst.forEach(i=>{delete t[i]}),delete t._chartjs)}function GOn(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const Tst=(function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame})();function wst(t,e){let n=[],o=!1;return function(...r){n=r,o||(o=!0,Tst.call(window,()=>{o=!1,t.apply(e,n)}))}}function YOn(t,e){let n;return function(...o){return e?(clearTimeout(n),n=setTimeout(t,e,o)):t.apply(this,o),e}}const Hxe=t=>t==="start"?"left":t==="end"?"right":"center",p1=(t,e,n)=>t==="start"?e:t==="end"?n:(e+n)/2,qOn=(t,e,n,o)=>t===(o?"left":"right")?n:t==="center"?(e+n)/2:e;function JOn(t,e,n){const o=e.length;let r=0,i=o;if(t._sorted){const{iScale:s,vScale:a,_parsed:c}=t,l=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null,u=s.axis,{min:_,max:d,minDefined:m,maxDefined:h}=s.getUserBounds();if(m){if(r=Math.min(H8(c,u,_).lo,n?o:H8(e,u,s.getPixelForValue(_)).lo),l){const p=c.slice(0,r+1).reverse().findIndex(x=>!D0(x[a.axis]));r-=Math.max(0,p)}r=A5(r,0,o-1)}if(h){let p=Math.max(H8(c,s.axis,d,!0).hi+1,n?0:H8(e,u,s.getPixelForValue(d),!0).hi+1);if(l){const x=c.slice(p-1).findIndex(f=>!D0(f[a.axis]));p+=Math.max(0,x)}i=A5(p,r,o)-r}else i=o-r}return{start:r,count:i}}function KOn(t){const{xScale:e,yScale:n,_scaleRanges:o}=t,r={xmin:e.min,xmax:e.max,ymin:n.min,ymax:n.max};if(!o)return t._scaleRanges=r,!0;const i=o.xmin!==e.min||o.xmax!==e.max||o.ymin!==n.min||o.ymax!==n.max;return Object.assign(o,r),i}const uG=t=>t===0||t===1,Est=(t,e,n)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*h3/n)),Dst=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*h3/n)+1,AH={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*L4)+1,easeOutSine:t=>Math.sin(t*L4),easeInOutSine:t=>-.5*(Math.cos(ap*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>uG(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>uG(t)?t:Est(t,.075,.3),easeOutElastic:t=>uG(t)?t:Dst(t,.075,.3),easeInOutElastic(t){return uG(t)?t:t<.5?.5*Est(t*2,.1125,.45):.5+.5*Dst(t*2-1,.1125,.45)},easeInBack(t){return t*t*((1.70158+1)*t-1.70158)},easeOutBack(t){return(t-=1)*t*((1.70158+1)*t+1.70158)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-AH.easeOutBounce(1-t),easeOutBounce(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:t=>t<.5?AH.easeInBounce(t*2)*.5:AH.easeOutBounce(t*2-1)*.5+.5};function Ixe(t){if(t&&typeof t=="object"){const e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function Ast(t){return Ixe(t)?t:new CH(t)}function Lxe(t){return Ixe(t)?t:new CH(t).saturate(.5).darken(.1).hexString()}const QOn=["x","y","borderWidth","radius","tension"],ZOn=["color","borderColor","backgroundColor"];function eFn(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),t.set("animations",{colors:{type:"color",properties:ZOn},numbers:{type:"number",properties:QOn}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>e|0}}}})}function tFn(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Rst=new Map;function nFn(t,e){e=e||{};const n=t+JSON.stringify(e);let o=Rst.get(n);return o||(o=new Intl.NumberFormat(t,e),Rst.set(n,o)),o}function kst(t,e,n){return nFn(e,n).format(t)}const oFn={values(t){return sp(t)?t:""+t},numeric(t,e,n){if(t===0)return"0";const o=this.chart.options.locale;let r,i=t;if(n.length>1){const l=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(l<1e-4||l>1e15)&&(r="scientific"),i=rFn(t,n)}const s=bst(Math.abs(i)),a=isNaN(s)?1:Math.max(Math.min(-1*Math.floor(s),20),0),c={notation:r,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(c,this.options.ticks.format),kst(t,o,c)}};function rFn(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t)),n}var Nst={formatters:oFn};function iFn(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,n)=>n.lineWidth,tickColor:(e,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Nst.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}const I8=Object.create(null),Oxe=Object.create(null);function RH(t,e){if(!e)return t;const n=e.split(".");for(let o=0,r=n.length;o<r;++o){const i=n[o];t=t[i]||(t[i]=Object.create(null))}return t}function Fxe(t,e,n){return typeof e=="string"?MH(RH(t,e),n):MH(RH(t,""),e)}class sFn{constructor(e,n){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=o=>o.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(o,r)=>Lxe(r.backgroundColor),this.hoverBorderColor=(o,r)=>Lxe(r.borderColor),this.hoverColor=(o,r)=>Lxe(r.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(n)}set(e,n){return Fxe(this,e,n)}get(e){return RH(this,e)}describe(e,n){return Fxe(Oxe,e,n)}override(e,n){return Fxe(I8,e,n)}route(e,n,o,r){const i=RH(this,e),s=RH(this,o),a="_"+n;Object.defineProperties(i,{[a]:{value:i[n],writable:!0},[n]:{enumerable:!0,get(){const c=this[a],l=s[r];return wc(c)?Object.assign({},l,c):Wa(c,l)},set(c){this[a]=c}}})}apply(e){e.forEach(n=>n(this))}}var Td=new sFn({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[eFn,tFn,iFn]);function aFn(t){return!t||D0(t.size)||D0(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function Hst(t,e,n,o,r){let i=e[r];return i||(i=e[r]=t.measureText(r).width,n.push(r)),i>o&&(o=i),o}function L8(t,e,n){const o=t.currentDevicePixelRatio,r=n!==0?Math.max(n/2,.5):0;return Math.round((e-r)*o)/o+r}function Ist(t,e){!e&&!t||(e=e||t.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())}function Bxe(t,e,n,o){Lst(t,e,n,o,null)}function Lst(t,e,n,o,r){let i,s,a,c,l,u,_,d;const m=e.pointStyle,h=e.rotation,p=e.radius;let x=(h||0)*IOn;if(m&&typeof m=="object"&&(i=m.toString(),i==="[object HTMLImageElement]"||i==="[object HTMLCanvasElement]")){t.save(),t.translate(n,o),t.rotate(x),t.drawImage(m,-m.width/2,-m.height/2,m.width,m.height),t.restore();return}if(!(isNaN(p)||p<=0)){switch(t.beginPath(),m){default:r?t.ellipse(n,o,r/2,p,0,0,h3):t.arc(n,o,p,0,h3),t.closePath();break;case"triangle":u=r?r/2:p,t.moveTo(n+Math.sin(x)*u,o-Math.cos(x)*p),x+=yst,t.lineTo(n+Math.sin(x)*u,o-Math.cos(x)*p),x+=yst,t.lineTo(n+Math.sin(x)*u,o-Math.cos(x)*p),t.closePath();break;case"rectRounded":l=p*.516,c=p-l,s=Math.cos(x+k8)*c,_=Math.cos(x+k8)*(r?r/2-l:c),a=Math.sin(x+k8)*c,d=Math.sin(x+k8)*(r?r/2-l:c),t.arc(n-_,o-a,l,x-ap,x-L4),t.arc(n+d,o-s,l,x-L4,x),t.arc(n+_,o+a,l,x,x+L4),t.arc(n-d,o+s,l,x+L4,x+ap),t.closePath();break;case"rect":if(!h){c=Math.SQRT1_2*p,u=r?r/2:c,t.rect(n-u,o-c,2*u,2*c);break}x+=k8;case"rectRot":_=Math.cos(x)*(r?r/2:p),s=Math.cos(x)*p,a=Math.sin(x)*p,d=Math.sin(x)*(r?r/2:p),t.moveTo(n-_,o-a),t.lineTo(n+d,o-s),t.lineTo(n+_,o+a),t.lineTo(n-d,o+s),t.closePath();break;case"crossRot":x+=k8;case"cross":_=Math.cos(x)*(r?r/2:p),s=Math.cos(x)*p,a=Math.sin(x)*p,d=Math.sin(x)*(r?r/2:p),t.moveTo(n-_,o-a),t.lineTo(n+_,o+a),t.moveTo(n+d,o-s),t.lineTo(n-d,o+s);break;case"star":_=Math.cos(x)*(r?r/2:p),s=Math.cos(x)*p,a=Math.sin(x)*p,d=Math.sin(x)*(r?r/2:p),t.moveTo(n-_,o-a),t.lineTo(n+_,o+a),t.moveTo(n+d,o-s),t.lineTo(n-d,o+s),x+=k8,_=Math.cos(x)*(r?r/2:p),s=Math.cos(x)*p,a=Math.sin(x)*p,d=Math.sin(x)*(r?r/2:p),t.moveTo(n-_,o-a),t.lineTo(n+_,o+a),t.moveTo(n+d,o-s),t.lineTo(n-d,o+s);break;case"line":s=r?r/2:Math.cos(x)*p,a=Math.sin(x)*p,t.moveTo(n-s,o-a),t.lineTo(n+s,o+a);break;case"dash":t.moveTo(n,o),t.lineTo(n+Math.cos(x)*(r?r/2:p),o+Math.sin(x)*p);break;case!1:t.closePath();break}t.fill(),e.borderWidth>0&&t.stroke()}}function kH(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n}function zxe(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function Vxe(t){t.restore()}function cFn(t,e,n,o,r){if(!e)return t.lineTo(n.x,n.y);if(r==="middle"){const i=(e.x+n.x)/2;t.lineTo(i,e.y),t.lineTo(i,n.y)}else r==="after"!=!!o?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}function lFn(t,e,n,o){if(!e)return t.lineTo(n.x,n.y);t.bezierCurveTo(o?e.cp1x:e.cp2x,o?e.cp1y:e.cp2y,o?n.cp2x:n.cp1x,o?n.cp2y:n.cp1y,n.x,n.y)}function uFn(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),D0(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}function _Fn(t,e,n,o,r){if(r.strikethrough||r.underline){const i=t.measureText(o),s=e-i.actualBoundingBoxLeft,a=e+i.actualBoundingBoxRight,c=n-i.actualBoundingBoxAscent,l=n+i.actualBoundingBoxDescent,u=r.strikethrough?(c+l)/2:l;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=r.decorationWidth||2,t.moveTo(s,u),t.lineTo(a,u),t.stroke()}}function dFn(t,e){const n=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=n}function NH(t,e,n,o,r,i={}){const s=sp(e)?e:[e],a=i.strokeWidth>0&&i.strokeColor!=="";let c,l;for(t.save(),t.font=r.string,uFn(t,i),c=0;c<s.length;++c)l=s[c],i.backdrop&&dFn(t,i.backdrop),a&&(i.strokeColor&&(t.strokeStyle=i.strokeColor),D0(i.strokeWidth)||(t.lineWidth=i.strokeWidth),t.strokeText(l,n,o,i.maxWidth)),t.fillText(l,n,o,i.maxWidth),_Fn(t,n,o,l,i),o+=Number(r.lineHeight);t.restore()}function $xe(t,e){const{x:n,y:o,w:r,h:i,radius:s}=e;t.arc(n+s.topLeft,o+s.topLeft,s.topLeft,1.5*ap,ap,!0),t.lineTo(n,o+i-s.bottomLeft),t.arc(n+s.bottomLeft,o+i-s.bottomLeft,s.bottomLeft,ap,L4,!0),t.lineTo(n+r-s.bottomRight,o+i),t.arc(n+r-s.bottomRight,o+i-s.bottomRight,s.bottomRight,L4,0,!0),t.lineTo(n+r,o+s.topRight),t.arc(n+r-s.topRight,o+s.topRight,s.topRight,0,-L4,!0),t.lineTo(n+s.topLeft,o)}const hFn=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,mFn=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function pFn(t,e){const n=(""+t).match(hFn);if(!n||n[1]==="normal")return e*1.2;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100;break}return e*t}const fFn=t=>+t||0;function Ost(t,e){const n={},o=wc(e),r=o?Object.keys(e):e,i=wc(t)?o?s=>Wa(t[s],t[e[s]]):s=>t[s]:()=>t;for(const s of r)n[s]=fFn(i(s));return n}function xFn(t){return Ost(t,{top:"y",right:"x",bottom:"y",left:"x"})}function HH(t){return Ost(t,["topLeft","topRight","bottomLeft","bottomRight"])}function R5(t){const e=xFn(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function f1(t,e){t=t||{},e=e||Td.font;let n=Wa(t.size,e.size);typeof n=="string"&&(n=parseInt(n,10));let o=Wa(t.style,e.style);o&&!(""+o).match(mFn)&&(console.warn('Invalid font style specified: "'+o+'"'),o=void 0);const r={family:Wa(t.family,e.family),lineHeight:pFn(Wa(t.lineHeight,e.lineHeight),n),size:n,style:o,weight:Wa(t.weight,e.weight),string:""};return r.string=aFn(r),r}function _G(t,e,n,o){let r,i,s;for(r=0,i=t.length;r<i;++r)if(s=t[r],s!==void 0&&s!==void 0)return s}function gFn(t,e,n){const{min:o,max:r}=t,i=EOn(e,(r-o)/2),s=(a,c)=>n&&a===0?0:a+c;return{min:s(o,-Math.abs(i)),max:s(r,i)}}function O8(t,e){return Object.assign(Object.create(t),e)}function Wxe(t,e=[""],n,o,r=()=>t[0]){const i=n||t;typeof o>"u"&&(o=$st("_fallback",t));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:i,_fallback:o,_getTarget:r,override:a=>Wxe([a,...t],e,i,o)};return new Proxy(s,{deleteProperty(a,c){return delete a[c],delete a._keys,delete t[0][c],!0},get(a,c){return Bst(a,c,()=>TFn(c,e,t,a))},getOwnPropertyDescriptor(a,c){return Reflect.getOwnPropertyDescriptor(a._scopes[0],c)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(a,c){return Wst(a).includes(c)},ownKeys(a){return Wst(a)},set(a,c,l){const u=a._storage||(a._storage=r());return a[c]=u[c]=l,delete a._keys,!0}})}function FE(t,e,n,o){const r={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:Fst(t,o),setContext:i=>FE(t,i,n,o),override:i=>FE(t.override(i),e,n,o)};return new Proxy(r,{deleteProperty(i,s){return delete i[s],delete t[s],!0},get(i,s,a){return Bst(i,s,()=>bFn(i,s,a))},getOwnPropertyDescriptor(i,s){return i._descriptors.allKeys?Reflect.has(t,s)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,s)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(i,s){return Reflect.has(t,s)},ownKeys(){return Reflect.ownKeys(t)},set(i,s,a){return t[s]=a,delete i[s],!0}})}function Fst(t,e={scriptable:!0,indexable:!0}){const{_scriptable:n=e.scriptable,_indexable:o=e.indexable,_allKeys:r=e.allKeys}=t;return{allKeys:r,scriptable:n,indexable:o,isScriptable:Ev(n)?n:()=>n,isIndexable:Ev(o)?o:()=>o}}const yFn=(t,e)=>t?t+Rxe(e):e,Uxe=(t,e)=>wc(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function Bst(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e)||e==="constructor")return t[e];const o=n();return t[e]=o,o}function bFn(t,e,n){const{_proxy:o,_context:r,_subProxy:i,_descriptors:s}=t;let a=o[e];return Ev(a)&&s.isScriptable(e)&&(a=PFn(e,a,t,n)),sp(a)&&a.length&&(a=vFn(e,a,t,s.isIndexable)),Uxe(e,a)&&(a=FE(a,r,i&&i[e],s)),a}function PFn(t,e,n,o){const{_proxy:r,_context:i,_subProxy:s,_stack:a}=n;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t);let c=e(i,s||o);return a.delete(t),Uxe(t,c)&&(c=Xxe(r._scopes,r,t,c)),c}function vFn(t,e,n,o){const{_proxy:r,_context:i,_subProxy:s,_descriptors:a}=n;if(typeof i.index<"u"&&o(t))return e[i.index%e.length];if(wc(e[0])){const c=e,l=r._scopes.filter(u=>u!==c);e=[];for(const u of c){const _=Xxe(l,r,t,u);e.push(FE(_,i,s&&s[t],a))}}return e}function zst(t,e,n){return Ev(t)?t(e,n):t}const SFn=(t,e)=>t===!0?e:typeof t=="string"?aG(e,t):void 0;function CFn(t,e,n,o,r){for(const i of e){const s=SFn(n,i);if(s){t.add(s);const a=zst(s._fallback,n,r);if(typeof a<"u"&&a!==n&&a!==o)return a}else if(s===!1&&typeof o<"u"&&n!==o)return null}return!1}function Xxe(t,e,n,o){const r=e._rootScopes,i=zst(e._fallback,n,o),s=[...t,...r],a=new Set;a.add(o);let c=Vst(a,s,n,i||n,o);return c===null||typeof i<"u"&&i!==n&&(c=Vst(a,s,i,c,o),c===null)?!1:Wxe(Array.from(a),[""],r,i,()=>MFn(e,n,o))}function Vst(t,e,n,o,r){for(;n;)n=CFn(t,e,n,o,r);return n}function MFn(t,e,n){const o=t._getTarget();e in o||(o[e]={});const r=o[e];return sp(r)&&wc(n)?n:r||{}}function TFn(t,e,n,o){let r;for(const i of e)if(r=$st(yFn(i,t),n),typeof r<"u")return Uxe(t,r)?Xxe(n,o,t,r):r}function $st(t,e){for(const n of e){if(!n)continue;const o=n[t];if(typeof o<"u")return o}}function Wst(t){let e=t._keys;return e||(e=t._keys=wFn(t._scopes)),e}function wFn(t){const e=new Set;for(const n of t)for(const o of Object.keys(n).filter(r=>!r.startsWith("_")))e.add(o);return Array.from(e)}const EFn=Number.EPSILON||1e-14,BE=(t,e)=>e<t.length&&!t[e].skip&&t[e],Ust=t=>t==="x"?"y":"x";function DFn(t,e,n,o){const r=t.skip?e:t,i=e,s=n.skip?e:n,a=kxe(i,r),c=kxe(s,i);let l=a/(a+c),u=c/(a+c);l=isNaN(l)?0:l,u=isNaN(u)?0:u;const _=o*l,d=o*u;return{previous:{x:i.x-_*(s.x-r.x),y:i.y-_*(s.y-r.y)},next:{x:i.x+d*(s.x-r.x),y:i.y+d*(s.y-r.y)}}}function AFn(t,e,n){const o=t.length;let r,i,s,a,c,l=BE(t,0);for(let u=0;u<o-1;++u)if(c=l,l=BE(t,u+1),!(!c||!l)){if(wH(e[u],0,EFn)){n[u]=n[u+1]=0;continue}r=n[u]/e[u],i=n[u+1]/e[u],a=Math.pow(r,2)+Math.pow(i,2),!(a<=9)&&(s=3/Math.sqrt(a),n[u]=r*s*e[u],n[u+1]=i*s*e[u])}}function RFn(t,e,n="x"){const o=Ust(n),r=t.length;let i,s,a,c=BE(t,0);for(let l=0;l<r;++l){if(s=a,a=c,c=BE(t,l+1),!a)continue;const u=a[n],_=a[o];s&&(i=(u-s[n])/3,a[`cp1${n}`]=u-i,a[`cp1${o}`]=_-i*e[l]),c&&(i=(c[n]-u)/3,a[`cp2${n}`]=u+i,a[`cp2${o}`]=_+i*e[l])}}function kFn(t,e="x"){const n=Ust(e),o=t.length,r=Array(o).fill(0),i=Array(o);let s,a,c,l=BE(t,0);for(s=0;s<o;++s)if(a=c,c=l,l=BE(t,s+1),!!c){if(l){const u=l[e]-c[e];r[s]=u!==0?(l[n]-c[n])/u:0}i[s]=a?l?OE(r[s-1])!==OE(r[s])?0:(r[s-1]+r[s])/2:r[s-1]:r[s]}AFn(t,r,i),RFn(t,i,e)}function dG(t,e,n){return Math.max(Math.min(t,n),e)}function NFn(t,e){let n,o,r,i,s,a=kH(t[0],e);for(n=0,o=t.length;n<o;++n)s=i,i=a,a=n<o-1&&kH(t[n+1],e),i&&(r=t[n],s&&(r.cp1x=dG(r.cp1x,e.left,e.right),r.cp1y=dG(r.cp1y,e.top,e.bottom)),a&&(r.cp2x=dG(r.cp2x,e.left,e.right),r.cp2y=dG(r.cp2y,e.top,e.bottom)))}function HFn(t,e,n,o,r){let i,s,a,c;if(e.spanGaps&&(t=t.filter(l=>!l.skip)),e.cubicInterpolationMode==="monotone")kFn(t,r);else{let l=o?t[t.length-1]:t[0];for(i=0,s=t.length;i<s;++i)a=t[i],c=DFn(l,a,t[Math.min(i+1,s-(o?0:1))%s],e.tension),a.cp1x=c.previous.x,a.cp1y=c.previous.y,a.cp2x=c.next.x,a.cp2y=c.next.y,l=a}e.capBezierPoints&&NFn(t,n)}function jxe(){return typeof window<"u"&&typeof document<"u"}function Gxe(t){let e=t.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function hG(t,e,n){let o;return typeof t=="string"?(o=parseInt(t,10),t.indexOf("%")!==-1&&(o=o/100*e.parentNode[n])):o=t,o}const mG=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);function IFn(t,e){return mG(t).getPropertyValue(e)}const LFn=["top","right","bottom","left"];function F8(t,e,n){const o={};n=n?"-"+n:"";for(let r=0;r<4;r++){const i=LFn[r];o[i]=parseFloat(t[e+"-"+i+n])||0}return o.width=o.left+o.right,o.height=o.top+o.bottom,o}const OFn=(t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot);function FFn(t,e){const n=t.touches,o=n&&n.length?n[0]:t,{offsetX:r,offsetY:i}=o;let s=!1,a,c;if(OFn(r,i,t.target))a=r,c=i;else{const l=e.getBoundingClientRect();a=o.clientX-l.left,c=o.clientY-l.top,s=!0}return{x:a,y:c,box:s}}function B8(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:o}=e,r=mG(n),i=r.boxSizing==="border-box",s=F8(r,"padding"),a=F8(r,"border","width"),{x:c,y:l,box:u}=FFn(t,n),_=s.left+(u&&a.left),d=s.top+(u&&a.top);let{width:m,height:h}=e;return i&&(m-=s.width+a.width,h-=s.height+a.height),{x:Math.round((c-_)/m*n.width/o),y:Math.round((l-d)/h*n.height/o)}}function BFn(t,e,n){let o,r;if(e===void 0||n===void 0){const i=t&&Gxe(t);if(!i)e=t.clientWidth,n=t.clientHeight;else{const s=i.getBoundingClientRect(),a=mG(i),c=F8(a,"border","width"),l=F8(a,"padding");e=s.width-l.width-c.width,n=s.height-l.height-c.height,o=hG(a.maxWidth,i,"clientWidth"),r=hG(a.maxHeight,i,"clientHeight")}}return{width:e,height:n,maxWidth:o||lG,maxHeight:r||lG}}const Av=t=>Math.round(t*10)/10;function zFn(t,e,n,o){const r=mG(t),i=F8(r,"margin"),s=hG(r.maxWidth,t,"clientWidth")||lG,a=hG(r.maxHeight,t,"clientHeight")||lG,c=BFn(t,e,n);let{width:l,height:u}=c;if(r.boxSizing==="content-box"){const d=F8(r,"border","width"),m=F8(r,"padding");l-=m.width+d.width,u-=m.height+d.height}return l=Math.max(0,l-i.width),u=Math.max(0,o?l/o:u-i.height),l=Av(Math.min(l,s,c.maxWidth)),u=Av(Math.min(u,a,c.maxHeight)),l&&!u&&(u=Av(l/2)),(e!==void 0||n!==void 0)&&o&&c.height&&u>c.height&&(u=c.height,l=Av(Math.floor(u*o))),{width:l,height:u}}function Xst(t,e,n){const o=e||1,r=Av(t.height*o),i=Av(t.width*o);t.height=Av(t.height),t.width=Av(t.width);const s=t.canvas;return s.style&&(n||!s.style.height&&!s.style.width)&&(s.style.height=`${t.height}px`,s.style.width=`${t.width}px`),t.currentDevicePixelRatio!==o||s.height!==r||s.width!==i?(t.currentDevicePixelRatio=o,s.height=r,s.width=i,t.ctx.setTransform(o,0,0,o,0,0),!0):!1}const VFn=(function(){let t=!1;try{const e={get passive(){return t=!0,!1}};jxe()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch{}return t})();function jst(t,e){const n=IFn(t,e),o=n&&n.match(/^(\d+)(\.\d+)?px$/);return o?+o[1]:void 0}function z8(t,e,n,o){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function $Fn(t,e,n,o){return{x:t.x+n*(e.x-t.x),y:o==="middle"?n<.5?t.y:e.y:o==="after"?n<1?t.y:e.y:n>0?e.y:t.y}}function WFn(t,e,n,o){const r={x:t.cp2x,y:t.cp2y},i={x:e.cp1x,y:e.cp1y},s=z8(t,r,n),a=z8(r,i,n),c=z8(i,e,n),l=z8(s,a,n),u=z8(a,c,n);return z8(l,u,n)}const UFn=function(t,e){return{x(n){return t+t+e-n},setWidth(n){e=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,o){return n-o},leftForLtr(n,o){return n-o}}},XFn=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function zE(t,e,n){return t?UFn(e,n):XFn()}function Gst(t,e){let n,o;(e==="ltr"||e==="rtl")&&(n=t.canvas.style,o=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=o)}function Yst(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function qst(t){return t==="angle"?{between:Sst,compare:$On,normalize:Dv}:{between:DH,compare:(e,n)=>e-n,normalize:e=>e}}function Jst({start:t,end:e,count:n,loop:o,style:r}){return{start:t%n,end:e%n,loop:o&&(e-t+1)%n===0,style:r}}function jFn(t,e,n){const{property:o,start:r,end:i}=n,{between:s,normalize:a}=qst(o),c=e.length;let{start:l,end:u,loop:_}=t,d,m;if(_){for(l+=c,u+=c,d=0,m=c;d<m&&s(a(e[l%c][o]),r,i);++d)l--,u--;l%=c,u%=c}return u<l&&(u+=c),{start:l,end:u,loop:_,style:t.style}}function GFn(t,e,n){if(!n)return[t];const{property:o,start:r,end:i}=n,s=e.length,{compare:a,between:c,normalize:l}=qst(o),{start:u,end:_,loop:d,style:m}=jFn(t,e,n),h=[];let p=!1,x=null,f,g,y;const b=()=>c(r,y,f)&&a(r,y)!==0,v=()=>a(i,f)===0||c(i,y,f),S=()=>p||b(),M=()=>!p||v();for(let w=u,D=u;w<=_;++w)g=e[w%s],!g.skip&&(f=l(g[o]),f!==y&&(p=c(f,r,i),x===null&&S()&&(x=a(f,r)===0?w:D),x!==null&&M()&&(h.push(Jst({start:x,end:w,loop:d,count:s,style:m})),x=null),D=w,y=f));return x!==null&&h.push(Jst({start:x,end:_,loop:d,count:s,style:m})),h}function YFn(t,e){const n=[],o=t.segments;for(let r=0;r<o.length;r++){const i=GFn(o[r],t.points,e);i.length&&n.push(...i)}return n}function qFn(t,e,n,o){let r=0,i=e-1;if(n&&!o)for(;r<e&&!t[r].skip;)r++;for(;r<e&&t[r].skip;)r++;for(r%=e,n&&(i+=r);i>r&&t[i%e].skip;)i--;return i%=e,{start:r,end:i}}function JFn(t,e,n,o){const r=t.length,i=[];let s=e,a=t[e],c;for(c=e+1;c<=n;++c){const l=t[c%r];l.skip||l.stop?a.skip||(o=!1,i.push({start:e%r,end:(c-1)%r,loop:o}),e=s=l.stop?c:null):(s=c,a.skip&&(e=c)),a=l}return s!==null&&i.push({start:e%r,end:s%r,loop:o}),i}function KFn(t,e){const n=t.points,o=t.options.spanGaps,r=n.length;if(!r)return[];const i=!!t._loop,{start:s,end:a}=qFn(n,r,i,o);if(o===!0)return Kst(t,[{start:s,end:a,loop:i}],n,e);const c=a<s?a+r:a,l=!!t._fullLoop&&s===0&&a===r-1;return Kst(t,JFn(n,s,c,l),n,e)}function Kst(t,e,n,o){return!o||!o.setContext||!n?e:QFn(t,e,n,o)}function QFn(t,e,n,o){const r=t._chart.getContext(),i=Qst(t.options),{_datasetIndex:s,options:{spanGaps:a}}=t,c=n.length,l=[];let u=i,_=e[0].start,d=_;function m(h,p,x,f){const g=a?-1:1;if(h!==p){for(h+=c;n[h%c].skip;)h-=g;for(;n[p%c].skip;)p+=g;h%c!==p%c&&(l.push({start:h%c,end:p%c,loop:x,style:f}),u=f,_=p%c)}}for(const h of e){_=a?_:h.start;let p=n[_%c],x;for(d=_+1;d<=h.end;d++){const f=n[d%c];x=Qst(o.setContext(O8(r,{type:"segment",p0:p,p1:f,p0DataIndex:(d-1)%c,p1DataIndex:d%c,datasetIndex:s}))),ZFn(x,u)&&m(_,d-1,h.loop,u),p=f,u=x}_<d-1&&m(_,d-1,h.loop,u)}return l}function Qst(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function ZFn(t,e){if(!e)return!1;const n=[],o=function(r,i){return Ixe(i)?(n.includes(i)||n.push(i),n.indexOf(i)):i};return JSON.stringify(t,o)!==JSON.stringify(e,o)}function pG(t,e,n){return t.options.clip?t[n]:e[n]}function eBn(t,e){const{xScale:n,yScale:o}=t;return n&&o?{left:pG(n,e,"left"),right:pG(n,e,"right"),top:pG(o,e,"top"),bottom:pG(o,e,"bottom")}:e}function tBn(t,e){const n=e._clip;if(n.disabled)return!1;const o=eBn(e,t.chartArea);return{left:n.left===!1?0:o.left-(n.left===!0?0:n.left),right:n.right===!1?t.width:o.right+(n.right===!0?0:n.right),top:n.top===!1?0:o.top-(n.top===!0?0:n.top),bottom:n.bottom===!1?t.height:o.bottom+(n.bottom===!0?0:n.bottom)}}class nBn{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,n,o,r){const i=n.listeners[r],s=n.duration;i.forEach(a=>a({chart:e,initial:n.initial,numSteps:s,currentStep:Math.min(o-n.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=Tst.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let n=0;this._charts.forEach((o,r)=>{if(!o.running||!o.items.length)return;const i=o.items;let s=i.length-1,a=!1,c;for(;s>=0;--s)c=i[s],c._active?(c._total>o.duration&&(o.duration=c._total),c.tick(e),a=!0):(i[s]=i[i.length-1],i.pop());a&&(r.draw(),this._notify(r,o,e,"progress")),i.length||(o.running=!1,this._notify(r,o,e,"complete"),o.initial=!1),n+=i.length}),this._lastDate=e,n===0&&(this._running=!1)}_getAnims(e){const n=this._charts;let o=n.get(e);return o||(o={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(e,o)),o}listen(e,n,o){this._getAnims(e).listeners[n].push(o)}add(e,n){!n||!n.length||this._getAnims(e).items.push(...n)}has(e){return this._getAnims(e).items.length>0}start(e){const n=this._charts.get(e);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((o,r)=>Math.max(o,r._duration),0),this._refresh())}running(e){if(!this._running)return!1;const n=this._charts.get(e);return!(!n||!n.running||!n.items.length)}stop(e){const n=this._charts.get(e);if(!n||!n.items.length)return;const o=n.items;let r=o.length-1;for(;r>=0;--r)o[r].cancel();n.items=[],this._notify(e,n,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var Y9=new nBn;const Zst="transparent",oBn={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const o=Ast(t||Zst),r=o.valid&&Ast(e||Zst);return r&&r.valid?r.mix(o,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class rBn{constructor(e,n,o,r){const i=n[o];r=_G([e.to,r,i,e.from]);const s=_G([e.from,i,r]);this._active=!0,this._fn=e.fn||oBn[e.type||typeof s],this._easing=AH[e.easing]||AH.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=n,this._prop=o,this._from=s,this._to=r,this._promises=void 0}active(){return this._active}update(e,n,o){if(this._active){this._notify(!1);const r=this._target[this._prop],i=o-this._start,s=this._duration-i;this._start=o,this._duration=Math.floor(Math.max(s,e.duration)),this._total+=i,this._loop=!!e.loop,this._to=_G([e.to,n,r,e.from]),this._from=_G([e.from,r,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const n=e-this._start,o=this._duration,r=this._prop,i=this._from,s=this._loop,a=this._to;let c;if(this._active=i!==a&&(s||n<o),!this._active){this._target[r]=a,this._notify(!0);return}if(n<0){this._target[r]=i;return}c=n/o%2,c=s&&c>1?2-c:c,c=this._easing(Math.min(1,Math.max(0,c))),this._target[r]=this._fn(i,a,c)}wait(){const e=this._promises||(this._promises=[]);return new Promise((n,o)=>{e.push({res:n,rej:o})})}_notify(e){const n=e?"res":"rej",o=this._promises||[];for(let r=0;r<o.length;r++)o[r][n]()}}class eat{constructor(e,n){this._chart=e,this._properties=new Map,this.configure(n)}configure(e){if(!wc(e))return;const n=Object.keys(Td.animation),o=this._properties;Object.getOwnPropertyNames(e).forEach(r=>{const i=e[r];if(!wc(i))return;const s={};for(const a of n)s[a]=i[a];(sp(i.properties)&&i.properties||[r]).forEach(a=>{(a===r||!o.has(a))&&o.set(a,s)})})}_animateOptions(e,n){const o=n.options,r=sBn(e,o);if(!r)return[];const i=this._createAnimations(r,o);return o.$shared&&iBn(e.options.$animations,o).then(()=>{e.options=o},()=>{}),i}_createAnimations(e,n){const o=this._properties,r=[],i=e.$animations||(e.$animations={}),s=Object.keys(n),a=Date.now();let c;for(c=s.length-1;c>=0;--c){const l=s[c];if(l.charAt(0)==="$")continue;if(l==="options"){r.push(...this._animateOptions(e,n));continue}const u=n[l];let _=i[l];const d=o.get(l);if(_)if(d&&_.active()){_.update(d,u,a);continue}else _.cancel();if(!d||!d.duration){e[l]=u;continue}i[l]=_=new rBn(d,e,l,u),r.push(_)}return r}update(e,n){if(this._properties.size===0){Object.assign(e,n);return}const o=this._createAnimations(e,n);if(o.length)return Y9.add(this._chart,o),!0}}function iBn(t,e){const n=[],o=Object.keys(e);for(let r=0;r<o.length;r++){const i=t[o[r]];i&&i.active()&&n.push(i.wait())}return Promise.all(n)}function sBn(t,e){if(!e)return;let n=t.options;if(!n){t.options=e;return}return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function tat(t,e){const n=t&&t.options||{},o=n.reverse,r=n.min===void 0?e:0,i=n.max===void 0?e:0;return{start:o?i:r,end:o?r:i}}function aBn(t,e,n){if(n===!1)return!1;const o=tat(t,n),r=tat(e,n);return{top:r.end,right:o.end,bottom:r.start,left:o.start}}function cBn(t){let e,n,o,r;return wc(t)?(e=t.top,n=t.right,o=t.bottom,r=t.left):e=n=o=r=t,{top:e,right:n,bottom:o,left:r,disabled:t===!1}}function nat(t,e){const n=[],o=t._getSortedDatasetMetas(e);let r,i;for(r=0,i=o.length;r<i;++r)n.push(o[r].index);return n}function oat(t,e,n,o={}){const r=t.keys,i=o.mode==="single";let s,a,c,l;if(e===null)return;let u=!1;for(s=0,a=r.length;s<a;++s){if(c=+r[s],c===n){if(u=!0,o.all)continue;break}l=t.values[c],D5(l)&&(i||e===0||OE(e)===OE(l))&&(e+=l)}return!u&&!o.all?0:e}function lBn(t,e){const{iScale:n,vScale:o}=e,r=n.axis==="x"?"x":"y",i=o.axis==="x"?"x":"y",s=Object.keys(t),a=new Array(s.length);let c,l,u;for(c=0,l=s.length;c<l;++c)u=s[c],a[c]={[r]:u,[i]:t[u]};return a}function Yxe(t,e){const n=t&&t.options.stacked;return n||n===void 0&&e.stack!==void 0}function uBn(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}function _Bn(t){const{min:e,max:n,minDefined:o,maxDefined:r}=t.getUserBounds();return{min:o?e:Number.NEGATIVE_INFINITY,max:r?n:Number.POSITIVE_INFINITY}}function dBn(t,e,n){const o=t[e]||(t[e]={});return o[n]||(o[n]={})}function rat(t,e,n,o){for(const r of e.getMatchingVisibleMetas(o).reverse()){const i=t[r.index];if(n&&i>0||!n&&i<0)return r.index}return null}function iat(t,e){const{chart:n,_cachedMeta:o}=t,r=n._stacks||(n._stacks={}),{iScale:i,vScale:s,index:a}=o,c=i.axis,l=s.axis,u=uBn(i,s,o),_=e.length;let d;for(let m=0;m<_;++m){const h=e[m],{[c]:p,[l]:x}=h,f=h._stacks||(h._stacks={});d=f[l]=dBn(r,u,p),d[a]=x,d._top=rat(d,s,!0,o.type),d._bottom=rat(d,s,!1,o.type);const g=d._visualValues||(d._visualValues={});g[a]=x}}function qxe(t,e){const n=t.scales;return Object.keys(n).filter(o=>n[o].axis===e).shift()}function hBn(t,e){return O8(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function mBn(t,e,n){return O8(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function IH(t,e){const n=t.controller.index,o=t.vScale&&t.vScale.axis;if(o){e=e||t._parsed;for(const r of e){const i=r._stacks;if(!i||i[o]===void 0||i[o][n]===void 0)return;delete i[o][n],i[o]._visualValues!==void 0&&i[o]._visualValues[n]!==void 0&&delete i[o]._visualValues[n]}}}const Jxe=t=>t==="reset"||t==="none",sat=(t,e)=>e?t:Object.assign({},t),pBn=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:nat(n,!0),values:null};class aat{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(e,n){this.chart=e,this._ctx=e.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=Yxe(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&IH(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,n=this._cachedMeta,o=this.getDataset(),r=(_,d,m,h)=>_==="x"?d:_==="r"?h:m,i=n.xAxisID=Wa(o.xAxisID,qxe(e,"x")),s=n.yAxisID=Wa(o.yAxisID,qxe(e,"y")),a=n.rAxisID=Wa(o.rAxisID,qxe(e,"r")),c=n.indexAxis,l=n.iAxisID=r(c,i,s,a),u=n.vAxisID=r(c,s,i,a);n.xScale=this.getScaleForId(i),n.yScale=this.getScaleForId(s),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(l),n.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const n=this._cachedMeta;return e===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&Mst(this._data,this),e._stacked&&IH(e)}_dataCheck(){const e=this.getDataset(),n=e.data||(e.data=[]),o=this._data;if(wc(n)){const r=this._cachedMeta;this._data=lBn(n,r)}else if(o!==n){if(o){Mst(o,this);const r=this._cachedMeta;IH(r),r._parsed=[]}n&&Object.isExtensible(n)&&jOn(n,this),this._syncList=[],this._data=n}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const n=this._cachedMeta,o=this.getDataset();let r=!1;this._dataCheck();const i=n._stacked;n._stacked=Yxe(n.vScale,n),n.stack!==o.stack&&(r=!0,IH(n),n.stack=o.stack),this._resyncElements(e),(r||i!==n._stacked)&&(iat(this,n._parsed),n._stacked=Yxe(n.vScale,n))}configure(){const e=this.chart.config,n=e.datasetScopeKeys(this._type),o=e.getOptionScopes(this.getDataset(),n,!0);this.options=e.createResolver(o,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,n){const{_cachedMeta:o,_data:r}=this,{iScale:i,_stacked:s}=o,a=i.axis;let c=e===0&&n===r.length?!0:o._sorted,l=e>0&&o._parsed[e-1],u,_,d;if(this._parsing===!1)o._parsed=r,o._sorted=!0,d=r;else{sp(r[e])?d=this.parseArrayData(o,r,e,n):wc(r[e])?d=this.parseObjectData(o,r,e,n):d=this.parsePrimitiveData(o,r,e,n);const m=()=>_[a]===null||l&&_[a]<l[a];for(u=0;u<n;++u)o._parsed[u+e]=_=d[u],c&&(m()&&(c=!1),l=_);o._sorted=c}s&&iat(this,d)}parsePrimitiveData(e,n,o,r){const{iScale:i,vScale:s}=e,a=i.axis,c=s.axis,l=i.getLabels(),u=i===s,_=new Array(r);let d,m,h;for(d=0,m=r;d<m;++d)h=d+o,_[d]={[a]:u||i.parse(l[h],h),[c]:s.parse(n[h],h)};return _}parseArrayData(e,n,o,r){const{xScale:i,yScale:s}=e,a=new Array(r);let c,l,u,_;for(c=0,l=r;c<l;++c)u=c+o,_=n[u],a[c]={x:i.parse(_[0],u),y:s.parse(_[1],u)};return a}parseObjectData(e,n,o,r){const{xScale:i,yScale:s}=e,{xAxisKey:a="x",yAxisKey:c="y"}=this._parsing,l=new Array(r);let u,_,d,m;for(u=0,_=r;u<_;++u)d=u+o,m=n[d],l[u]={x:i.parse(aG(m,a),d),y:s.parse(aG(m,c),d)};return l}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,n,o){const r=this.chart,i=this._cachedMeta,s=n[e.axis],a={keys:nat(r,!0),values:n._stacks[e.axis]._visualValues};return oat(a,s,i.index,{mode:o})}updateRangeFromParsed(e,n,o,r){const i=o[n.axis];let s=i===null?NaN:i;const a=r&&o._stacks[n.axis];r&&a&&(r.values=a,s=oat(r,i,this._cachedMeta.index)),e.min=Math.min(e.min,s),e.max=Math.max(e.max,s)}getMinMax(e,n){const o=this._cachedMeta,r=o._parsed,i=o._sorted&&e===o.iScale,s=r.length,a=this._getOtherScale(e),c=pBn(n,o,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:_}=_Bn(a);let d,m;function h(){m=r[d];const p=m[a.axis];return!D5(m[e.axis])||u>p||_<p}for(d=0;d<s&&!(!h()&&(this.updateRangeFromParsed(l,e,m,c),i));++d);if(i){for(d=s-1;d>=0;--d)if(!h()){this.updateRangeFromParsed(l,e,m,c);break}}return l}getAllParsedValues(e){const n=this._cachedMeta._parsed,o=[];let r,i,s;for(r=0,i=n.length;r<i;++r)s=n[r][e.axis],D5(s)&&o.push(s);return o}getMaxOverflow(){return!1}getLabelAndValue(e){const n=this._cachedMeta,o=n.iScale,r=n.vScale,i=this.getParsed(e);return{label:o?""+o.getLabelForValue(i[o.axis]):"",value:r?""+r.getLabelForValue(i[r.axis]):""}}_update(e){const n=this._cachedMeta;this.update(e||"default"),n._clip=cBn(Wa(this.options.clip,aBn(n.xScale,n.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,n=this.chart,o=this._cachedMeta,r=o.data||[],i=n.chartArea,s=[],a=this._drawStart||0,c=this._drawCount||r.length-a,l=this.options.drawActiveElementsOnTop;let u;for(o.dataset&&o.dataset.draw(e,i,a,c),u=a;u<a+c;++u){const _=r[u];_.hidden||(_.active&&l?s.push(_):_.draw(e,i))}for(u=0;u<s.length;++u)s[u].draw(e,i)}getStyle(e,n){const o=n?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(o):this.resolveDataElementOptions(e||0,o)}getContext(e,n,o){const r=this.getDataset();let i;if(e>=0&&e<this._cachedMeta.data.length){const s=this._cachedMeta.data[e];i=s.$context||(s.$context=mBn(this.getContext(),e,s)),i.parsed=this.getParsed(e),i.raw=r.data[e],i.index=i.dataIndex=e}else i=this.$context||(this.$context=hBn(this.chart.getContext(),this.index)),i.dataset=r,i.index=i.datasetIndex=this.index;return i.active=!!n,i.mode=o,i}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,n){return this._resolveElementOptions(this.dataElementType.id,n,e)}_resolveElementOptions(e,n="default",o){const r=n==="active",i=this._cachedDataOpts,s=e+"-"+n,a=i[s],c=this.enableOptionSharing&&cG(o);if(a)return sat(a,c);const l=this.chart.config,u=l.datasetElementScopeKeys(this._type,e),_=r?[`${e}Hover`,"hover",e,""]:[e,""],d=l.getOptionScopes(this.getDataset(),u),m=Object.keys(Td.elements[e]),h=()=>this.getContext(o,r,n),p=l.resolveNamedOptions(d,m,h,_);return p.$shared&&(p.$shared=c,i[s]=Object.freeze(sat(p,c))),p}_resolveAnimations(e,n,o){const r=this.chart,i=this._cachedDataOpts,s=`animation-${n}`,a=i[s];if(a)return a;let c;if(r.options.animation!==!1){const u=this.chart.config,_=u.datasetAnimationScopeKeys(this._type,n),d=u.getOptionScopes(this.getDataset(),_);c=u.createResolver(d,this.getContext(e,o,n))}const l=new eat(r,c&&c.animations);return c&&c._cacheable&&(i[s]=Object.freeze(l)),l}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,n){return!n||Jxe(e)||this.chart._animationsDisabled}_getSharedOptions(e,n){const o=this.resolveDataElementOptions(e,n),r=this._sharedOptions,i=this.getSharedOptions(o),s=this.includeOptions(n,i)||i!==r;return this.updateSharedOptions(i,n,o),{sharedOptions:i,includeOptions:s}}updateElement(e,n,o,r){Jxe(r)?Object.assign(e,o):this._resolveAnimations(n,r).update(e,o)}updateSharedOptions(e,n,o){e&&!Jxe(n)&&this._resolveAnimations(void 0,n).update(e,o)}_setStyle(e,n,o,r){e.active=r;const i=this.getStyle(n,r);this._resolveAnimations(n,o,r).update(e,{options:!r&&this.getSharedOptions(i)||i})}removeHoverStyle(e,n,o){this._setStyle(e,o,"active",!1)}setHoverStyle(e,n,o){this._setStyle(e,o,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const n=this._data,o=this._cachedMeta.data;for(const[a,c,l]of this._syncList)this[a](c,l);this._syncList=[];const r=o.length,i=n.length,s=Math.min(i,r);s&&this.parse(0,s),i>r?this._insertElements(r,i-r,e):i<r&&this._removeElements(i,r-i)}_insertElements(e,n,o=!0){const r=this._cachedMeta,i=r.data,s=e+n;let a;const c=l=>{for(l.length+=n,a=l.length-1;a>=s;a--)l[a]=l[a-n]};for(c(i),a=e;a<s;++a)i[a]=new this.dataElementType;this._parsing&&c(r._parsed),this.parse(e,n),o&&this.updateElements(i,e,n,"reset")}updateElements(e,n,o,r){}_removeElements(e,n){const o=this._cachedMeta;if(this._parsing){const r=o._parsed.splice(e,n);o._stacked&&IH(o,r)}o.data.splice(e,n)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[n,o,r]=e;this[n](o,r)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,n){n&&this._sync(["_removeElements",e,n]);const o=arguments.length-2;o&&this._sync(["_insertElements",e,o])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}class fBn extends aat{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const n=this._cachedMeta,{dataset:o,data:r=[],_dataset:i}=n,s=this.chart._animationsDisabled;let{start:a,count:c}=JOn(n,r,s);this._drawStart=a,this._drawCount=c,KOn(n)&&(a=0,c=r.length),o._chart=this.chart,o._datasetIndex=this.index,o._decimated=!!i._decimated,o.points=r;const l=this.resolveDatasetElementOptions(e);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(o,void 0,{animated:!s,options:l},e),this.updateElements(r,a,c,e)}updateElements(e,n,o,r){const i=r==="reset",{iScale:s,vScale:a,_stacked:c,_dataset:l}=this._cachedMeta,{sharedOptions:u,includeOptions:_}=this._getSharedOptions(n,r),d=s.axis,m=a.axis,{spanGaps:h,segment:p}=this.options,x=EH(h)?h:Number.POSITIVE_INFINITY,f=this.chart._animationsDisabled||i||r==="none",g=n+o,y=e.length;let b=n>0&&this.getParsed(n-1);for(let v=0;v<y;++v){const S=e[v],M=f?S:{};if(v<n||v>=g){M.skip=!0;continue}const w=this.getParsed(v),D=D0(w[m]),A=M[d]=s.getPixelForValue(w[d],v),I=M[m]=i||D?a.getBasePixel():a.getPixelForValue(c?this.applyStack(a,w,c):w[m],v);M.skip=isNaN(A)||isNaN(I)||D,M.stop=v>0&&Math.abs(w[d]-b[d])>x,p&&(M.parsed=w,M.raw=l.data[v]),_&&(M.options=u||this.resolveDataElementOptions(v,S.active?"active":r)),f||this.updateElement(S,v,M,r),b=w}}getMaxOverflow(){const e=this._cachedMeta,n=e.dataset,o=n.options&&n.options.borderWidth||0,r=e.data||[];if(!r.length)return o;const i=r[0].size(this.resolveDataElementOptions(0)),s=r[r.length-1].size(this.resolveDataElementOptions(r.length-1));return Math.max(o,i,s)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}function V8(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Kxe{static override(e){Object.assign(Kxe.prototype,e)}options;constructor(e){this.options=e||{}}init(){}formats(){return V8()}parse(){return V8()}format(){return V8()}add(){return V8()}diff(){return V8()}startOf(){return V8()}endOf(){return V8()}}var xBn={_date:Kxe};function gBn(t,e,n,o){const{controller:r,data:i,_sorted:s}=t,a=r._cachedMeta.iScale,c=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(a&&e===a.axis&&e!=="r"&&s&&i.length){const l=a._reversePixels?UOn:H8;if(o){if(r._sharedOptions){const u=i[0],_=typeof u.getRange=="function"&&u.getRange(e);if(_){const d=l(i,e,n-_),m=l(i,e,n+_);return{lo:d.lo,hi:m.hi}}}}else{const u=l(i,e,n);if(c){const{vScale:_}=r._cachedMeta,{_parsed:d}=t,m=d.slice(0,u.lo+1).reverse().findIndex(p=>!D0(p[_.axis]));u.lo-=Math.max(0,m);const h=d.slice(u.hi).findIndex(p=>!D0(p[_.axis]));u.hi+=Math.max(0,h)}return u}}return{lo:0,hi:i.length-1}}function fG(t,e,n,o,r){const i=t.getSortedVisibleDatasetMetas(),s=n[e];for(let a=0,c=i.length;a<c;++a){const{index:l,data:u}=i[a],{lo:_,hi:d}=gBn(i[a],e,s,r);for(let m=_;m<=d;++m){const h=u[m];h.skip||o(h,l,m)}}}function yBn(t){const e=t.indexOf("x")!==-1,n=t.indexOf("y")!==-1;return function(o,r){const i=e?Math.abs(o.x-r.x):0,s=n?Math.abs(o.y-r.y):0;return Math.sqrt(Math.pow(i,2)+Math.pow(s,2))}}function Qxe(t,e,n,o,r){const i=[];return!r&&!t.isPointInArea(e)||fG(t,n,e,function(a,c,l){!r&&!kH(a,t.chartArea,0)||a.inRange(e.x,e.y,o)&&i.push({element:a,datasetIndex:c,index:l})},!0),i}function bBn(t,e,n,o){let r=[];function i(s,a,c){const{startAngle:l,endAngle:u}=s.getProps(["startAngle","endAngle"],o),{angle:_}=VOn(s,{x:e.x,y:e.y});Sst(_,l,u)&&r.push({element:s,datasetIndex:a,index:c})}return fG(t,n,e,i),r}function PBn(t,e,n,o,r,i){let s=[];const a=yBn(n);let c=Number.POSITIVE_INFINITY;function l(u,_,d){const m=u.inRange(e.x,e.y,r);if(o&&!m)return;const h=u.getCenterPoint(r);if(!(!!i||t.isPointInArea(h))&&!m)return;const x=a(e,h);x<c?(s=[{element:u,datasetIndex:_,index:d}],c=x):x===c&&s.push({element:u,datasetIndex:_,index:d})}return fG(t,n,e,l),s}function Zxe(t,e,n,o,r,i){return!i&&!t.isPointInArea(e)?[]:n==="r"&&!o?bBn(t,e,n,r):PBn(t,e,n,o,r,i)}function cat(t,e,n,o,r){const i=[],s=n==="x"?"inXRange":"inYRange";let a=!1;return fG(t,n,e,(c,l,u)=>{c[s]&&c[s](e[n],r)&&(i.push({element:c,datasetIndex:l,index:u}),a=a||c.inRange(e.x,e.y,r))}),o&&!a?[]:i}var vBn={modes:{index(t,e,n,o){const r=B8(e,t),i=n.axis||"x",s=n.includeInvisible||!1,a=n.intersect?Qxe(t,r,i,o,s):Zxe(t,r,i,!1,o,s),c=[];return a.length?(t.getSortedVisibleDatasetMetas().forEach(l=>{const u=a[0].index,_=l.data[u];_&&!_.skip&&c.push({element:_,datasetIndex:l.index,index:u})}),c):[]},dataset(t,e,n,o){const r=B8(e,t),i=n.axis||"xy",s=n.includeInvisible||!1;let a=n.intersect?Qxe(t,r,i,o,s):Zxe(t,r,i,!1,o,s);if(a.length>0){const c=a[0].datasetIndex,l=t.getDatasetMeta(c).data;a=[];for(let u=0;u<l.length;++u)a.push({element:l[u],datasetIndex:c,index:u})}return a},point(t,e,n,o){const r=B8(e,t),i=n.axis||"xy",s=n.includeInvisible||!1;return Qxe(t,r,i,o,s)},nearest(t,e,n,o){const r=B8(e,t),i=n.axis||"xy",s=n.includeInvisible||!1;return Zxe(t,r,i,n.intersect,o,s)},x(t,e,n,o){const r=B8(e,t);return cat(t,r,"x",n.intersect,o)},y(t,e,n,o){const r=B8(e,t);return cat(t,r,"y",n.intersect,o)}}};const lat=["left","top","right","bottom"];function LH(t,e){return t.filter(n=>n.pos===e)}function uat(t,e){return t.filter(n=>lat.indexOf(n.pos)===-1&&n.box.axis===e)}function OH(t,e){return t.sort((n,o)=>{const r=e?o:n,i=e?n:o;return r.weight===i.weight?r.index-i.index:r.weight-i.weight})}function SBn(t){const e=[];let n,o,r,i,s,a;for(n=0,o=(t||[]).length;n<o;++n)r=t[n],{position:i,options:{stack:s,stackWeight:a=1}}=r,e.push({index:n,box:r,pos:i,horizontal:r.isHorizontal(),weight:r.weight,stack:s&&i+s,stackWeight:a});return e}function CBn(t){const e={};for(const n of t){const{stack:o,pos:r,stackWeight:i}=n;if(!o||!lat.includes(r))continue;const s=e[o]||(e[o]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=i}return e}function MBn(t,e){const n=CBn(t),{vBoxMaxWidth:o,hBoxMaxHeight:r}=e;let i,s,a;for(i=0,s=t.length;i<s;++i){a=t[i];const{fullSize:c}=a.box,l=n[a.stack],u=l&&a.stackWeight/l.weight;a.horizontal?(a.width=u?u*o:c&&e.availableWidth,a.height=r):(a.width=o,a.height=u?u*r:c&&e.availableHeight)}return n}function TBn(t){const e=SBn(t),n=OH(e.filter(l=>l.box.fullSize),!0),o=OH(LH(e,"left"),!0),r=OH(LH(e,"right")),i=OH(LH(e,"top"),!0),s=OH(LH(e,"bottom")),a=uat(e,"x"),c=uat(e,"y");return{fullSize:n,leftAndTop:o.concat(i),rightAndBottom:r.concat(c).concat(s).concat(a),chartArea:LH(e,"chartArea"),vertical:o.concat(r).concat(c),horizontal:i.concat(s).concat(a)}}function _at(t,e,n,o){return Math.max(t[n],e[n])+Math.max(t[o],e[o])}function dat(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function wBn(t,e,n,o){const{pos:r,box:i}=n,s=t.maxPadding;if(!wc(r)){n.size&&(t[r]-=n.size);const _=o[n.stack]||{size:0,count:1};_.size=Math.max(_.size,n.horizontal?i.height:i.width),n.size=_.size/_.count,t[r]+=n.size}i.getPadding&&dat(s,i.getPadding());const a=Math.max(0,e.outerWidth-_at(s,t,"left","right")),c=Math.max(0,e.outerHeight-_at(s,t,"top","bottom")),l=a!==t.w,u=c!==t.h;return t.w=a,t.h=c,n.horizontal?{same:l,other:u}:{same:u,other:l}}function EBn(t){const e=t.maxPadding;function n(o){const r=Math.max(e[o]-t[o],0);return t[o]+=r,r}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}function DBn(t,e){const n=e.maxPadding;function o(r){const i={left:0,top:0,right:0,bottom:0};return r.forEach(s=>{i[s]=Math.max(e[s],n[s])}),i}return o(t?["left","right"]:["top","bottom"])}function FH(t,e,n,o){const r=[];let i,s,a,c,l,u;for(i=0,s=t.length,l=0;i<s;++i){a=t[i],c=a.box,c.update(a.width||e.w,a.height||e.h,DBn(a.horizontal,e));const{same:_,other:d}=wBn(e,n,a,o);l|=_&&r.length,u=u||d,c.fullSize||r.push(a)}return l&&FH(r,e,n,o)||u}function xG(t,e,n,o,r){t.top=n,t.left=e,t.right=e+o,t.bottom=n+r,t.width=o,t.height=r}function hat(t,e,n,o){const r=n.padding;let{x:i,y:s}=e;for(const a of t){const c=a.box,l=o[a.stack]||{placed:0,weight:1},u=a.stackWeight/l.weight||1;if(a.horizontal){const _=e.w*u,d=l.size||c.height;cG(l.start)&&(s=l.start),c.fullSize?xG(c,r.left,s,n.outerWidth-r.right-r.left,d):xG(c,e.left+l.placed,s,_,d),l.start=s,l.placed+=_,s=c.bottom}else{const _=e.h*u,d=l.size||c.width;cG(l.start)&&(i=l.start),c.fullSize?xG(c,i,r.top,d,n.outerHeight-r.bottom-r.top):xG(c,i,e.top+l.placed,d,_),l.start=i,l.placed+=_,i=c.right}}e.x=i,e.y=s}var k5={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(n){e.draw(n)}}]},t.boxes.push(e)},removeBox(t,e){const n=t.boxes?t.boxes.indexOf(e):-1;n!==-1&&t.boxes.splice(n,1)},configure(t,e,n){e.fullSize=n.fullSize,e.position=n.position,e.weight=n.weight},update(t,e,n,o){if(!t)return;const r=R5(t.options.layout.padding),i=Math.max(e-r.width,0),s=Math.max(n-r.height,0),a=TBn(t.boxes),c=a.vertical,l=a.horizontal;ll(t.boxes,p=>{typeof p.beforeLayout=="function"&&p.beforeLayout()});const u=c.reduce((p,x)=>x.box.options&&x.box.options.display===!1?p:p+1,0)||1,_=Object.freeze({outerWidth:e,outerHeight:n,padding:r,availableWidth:i,availableHeight:s,vBoxMaxWidth:i/2/u,hBoxMaxHeight:s/2}),d=Object.assign({},r);dat(d,R5(o));const m=Object.assign({maxPadding:d,w:i,h:s,x:r.left,y:r.top},r),h=MBn(c.concat(l),_);FH(a.fullSize,m,_,h),FH(c,m,_,h),FH(l,m,_,h)&&FH(c,m,_,h),EBn(m),hat(a.leftAndTop,m,_,h),m.x+=m.w,m.y+=m.h,hat(a.rightAndBottom,m,_,h),t.chartArea={left:m.left,top:m.top,right:m.left+m.w,bottom:m.top+m.h,height:m.h,width:m.w},ll(a.chartArea,p=>{const x=p.box;Object.assign(x,t.chartArea),x.update(m.w,m.h,{left:0,top:0,right:0,bottom:0})})}};class mat{acquireContext(e,n){}releaseContext(e){return!1}addEventListener(e,n,o){}removeEventListener(e,n,o){}getDevicePixelRatio(){return 1}getMaximumSize(e,n,o,r){return n=Math.max(0,n||e.width),o=o||e.height,{width:n,height:Math.max(0,r?Math.floor(n/r):o)}}isAttached(e){return!0}updateConfig(e){}}class ABn extends mat{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const gG="$chartjs",RBn={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},pat=t=>t===null||t==="";function kBn(t,e){const n=t.style,o=t.getAttribute("height"),r=t.getAttribute("width");if(t[gG]={initial:{height:o,width:r,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",pat(r)){const i=jst(t,"width");i!==void 0&&(t.width=i)}if(pat(o))if(t.style.height==="")t.height=t.width/(e||2);else{const i=jst(t,"height");i!==void 0&&(t.height=i)}return t}const fat=VFn?{passive:!0}:!1;function NBn(t,e,n){t&&t.addEventListener(e,n,fat)}function HBn(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,fat)}function IBn(t,e){const n=RBn[t.type]||t.type,{x:o,y:r}=B8(t,e);return{type:n,chart:e,native:t,x:o!==void 0?o:null,y:r!==void 0?r:null}}function yG(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function LBn(t,e,n){const o=t.canvas,r=new MutationObserver(i=>{let s=!1;for(const a of i)s=s||yG(a.addedNodes,o),s=s&&!yG(a.removedNodes,o);s&&n()});return r.observe(document,{childList:!0,subtree:!0}),r}function OBn(t,e,n){const o=t.canvas,r=new MutationObserver(i=>{let s=!1;for(const a of i)s=s||yG(a.removedNodes,o),s=s&&!yG(a.addedNodes,o);s&&n()});return r.observe(document,{childList:!0,subtree:!0}),r}const BH=new Map;let xat=0;function gat(){const t=window.devicePixelRatio;t!==xat&&(xat=t,BH.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function FBn(t,e){BH.size||window.addEventListener("resize",gat),BH.set(t,e)}function BBn(t){BH.delete(t),BH.size||window.removeEventListener("resize",gat)}function zBn(t,e,n){const o=t.canvas,r=o&&Gxe(o);if(!r)return;const i=wst((a,c)=>{const l=r.clientWidth;n(a,c),l<r.clientWidth&&n()},window),s=new ResizeObserver(a=>{const c=a[0],l=c.contentRect.width,u=c.contentRect.height;l===0&&u===0||i(l,u)});return s.observe(r),FBn(t,i),s}function ege(t,e,n){n&&n.disconnect(),e==="resize"&&BBn(t)}function VBn(t,e,n){const o=t.canvas,r=wst(i=>{t.ctx!==null&&n(IBn(i,t))},t);return NBn(o,e,r),r}class $Bn extends mat{acquireContext(e,n){const o=e&&e.getContext&&e.getContext("2d");return o&&o.canvas===e?(kBn(e,n),o):null}releaseContext(e){const n=e.canvas;if(!n[gG])return!1;const o=n[gG].initial;["height","width"].forEach(i=>{const s=o[i];D0(s)?n.removeAttribute(i):n.setAttribute(i,s)});const r=o.style||{};return Object.keys(r).forEach(i=>{n.style[i]=r[i]}),n.width=n.width,delete n[gG],!0}addEventListener(e,n,o){this.removeEventListener(e,n);const r=e.$proxies||(e.$proxies={}),s={attach:LBn,detach:OBn,resize:zBn}[n]||VBn;r[n]=s(e,n,o)}removeEventListener(e,n){const o=e.$proxies||(e.$proxies={}),r=o[n];if(!r)return;({attach:ege,detach:ege,resize:ege}[n]||HBn)(e,n,r),o[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,o,r){return zFn(e,n,o,r)}isAttached(e){const n=e&&Gxe(e);return!!(n&&n.isConnected)}}function WBn(t){return!jxe()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?ABn:$Bn}let $8=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(e){const{x:n,y:o}=this.getProps(["x","y"],e);return{x:n,y:o}}hasValue(){return EH(this.x)&&EH(this.y)}getProps(e,n){const o=this.$animations;if(!n||!o)return this;const r={};return e.forEach(i=>{r[i]=o[i]&&o[i].active()?o[i]._to:this[i]}),r}};function UBn(t,e){const n=t.options.ticks,o=XBn(t),r=Math.min(n.maxTicksLimit||o,o),i=n.major.enabled?GBn(e):[],s=i.length,a=i[0],c=i[s-1],l=[];if(s>r)return YBn(e,l,i,s/r),l;const u=jBn(i,e,r);if(s>0){let _,d;const m=s>1?Math.round((c-a)/(s-1)):null;for(bG(e,l,u,D0(m)?0:a-m,a),_=0,d=s-1;_<d;_++)bG(e,l,u,i[_],i[_+1]);return bG(e,l,u,c,D0(m)?e.length:c+m),l}return bG(e,l,u),l}function XBn(t){const e=t.options.offset,n=t._tickSize(),o=t._length/n+(e?0:1),r=t._maxLength/n;return Math.floor(Math.min(o,r))}function jBn(t,e,n){const o=qBn(t),r=e.length/n;if(!o)return Math.max(r,1);const i=LOn(o);for(let s=0,a=i.length-1;s<a;s++){const c=i[s];if(c>r)return c}return Math.max(r,1)}function GBn(t){const e=[];let n,o;for(n=0,o=t.length;n<o;n++)t[n].major&&e.push(n);return e}function YBn(t,e,n,o){let r=0,i=n[0],s;for(o=Math.ceil(o),s=0;s<t.length;s++)s===i&&(e.push(t[s]),r++,i=n[r*o])}function bG(t,e,n,o,r){const i=Wa(o,0),s=Math.min(Wa(r,t.length),t.length);let a=0,c,l,u;for(n=Math.ceil(n),r&&(c=r-o,n=c/Math.floor(c/n)),u=i;u<0;)a++,u=Math.round(i+a*n);for(l=Math.max(i,0);l<s;l++)l===u&&(e.push(t[l]),a++,u=Math.round(i+a*n))}function qBn(t){const e=t.length;let n,o;if(e<2)return!1;for(o=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==o)return!1;return o}const JBn=t=>t==="left"?"right":t==="right"?"left":t,yat=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n,bat=(t,e)=>Math.min(e||t,t);function Pat(t,e){const n=[],o=t.length/e,r=t.length;let i=0;for(;i<r;i+=o)n.push(t[Math.floor(i)]);return n}function KBn(t,e,n){const o=t.ticks.length,r=Math.min(e,o-1),i=t._startPixel,s=t._endPixel,a=1e-6;let c=t.getPixelForTick(r),l;if(!(n&&(o===1?l=Math.max(c-i,s-c):e===0?l=(t.getPixelForTick(1)-c)/2:l=(c-t.getPixelForTick(r-1))/2,c+=r<e?l:-l,c<i-a||c>s+a)))return c}function QBn(t,e){ll(t,n=>{const o=n.gc,r=o.length/2;let i;if(r>e){for(i=0;i<r;++i)delete n.data[o[i]];o.splice(0,r)}})}function zH(t){return t.drawTicks?t.tickLength:0}function vat(t,e){if(!t.display)return 0;const n=f1(t.font,e),o=R5(t.padding);return(sp(t.text)?t.text.length:1)*n.lineHeight+o.height}function ZBn(t,e){return O8(t,{scale:e,type:"scale"})}function ezn(t,e,n){return O8(t,{tick:n,index:e,type:"tick"})}function tzn(t,e,n){let o=Hxe(t);return(n&&e!=="right"||!n&&e==="right")&&(o=JBn(o)),o}function nzn(t,e,n,o){const{top:r,left:i,bottom:s,right:a,chart:c}=t,{chartArea:l,scales:u}=c;let _=0,d,m,h;const p=s-r,x=a-i;if(t.isHorizontal()){if(m=p1(o,i,a),wc(n)){const f=Object.keys(n)[0],g=n[f];h=u[f].getPixelForValue(g)+p-e}else n==="center"?h=(l.bottom+l.top)/2+p-e:h=yat(t,n,e);d=a-i}else{if(wc(n)){const f=Object.keys(n)[0],g=n[f];m=u[f].getPixelForValue(g)-x+e}else n==="center"?m=(l.left+l.right)/2-x+e:m=yat(t,n,e);h=p1(o,s,r),_=n==="left"?-L4:L4}return{titleX:m,titleY:h,maxWidth:d,rotation:_}}class VE extends $8{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,n){return e}getUserBounds(){let{_userMin:e,_userMax:n,_suggestedMin:o,_suggestedMax:r}=this;return e=d3(e,Number.POSITIVE_INFINITY),n=d3(n,Number.NEGATIVE_INFINITY),o=d3(o,Number.POSITIVE_INFINITY),r=d3(r,Number.NEGATIVE_INFINITY),{min:d3(e,o),max:d3(n,r),minDefined:D5(e),maxDefined:D5(n)}}getMinMax(e){let{min:n,max:o,minDefined:r,maxDefined:i}=this.getUserBounds(),s;if(r&&i)return{min:n,max:o};const a=this.getMatchingVisibleMetas();for(let c=0,l=a.length;c<l;++c)s=a[c].controller.getMinMax(this,e),r||(n=Math.min(n,s.min)),i||(o=Math.max(o,s.max));return n=i&&n>o?o:n,o=r&&n>o?n:o,{min:d3(n,d3(o,n)),max:d3(o,d3(n,o))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){cu(this.options.beforeUpdate,[this])}update(e,n,o){const{beginAtZero:r,grace:i,ticks:s}=this.options,a=s.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=n,this._margins=o=Object.assign({left:0,right:0,top:0,bottom:0},o),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+o.left+o.right:this.height+o.top+o.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=gFn(this,i,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const c=a<this.ticks.length;this._convertTicksToLabels(c?Pat(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),s.display&&(s.autoSkip||s.source==="auto")&&(this.ticks=UBn(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),c&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,n,o;this.isHorizontal()?(n=this.left,o=this.right):(n=this.top,o=this.bottom,e=!e),this._startPixel=n,this._endPixel=o,this._reversePixels=e,this._length=o-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){cu(this.options.afterUpdate,[this])}beforeSetDimensions(){cu(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){cu(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),cu(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){cu(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const n=this.options.ticks;let o,r,i;for(o=0,r=e.length;o<r;o++)i=e[o],i.label=cu(n.callback,[i.value,o,e],this)}afterTickToLabelConversion(){cu(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){cu(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,n=e.ticks,o=bat(this.ticks.length,e.ticks.maxTicksLimit),r=n.minRotation||0,i=n.maxRotation;let s=r,a,c,l;if(!this._isVisible()||!n.display||r>=i||o<=1||!this.isHorizontal()){this.labelRotation=r;return}const u=this._getLabelSizes(),_=u.widest.width,d=u.highest.height,m=A5(this.chart.width-_,0,this.maxWidth);a=e.offset?this.maxWidth/o:m/(o-1),_+6>a&&(a=m/(o-(e.offset?.5:1)),c=this.maxHeight-zH(e.grid)-n.padding-vat(e.title,this.chart.options.font),l=Math.sqrt(_*_+d*d),s=zOn(Math.min(Math.asin(A5((u.highest.height+6)/a,-1,1)),Math.asin(A5(c/l,-1,1))-Math.asin(A5(d/l,-1,1)))),s=Math.max(r,Math.min(i,s))),this.labelRotation=s}afterCalculateLabelRotation(){cu(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){cu(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:n,options:{ticks:o,title:r,grid:i}}=this,s=this._isVisible(),a=this.isHorizontal();if(s){const c=vat(r,n.options.font);if(a?(e.width=this.maxWidth,e.height=zH(i)+c):(e.height=this.maxHeight,e.width=zH(i)+c),o.display&&this.ticks.length){const{first:l,last:u,widest:_,highest:d}=this._getLabelSizes(),m=o.padding*2,h=N8(this.labelRotation),p=Math.cos(h),x=Math.sin(h);if(a){const f=o.mirror?0:x*_.width+p*d.height;e.height=Math.min(this.maxHeight,e.height+f+m)}else{const f=o.mirror?0:p*_.width+x*d.height;e.width=Math.min(this.maxWidth,e.width+f+m)}this._calculatePadding(l,u,x,p)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,n,o,r){const{ticks:{align:i,padding:s},position:a}=this.options,c=this.labelRotation!==0,l=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,_=this.right-this.getPixelForTick(this.ticks.length-1);let d=0,m=0;c?l?(d=r*e.width,m=o*n.height):(d=o*e.height,m=r*n.width):i==="start"?m=n.width:i==="end"?d=e.width:i!=="inner"&&(d=e.width/2,m=n.width/2),this.paddingLeft=Math.max((d-u+s)*this.width/(this.width-u),0),this.paddingRight=Math.max((m-_+s)*this.width/(this.width-_),0)}else{let u=n.height/2,_=e.height/2;i==="start"?(u=0,_=e.height):i==="end"&&(u=n.height,_=0),this.paddingTop=u+s,this.paddingBottom=_+s}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){cu(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:n}=this.options;return n==="top"||n==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let n,o;for(n=0,o=e.length;n<o;n++)D0(e[n].label)&&(e.splice(n,1),o--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const n=this.options.ticks.sampleSize;let o=this.ticks;n<o.length&&(o=Pat(o,n)),this._labelSizes=e=this._computeLabelSizes(o,o.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,n,o){const{ctx:r,_longestTextCache:i}=this,s=[],a=[],c=Math.floor(n/bat(n,o));let l=0,u=0,_,d,m,h,p,x,f,g,y,b,v;for(_=0;_<n;_+=c){if(h=e[_].label,p=this._resolveTickFontOptions(_),r.font=x=p.string,f=i[x]=i[x]||{data:{},gc:[]},g=p.lineHeight,y=b=0,!D0(h)&&!sp(h))y=Hst(r,f.data,f.gc,y,h),b=g;else if(sp(h))for(d=0,m=h.length;d<m;++d)v=h[d],!D0(v)&&!sp(v)&&(y=Hst(r,f.data,f.gc,y,v),b+=g);s.push(y),a.push(b),l=Math.max(y,l),u=Math.max(b,u)}QBn(i,n);const S=s.indexOf(l),M=a.indexOf(u),w=D=>({width:s[D]||0,height:a[D]||0});return{first:w(0),last:w(n-1),widest:w(S),highest:w(M),widths:s,heights:a}}getLabelForValue(e){return e}getPixelForValue(e,n){return NaN}getValueForPixel(e){}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const n=this._startPixel+e*this._length;return WOn(this._alignToPixels?L8(this.chart,n,0):n)}getDecimalForPixel(e){const n=(e-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:n}=this;return e<0&&n<0?n:e>0&&n>0?e:0}getContext(e){const n=this.ticks||[];if(e>=0&&e<n.length){const o=n[e];return o.$context||(o.$context=ezn(this.getContext(),e,o))}return this.$context||(this.$context=ZBn(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,n=N8(this.labelRotation),o=Math.abs(Math.cos(n)),r=Math.abs(Math.sin(n)),i=this._getLabelSizes(),s=e.autoSkipPadding||0,a=i?i.widest.width+s:0,c=i?i.highest.height+s:0;return this.isHorizontal()?c*o>a*r?a/o:c/r:c*r<a*o?c/o:a/r}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const n=this.axis,o=this.chart,r=this.options,{grid:i,position:s,border:a}=r,c=i.offset,l=this.isHorizontal(),_=this.ticks.length+(c?1:0),d=zH(i),m=[],h=a.setContext(this.getContext()),p=h.display?h.width:0,x=p/2,f=function(j){return L8(o,j,p)};let g,y,b,v,S,M,w,D,A,I,H,O;if(s==="top")g=f(this.bottom),M=this.bottom-d,D=g-x,I=f(e.top)+x,O=e.bottom;else if(s==="bottom")g=f(this.top),I=e.top,O=f(e.bottom)-x,M=g+x,D=this.top+d;else if(s==="left")g=f(this.right),S=this.right-d,w=g-x,A=f(e.left)+x,H=e.right;else if(s==="right")g=f(this.left),A=e.left,H=f(e.right)-x,S=g+x,w=this.left+d;else if(n==="x"){if(s==="center")g=f((e.top+e.bottom)/2+.5);else if(wc(s)){const j=Object.keys(s)[0],q=s[j];g=f(this.chart.scales[j].getPixelForValue(q))}I=e.top,O=e.bottom,M=g+x,D=M+d}else if(n==="y"){if(s==="center")g=f((e.left+e.right)/2);else if(wc(s)){const j=Object.keys(s)[0],q=s[j];g=f(this.chart.scales[j].getPixelForValue(q))}S=g-x,w=S-d,A=e.left,H=e.right}const z=Wa(r.ticks.maxTicksLimit,_),V=Math.max(1,Math.ceil(_/z));for(y=0;y<_;y+=V){const j=this.getContext(y),q=i.setContext(j),K=a.setContext(j),ne=q.lineWidth,ce=q.color,ee=K.dash||[],oe=K.dashOffset,ie=q.tickWidth,ae=q.tickColor,de=q.tickBorderDash||[],be=q.tickBorderDashOffset;b=KBn(this,y,c),b!==void 0&&(v=L8(o,b,ne),l?S=w=A=H=v:M=D=I=O=v,m.push({tx1:S,ty1:M,tx2:w,ty2:D,x1:A,y1:I,x2:H,y2:O,width:ne,color:ce,borderDash:ee,borderDashOffset:oe,tickWidth:ie,tickColor:ae,tickBorderDash:de,tickBorderDashOffset:be}))}return this._ticksLength=_,this._borderValue=g,m}_computeLabelItems(e){const n=this.axis,o=this.options,{position:r,ticks:i}=o,s=this.isHorizontal(),a=this.ticks,{align:c,crossAlign:l,padding:u,mirror:_}=i,d=zH(o.grid),m=d+u,h=_?-u:m,p=-N8(this.labelRotation),x=[];let f,g,y,b,v,S,M,w,D,A,I,H,O="middle";if(r==="top")S=this.bottom-h,M=this._getXAxisLabelAlignment();else if(r==="bottom")S=this.top+h,M=this._getXAxisLabelAlignment();else if(r==="left"){const V=this._getYAxisLabelAlignment(d);M=V.textAlign,v=V.x}else if(r==="right"){const V=this._getYAxisLabelAlignment(d);M=V.textAlign,v=V.x}else if(n==="x"){if(r==="center")S=(e.top+e.bottom)/2+m;else if(wc(r)){const V=Object.keys(r)[0],j=r[V];S=this.chart.scales[V].getPixelForValue(j)+m}M=this._getXAxisLabelAlignment()}else if(n==="y"){if(r==="center")v=(e.left+e.right)/2-m;else if(wc(r)){const V=Object.keys(r)[0],j=r[V];v=this.chart.scales[V].getPixelForValue(j)}M=this._getYAxisLabelAlignment(d).textAlign}n==="y"&&(c==="start"?O="top":c==="end"&&(O="bottom"));const z=this._getLabelSizes();for(f=0,g=a.length;f<g;++f){y=a[f],b=y.label;const V=i.setContext(this.getContext(f));w=this.getPixelForTick(f)+i.labelOffset,D=this._resolveTickFontOptions(f),A=D.lineHeight,I=sp(b)?b.length:1;const j=I/2,q=V.color,K=V.textStrokeColor,ne=V.textStrokeWidth;let ce=M;s?(v=w,M==="inner"&&(f===g-1?ce=this.options.reverse?"left":"right":f===0?ce=this.options.reverse?"right":"left":ce="center"),r==="top"?l==="near"||p!==0?H=-I*A+A/2:l==="center"?H=-z.highest.height/2-j*A+A:H=-z.highest.height+A/2:l==="near"||p!==0?H=A/2:l==="center"?H=z.highest.height/2-j*A:H=z.highest.height-I*A,_&&(H*=-1),p!==0&&!V.showLabelBackdrop&&(v+=A/2*Math.sin(p))):(S=w,H=(1-I)*A/2);let ee;if(V.showLabelBackdrop){const oe=R5(V.backdropPadding),ie=z.heights[f],ae=z.widths[f];let de=H-oe.top,be=0-oe.left;switch(O){case"middle":de-=ie/2;break;case"bottom":de-=ie;break}switch(M){case"center":be-=ae/2;break;case"right":be-=ae;break;case"inner":f===g-1?be-=ae:f>0&&(be-=ae/2);break}ee={left:be,top:de,width:ae+oe.width,height:ie+oe.height,color:V.backdropColor}}x.push({label:b,font:D,textOffset:H,options:{rotation:p,color:q,strokeColor:K,strokeWidth:ne,textAlign:ce,textBaseline:O,translation:[v,S],backdrop:ee}})}return x}_getXAxisLabelAlignment(){const{position:e,ticks:n}=this.options;if(-N8(this.labelRotation))return e==="top"?"left":"right";let r="center";return n.align==="start"?r="left":n.align==="end"?r="right":n.align==="inner"&&(r="inner"),r}_getYAxisLabelAlignment(e){const{position:n,ticks:{crossAlign:o,mirror:r,padding:i}}=this.options,s=this._getLabelSizes(),a=e+i,c=s.widest.width;let l,u;return n==="left"?r?(u=this.right+i,o==="near"?l="left":o==="center"?(l="center",u+=c/2):(l="right",u+=c)):(u=this.right-a,o==="near"?l="right":o==="center"?(l="center",u-=c/2):(l="left",u=this.left)):n==="right"?r?(u=this.left+i,o==="near"?l="right":o==="center"?(l="center",u-=c/2):(l="left",u-=c)):(u=this.left+a,o==="near"?l="left":o==="center"?(l="center",u+=c/2):(l="right",u=this.right)):l="right",{textAlign:l,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:n},left:o,top:r,width:i,height:s}=this;n&&(e.save(),e.fillStyle=n,e.fillRect(o,r,i,s),e.restore())}getLineWidthForValue(e){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const r=this.ticks.findIndex(i=>i.value===e);return r>=0?n.setContext(this.getContext(r)).lineWidth:0}drawGrid(e){const n=this.options.grid,o=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let i,s;const a=(c,l,u)=>{!u.width||!u.color||(o.save(),o.lineWidth=u.width,o.strokeStyle=u.color,o.setLineDash(u.borderDash||[]),o.lineDashOffset=u.borderDashOffset,o.beginPath(),o.moveTo(c.x,c.y),o.lineTo(l.x,l.y),o.stroke(),o.restore())};if(n.display)for(i=0,s=r.length;i<s;++i){const c=r[i];n.drawOnChartArea&&a({x:c.x1,y:c.y1},{x:c.x2,y:c.y2},c),n.drawTicks&&a({x:c.tx1,y:c.ty1},{x:c.tx2,y:c.ty2},{color:c.tickColor,width:c.tickWidth,borderDash:c.tickBorderDash,borderDashOffset:c.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:n,options:{border:o,grid:r}}=this,i=o.setContext(this.getContext()),s=o.display?i.width:0;if(!s)return;const a=r.setContext(this.getContext(0)).lineWidth,c=this._borderValue;let l,u,_,d;this.isHorizontal()?(l=L8(e,this.left,s)-s/2,u=L8(e,this.right,a)+a/2,_=d=c):(_=L8(e,this.top,s)-s/2,d=L8(e,this.bottom,a)+a/2,l=u=c),n.save(),n.lineWidth=i.width,n.strokeStyle=i.color,n.beginPath(),n.moveTo(l,_),n.lineTo(u,d),n.stroke(),n.restore()}drawLabels(e){if(!this.options.ticks.display)return;const o=this.ctx,r=this._computeLabelArea();r&&zxe(o,r);const i=this.getLabelItems(e);for(const s of i){const a=s.options,c=s.font,l=s.label,u=s.textOffset;NH(o,l,0,u,c,a)}r&&Vxe(o)}drawTitle(){const{ctx:e,options:{position:n,title:o,reverse:r}}=this;if(!o.display)return;const i=f1(o.font),s=R5(o.padding),a=o.align;let c=i.lineHeight/2;n==="bottom"||n==="center"||wc(n)?(c+=s.bottom,sp(o.text)&&(c+=i.lineHeight*(o.text.length-1))):c+=s.top;const{titleX:l,titleY:u,maxWidth:_,rotation:d}=nzn(this,c,n,a);NH(e,o.text,0,0,i,{color:o.color,maxWidth:_,rotation:d,textAlign:tzn(a,n,r),textBaseline:"middle",translation:[l,u]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,n=e.ticks&&e.ticks.z||0,o=Wa(e.grid&&e.grid.z,-1),r=Wa(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==VE.prototype.draw?[{z:n,draw:i=>{this.draw(i)}}]:[{z:o,draw:i=>{this.drawBackground(),this.drawGrid(i),this.drawTitle()}},{z:r,draw:()=>{this.drawBorder()}},{z:n,draw:i=>{this.drawLabels(i)}}]}getMatchingVisibleMetas(e){const n=this.chart.getSortedVisibleDatasetMetas(),o=this.axis+"AxisID",r=[];let i,s;for(i=0,s=n.length;i<s;++i){const a=n[i];a[o]===this.id&&(!e||a.type===e)&&r.push(a)}return r}_resolveTickFontOptions(e){const n=this.options.ticks.setContext(this.getContext(e));return f1(n.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class PG{constructor(e,n,o){this.type=e,this.scope=n,this.override=o,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const n=Object.getPrototypeOf(e);let o;izn(n)&&(o=this.register(n));const r=this.items,i=e.id,s=this.scope+"."+i;if(!i)throw new Error("class does not have id: "+e);return i in r||(r[i]=e,ozn(e,s,o),this.override&&Td.override(e.id,e.overrides)),s}get(e){return this.items[e]}unregister(e){const n=this.items,o=e.id,r=this.scope;o in n&&delete n[o],r&&o in Td[r]&&(delete Td[r][o],this.override&&delete I8[o])}}function ozn(t,e,n){const o=MH(Object.create(null),[n?Td.get(n):{},Td.get(e),t.defaults]);Td.set(e,o),t.defaultRoutes&&rzn(e,t.defaultRoutes),t.descriptors&&Td.describe(e,t.descriptors)}function rzn(t,e){Object.keys(e).forEach(n=>{const o=n.split("."),r=o.pop(),i=[t].concat(o).join("."),s=e[n].split("."),a=s.pop(),c=s.join(".");Td.route(i,r,c,a)})}function izn(t){return"id"in t&&"defaults"in t}class szn{constructor(){this.controllers=new PG(aat,"datasets",!0),this.elements=new PG($8,"elements"),this.plugins=new PG(Object,"plugins"),this.scales=new PG(VE,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,n,o){[...n].forEach(r=>{const i=o||this._getRegistryForType(r);o||i.isForType(r)||i===this.plugins&&r.id?this._exec(e,i,r):ll(r,s=>{const a=o||this._getRegistryForType(s);this._exec(e,a,s)})})}_exec(e,n,o){const r=Rxe(e);cu(o["before"+r],[],o),n[e](o),cu(o["after"+r],[],o)}_getRegistryForType(e){for(let n=0;n<this._typedRegistries.length;n++){const o=this._typedRegistries[n];if(o.isForType(e))return o}return this.plugins}_get(e,n,o){const r=n.get(e);if(r===void 0)throw new Error('"'+e+'" is not a registered '+o+".");return r}}var m3=new szn;class azn{constructor(){this._init=void 0}notify(e,n,o,r){if(n==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install")),this._init===void 0)return;const i=r?this._descriptors(e).filter(r):this._descriptors(e),s=this._notify(i,e,n,o);return n==="afterDestroy"&&(this._notify(i,e,"stop"),this._notify(this._init,e,"uninstall"),this._init=void 0),s}_notify(e,n,o,r){r=r||{};for(const i of e){const s=i.plugin,a=s[o],c=[n,r,i.options];if(cu(a,c,s)===!1&&r.cancelable)return!1}return!0}invalidate(){D0(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),n}_createDescriptors(e,n){const o=e&&e.config,r=Wa(o.options&&o.options.plugins,{}),i=czn(o);return r===!1&&!n?[]:uzn(e,i,r,n)}_notifyStateChanges(e){const n=this._oldCache||[],o=this._cache,r=(i,s)=>i.filter(a=>!s.some(c=>a.plugin.id===c.plugin.id));this._notify(r(n,o),e,"stop"),this._notify(r(o,n),e,"start")}}function czn(t){const e={},n=[],o=Object.keys(m3.plugins.items);for(let i=0;i<o.length;i++)n.push(m3.getPlugin(o[i]));const r=t.plugins||[];for(let i=0;i<r.length;i++){const s=r[i];n.indexOf(s)===-1&&(n.push(s),e[s.id]=!0)}return{plugins:n,localIds:e}}function lzn(t,e){return!e&&t===!1?null:t===!0?{}:t}function uzn(t,{plugins:e,localIds:n},o,r){const i=[],s=t.getContext();for(const a of e){const c=a.id,l=lzn(o[c],r);l!==null&&i.push({plugin:a,options:_zn(t.config,{plugin:a,local:n[c]},l,s)})}return i}function _zn(t,{plugin:e,local:n},o,r){const i=t.pluginScopeKeys(e),s=t.getOptionScopes(o,i);return n&&e.defaults&&s.push(e.defaults),t.createResolver(s,r,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function tge(t,e){const n=Td.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function dzn(t,e){let n=t;return t==="_index_"?n=e:t==="_value_"&&(n=e==="x"?"y":"x"),n}function hzn(t,e){return t===e?"_index_":"_value_"}function Sat(t){if(t==="x"||t==="y"||t==="r")return t}function mzn(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function nge(t,...e){if(Sat(t))return t;for(const n of e){const o=n.axis||mzn(n.position)||t.length>1&&Sat(t[0].toLowerCase());if(o)return o}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function Cat(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function pzn(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter(o=>o.xAxisID===t||o.yAxisID===t);if(n.length)return Cat(t,"x",n[0])||Cat(t,"y",n[0])}return{}}function fzn(t,e){const n=I8[t.type]||{scales:{}},o=e.scales||{},r=tge(t.type,e),i=Object.create(null);return Object.keys(o).forEach(s=>{const a=o[s];if(!wc(a))return console.error(`Invalid scale configuration for scale: ${s}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${s}`);const c=nge(s,a,pzn(s,t),Td.scales[a.type]),l=hzn(c,r),u=n.scales||{};i[s]=TH(Object.create(null),[{axis:c},a,u[c],u[l]])}),t.data.datasets.forEach(s=>{const a=s.type||t.type,c=s.indexAxis||tge(a,e),u=(I8[a]||{}).scales||{};Object.keys(u).forEach(_=>{const d=dzn(_,c),m=s[d+"AxisID"]||d;i[m]=i[m]||Object.create(null),TH(i[m],[{axis:d},o[m],u[_]])})}),Object.keys(i).forEach(s=>{const a=i[s];TH(a,[Td.scales[a.type],Td.scale])}),i}function Mat(t){const e=t.options||(t.options={});e.plugins=Wa(e.plugins,{}),e.scales=fzn(t,e)}function Tat(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function xzn(t){return t=t||{},t.data=Tat(t.data),Mat(t),t}const wat=new Map,Eat=new Set;function vG(t,e){let n=wat.get(t);return n||(n=e(),wat.set(t,n),Eat.add(n)),n}const VH=(t,e,n)=>{const o=aG(e,n);o!==void 0&&t.add(o)};let gzn=class{constructor(e){this._config=xzn(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=Tat(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),Mat(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return vG(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,n){return vG(`${e}.transition.${n}`,()=>[[`datasets.${e}.transitions.${n}`,`transitions.${n}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,n){return vG(`${e}-${n}`,()=>[[`datasets.${e}.elements.${n}`,`datasets.${e}`,`elements.${n}`,""]])}pluginScopeKeys(e){const n=e.id,o=this.type;return vG(`${o}-plugin-${n}`,()=>[[`plugins.${n}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,n){const o=this._scopeCache;let r=o.get(e);return(!r||n)&&(r=new Map,o.set(e,r)),r}getOptionScopes(e,n,o){const{options:r,type:i}=this,s=this._cachedScopes(e,o),a=s.get(n);if(a)return a;const c=new Set;n.forEach(u=>{e&&(c.add(e),u.forEach(_=>VH(c,e,_))),u.forEach(_=>VH(c,r,_)),u.forEach(_=>VH(c,I8[i]||{},_)),u.forEach(_=>VH(c,Td,_)),u.forEach(_=>VH(c,Oxe,_))});const l=Array.from(c);return l.length===0&&l.push(Object.create(null)),Eat.has(n)&&s.set(n,l),l}chartOptionScopes(){const{options:e,type:n}=this;return[e,I8[n]||{},Td.datasets[n]||{},{type:n},Td,Oxe]}resolveNamedOptions(e,n,o,r=[""]){const i={$shared:!0},{resolver:s,subPrefixes:a}=Dat(this._resolverCache,e,r);let c=s;if(bzn(s,n)){i.$shared=!1,o=Ev(o)?o():o;const l=this.createResolver(e,o,a);c=FE(s,o,l)}for(const l of n)i[l]=c[l];return i}createResolver(e,n,o=[""],r){const{resolver:i}=Dat(this._resolverCache,e,o);return wc(n)?FE(i,n,void 0,r):i}};function Dat(t,e,n){let o=t.get(e);o||(o=new Map,t.set(e,o));const r=n.join();let i=o.get(r);return i||(i={resolver:Wxe(e,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},o.set(r,i)),i}const yzn=t=>wc(t)&&Object.getOwnPropertyNames(t).some(e=>Ev(t[e]));function bzn(t,e){const{isScriptable:n,isIndexable:o}=Fst(t);for(const r of e){const i=n(r),s=o(r),a=(s||i)&&t[r];if(i&&(Ev(a)||yzn(a))||s&&sp(a))return!0}return!1}var Pzn="4.5.1";const vzn=["top","bottom","left","right","chartArea"];function Aat(t,e){return t==="top"||t==="bottom"||vzn.indexOf(t)===-1&&e==="x"}function Rat(t,e){return function(n,o){return n[t]===o[t]?n[e]-o[e]:n[t]-o[t]}}function kat(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),cu(n&&n.onComplete,[t],e)}function Szn(t){const e=t.chart,n=e.options.animation;cu(n&&n.onProgress,[t],e)}function Nat(t){return jxe()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const SG={},Hat=t=>{const e=Nat(t);return Object.values(SG).filter(n=>n.canvas===e).pop()};function Czn(t,e,n){const o=Object.keys(t);for(const r of o){const i=+r;if(i>=e){const s=t[r];delete t[r],(n>0||i>e)&&(t[i+n]=s)}}}function Mzn(t,e,n,o){return!n||t.type==="mouseout"?null:o?e:t}let CG=class{static defaults=Td;static instances=SG;static overrides=I8;static registry=m3;static version=Pzn;static getChart=Hat;static register(...e){m3.add(...e),Iat()}static unregister(...e){m3.remove(...e),Iat()}constructor(e,n){const o=this.config=new gzn(n),r=Nat(e),i=Hat(r);if(i)throw new Error("Canvas is already in use. Chart with ID '"+i.id+"' must be destroyed before the canvas with ID '"+i.canvas.id+"' can be reused.");const s=o.createResolver(o.chartOptionScopes(),this.getContext());this.platform=new(o.platform||WBn(r)),this.platform.updateConfig(o);const a=this.platform.acquireContext(r,s.aspectRatio),c=a&&a.canvas,l=c&&c.height,u=c&&c.width;if(this.id=wOn(),this.ctx=a,this.canvas=c,this.width=u,this.height=l,this._options=s,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new azn,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=YOn(_=>this.update(_),s.resizeDelay||0),this._dataChanges=[],SG[this.id]=this,!a||!c){console.error("Failed to create chart: can't acquire context from the given item");return}Y9.listen(this,"complete",kat),Y9.listen(this,"progress",Szn),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:n},width:o,height:r,_aspectRatio:i}=this;return D0(e)?n&&i?i:r?o/r:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return m3}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Xst(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Ist(this.canvas,this.ctx),this}stop(){return Y9.stop(this),this}resize(e,n){Y9.running(this)?this._resizeBeforeDraw={width:e,height:n}:this._resize(e,n)}_resize(e,n){const o=this.options,r=this.canvas,i=o.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(r,e,n,i),a=o.devicePixelRatio||this.platform.getDevicePixelRatio(),c=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,Xst(this,a,!0)&&(this.notifyPlugins("resize",{size:s}),cu(o.onResize,[this,s],this),this.attached&&this._doResize(c)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};ll(n,(o,r)=>{o.id=r})}buildOrUpdateScales(){const e=this.options,n=e.scales,o=this.scales,r=Object.keys(o).reduce((s,a)=>(s[a]=!1,s),{});let i=[];n&&(i=i.concat(Object.keys(n).map(s=>{const a=n[s],c=nge(s,a),l=c==="r",u=c==="x";return{options:a,dposition:l?"chartArea":u?"bottom":"left",dtype:l?"radialLinear":u?"category":"linear"}}))),ll(i,s=>{const a=s.options,c=a.id,l=nge(c,a),u=Wa(a.type,s.dtype);(a.position===void 0||Aat(a.position,l)!==Aat(s.dposition))&&(a.position=s.dposition),r[c]=!0;let _=null;if(c in o&&o[c].type===u)_=o[c];else{const d=m3.getScale(u);_=new d({id:c,type:u,ctx:this.ctx,chart:this}),o[_.id]=_}_.init(a,e)}),ll(r,(s,a)=>{s||delete o[a]}),ll(o,s=>{k5.configure(this,s,s.options),k5.addBox(this,s)})}_updateMetasets(){const e=this._metasets,n=this.data.datasets.length,o=e.length;if(e.sort((r,i)=>r.index-i.index),o>n){for(let r=n;r<o;++r)this._destroyDatasetMeta(r);e.splice(n,o-n)}this._sortedMetasets=e.slice(0).sort(Rat("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:n}}=this;e.length>n.length&&delete this._stacks,e.forEach((o,r)=>{n.filter(i=>i===o._dataset).length===0&&this._destroyDatasetMeta(r)})}buildOrUpdateControllers(){const e=[],n=this.data.datasets;let o,r;for(this._removeUnreferencedMetasets(),o=0,r=n.length;o<r;o++){const i=n[o];let s=this.getDatasetMeta(o);const a=i.type||this.config.type;if(s.type&&s.type!==a&&(this._destroyDatasetMeta(o),s=this.getDatasetMeta(o)),s.type=a,s.indexAxis=i.indexAxis||tge(a,this.options),s.order=i.order||0,s.index=o,s.label=""+i.label,s.visible=this.isDatasetVisible(o),s.controller)s.controller.updateIndex(o),s.controller.linkScales();else{const c=m3.getController(a),{datasetElementType:l,dataElementType:u}=Td.datasets[a];Object.assign(c,{dataElementType:m3.getElement(u),datasetElementType:l&&m3.getElement(l)}),s.controller=new c(this,o),e.push(s.controller)}}return this._updateMetasets(),e}_resetElements(){ll(this.data.datasets,(e,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const n=this.config;n.update();const o=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!o.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const i=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let l=0,u=this.data.datasets.length;l<u;l++){const{controller:_}=this.getDatasetMeta(l),d=!r&&i.indexOf(_)===-1;_.buildOrUpdateElements(d),s=Math.max(+_.getMaxOverflow(),s)}s=this._minPadding=o.layout.autoPadding?s:0,this._updateLayout(s),r||ll(i,l=>{l.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(Rat("z","_idx"));const{_active:a,_lastEvent:c}=this;c?this._eventHandler(c,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){ll(this.scales,e=>{k5.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,n=new Set(Object.keys(this._listeners)),o=new Set(e.events);(!gst(n,o)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,n=this._getUniformDataChanges()||[];for(const{method:o,start:r,count:i}of n){const s=o==="_removeElements"?-i:i;Czn(e,r,s)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const n=this.data.datasets.length,o=i=>new Set(e.filter(s=>s[0]===i).map((s,a)=>a+","+s.splice(1).join(","))),r=o(0);for(let i=1;i<n;i++)if(!gst(r,o(i)))return;return Array.from(r).map(i=>i.split(",")).map(i=>({method:i[1],start:+i[2],count:+i[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;k5.update(this,this.width,this.height,e);const n=this.chartArea,o=n.width<=0||n.height<=0;this._layers=[],ll(this.boxes,r=>{o&&r.position==="chartArea"||(r.configure&&r.configure(),this._layers.push(...r._layers()))},this),this._layers.forEach((r,i)=>{r._idx=i}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let n=0,o=this.data.datasets.length;n<o;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,o=this.data.datasets.length;n<o;++n)this._updateDataset(n,Ev(e)?e({datasetIndex:n}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,n){const o=this.getDatasetMeta(e),r={meta:o,index:e,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",r)!==!1&&(o.controller._update(n),r.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",r))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Y9.has(this)?this.attached&&!Y9.running(this)&&Y9.start(this):(this.draw(),kat({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:o,height:r}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(o,r)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(this.chartArea);for(this._drawDatasets();e<n.length;++e)n[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const n=this._sortedMetasets,o=[];let r,i;for(r=0,i=n.length;r<i;++r){const s=n[r];(!e||s.visible)&&o.push(s)}return o}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let n=e.length-1;n>=0;--n)this._drawDataset(e[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const n=this.ctx,o={meta:e,index:e.index,cancelable:!0},r=tBn(this,e);this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(r&&zxe(n,r),e.controller.draw(),r&&Vxe(n),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(e){return kH(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,o,r){const i=vBn.modes[n];return typeof i=="function"?i(this,e,o,r):[]}getDatasetMeta(e){const n=this.data.datasets[e],o=this._metasets;let r=o.filter(i=>i&&i._dataset===n).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:e,_dataset:n,_parsed:[],_sorted:!1},o.push(r)),r}getContext(){return this.$context||(this.$context=O8(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const n=this.data.datasets[e];if(!n)return!1;const o=this.getDatasetMeta(e);return typeof o.hidden=="boolean"?!o.hidden:!n.hidden}setDatasetVisibility(e,n){const o=this.getDatasetMeta(e);o.hidden=!n}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,n,o){const r=o?"show":"hide",i=this.getDatasetMeta(e),s=i.controller._resolveAnimations(void 0,r);cG(n)?(i.data[n].hidden=!o,this.update()):(this.setDatasetVisibility(e,o),s.update(i,{visible:o}),this.update(a=>a.datasetIndex===e?r:void 0))}hide(e,n){this._updateVisibility(e,n,!1)}show(e,n){this._updateVisibility(e,n,!0)}_destroyDatasetMeta(e){const n=this._metasets[e];n&&n.controller&&n.controller._destroy(),delete this._metasets[e]}_stop(){let e,n;for(this.stop(),Y9.remove(this),e=0,n=this.data.datasets.length;e<n;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:n}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),Ist(e,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete SG[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,n=this.platform,o=(i,s)=>{n.addEventListener(this,i,s),e[i]=s},r=(i,s,a)=>{i.offsetX=s,i.offsetY=a,this._eventHandler(i)};ll(this.options.events,i=>o(i,r))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,n=this.platform,o=(c,l)=>{n.addEventListener(this,c,l),e[c]=l},r=(c,l)=>{e[c]&&(n.removeEventListener(this,c,l),delete e[c])},i=(c,l)=>{this.canvas&&this.resize(c,l)};let s;const a=()=>{r("attach",a),this.attached=!0,this.resize(),o("resize",i),o("detach",s)};s=()=>{this.attached=!1,r("resize",i),this._stop(),this._resize(0,0),o("attach",a)},n.isAttached(this.canvas)?a():s()}unbindEvents(){ll(this._listeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._listeners={},ll(this._responsiveListeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,n,o){const r=o?"set":"remove";let i,s,a,c;for(n==="dataset"&&(i=this.getDatasetMeta(e[0].datasetIndex),i.controller["_"+r+"DatasetHoverStyle"]()),a=0,c=e.length;a<c;++a){s=e[a];const l=s&&this.getDatasetMeta(s.datasetIndex).controller;l&&l[r+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const n=this._active||[],o=e.map(({datasetIndex:i,index:s})=>{const a=this.getDatasetMeta(i);if(!a)throw new Error("No dataset found at index "+i);return{datasetIndex:i,element:a.data[s],index:s}});!iG(o,n)&&(this._active=o,this._lastEvent=null,this._updateHoverStyles(o,n))}notifyPlugins(e,n,o){return this._plugins.notify(this,e,n,o)}isPluginEnabled(e){return this._plugins._cache.filter(n=>n.plugin.id===e).length===1}_updateHoverStyles(e,n,o){const r=this.options.hover,i=(c,l)=>c.filter(u=>!l.some(_=>u.datasetIndex===_.datasetIndex&&u.index===_.index)),s=i(n,e),a=o?e:i(e,n);s.length&&this.updateHoverStyle(s,r.mode,!1),a.length&&r.mode&&this.updateHoverStyle(a,r.mode,!0)}_eventHandler(e,n){const o={event:e,replay:n,cancelable:!0,inChartArea:this.isPointInArea(e)},r=s=>(s.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",o,r)===!1)return;const i=this._handleEvent(e,n,o.inChartArea);return o.cancelable=!1,this.notifyPlugins("afterEvent",o,r),(i||o.changed)&&this.render(),this}_handleEvent(e,n,o){const{_active:r=[],options:i}=this,s=n,a=this._getActiveElements(e,r,o,s),c=NOn(e),l=Mzn(e,this._lastEvent,o,c);o&&(this._lastEvent=null,cu(i.onHover,[e,a,this],this),c&&cu(i.onClick,[e,a,this],this));const u=!iG(a,r);return(u||n)&&(this._active=a,this._updateHoverStyles(a,r,n)),this._lastEvent=l,u}_getActiveElements(e,n,o,r){if(e.type==="mouseout")return[];if(!o)return n;const i=this.options.hover;return this.getElementsAtEventForMode(e,i.mode,i,r)}};function Iat(){return ll(CG.instances,t=>t._plugins.invalidate())}function Lat(t,e,n=e){t.lineCap=Wa(n.borderCapStyle,e.borderCapStyle),t.setLineDash(Wa(n.borderDash,e.borderDash)),t.lineDashOffset=Wa(n.borderDashOffset,e.borderDashOffset),t.lineJoin=Wa(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=Wa(n.borderWidth,e.borderWidth),t.strokeStyle=Wa(n.borderColor,e.borderColor)}function Tzn(t,e,n){t.lineTo(n.x,n.y)}function wzn(t){return t.stepped?cFn:t.tension||t.cubicInterpolationMode==="monotone"?lFn:Tzn}function Oat(t,e,n={}){const o=t.length,{start:r=0,end:i=o-1}=n,{start:s,end:a}=e,c=Math.max(r,s),l=Math.min(i,a),u=r<s&&i<s||r>a&&i>a;return{count:o,start:c,loop:e.loop,ilen:l<c&&!u?o+l-c:l-c}}function Ezn(t,e,n,o){const{points:r,options:i}=e,{count:s,start:a,loop:c,ilen:l}=Oat(r,n,o),u=wzn(i);let{move:_=!0,reverse:d}=o||{},m,h,p;for(m=0;m<=l;++m)h=r[(a+(d?l-m:m))%s],!h.skip&&(_?(t.moveTo(h.x,h.y),_=!1):u(t,p,h,d,i.stepped),p=h);return c&&(h=r[(a+(d?l:0))%s],u(t,p,h,d,i.stepped)),!!c}function Dzn(t,e,n,o){const r=e.points,{count:i,start:s,ilen:a}=Oat(r,n,o),{move:c=!0,reverse:l}=o||{};let u=0,_=0,d,m,h,p,x,f;const g=b=>(s+(l?a-b:b))%i,y=()=>{p!==x&&(t.lineTo(u,x),t.lineTo(u,p),t.lineTo(u,f))};for(c&&(m=r[g(0)],t.moveTo(m.x,m.y)),d=0;d<=a;++d){if(m=r[g(d)],m.skip)continue;const b=m.x,v=m.y,S=b|0;S===h?(v<p?p=v:v>x&&(x=v),u=(_*u+b)/++_):(y(),t.lineTo(b,v),h=S,_=0,p=x=v),f=v}y()}function oge(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!n?Dzn:Ezn}function Azn(t){return t.stepped?$Fn:t.tension||t.cubicInterpolationMode==="monotone"?WFn:z8}function Rzn(t,e,n,o){let r=e._path;r||(r=e._path=new Path2D,e.path(r,n,o)&&r.closePath()),Lat(t,e.options),t.stroke(r)}function kzn(t,e,n,o){const{segments:r,options:i}=e,s=oge(e);for(const a of r)Lat(t,i,a.style),t.beginPath(),s(t,e,a,{start:n,end:n+o-1})&&t.closePath(),t.stroke()}const Nzn=typeof Path2D=="function";function Hzn(t,e,n,o){Nzn&&!e.options.segment?Rzn(t,e,n,o):kzn(t,e,n,o)}class Izn extends $8{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"};constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,n){const o=this.options;if((o.tension||o.cubicInterpolationMode==="monotone")&&!o.stepped&&!this._pointsUpdated){const r=o.spanGaps?this._loop:this._fullLoop;HFn(this._points,o,e,r,n),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=KFn(this,this.options.segment))}first(){const e=this.segments,n=this.points;return e.length&&n[e[0].start]}last(){const e=this.segments,n=this.points,o=e.length;return o&&n[e[o-1].end]}interpolate(e,n){const o=this.options,r=e[n],i=this.points,s=YFn(this,{property:n,start:r,end:r});if(!s.length)return;const a=[],c=Azn(o);let l,u;for(l=0,u=s.length;l<u;++l){const{start:_,end:d}=s[l],m=i[_],h=i[d];if(m===h){a.push(m);continue}const p=Math.abs((r-m[n])/(h[n]-m[n])),x=c(m,h,p,o.stepped);x[n]=e[n],a.push(x)}return a.length===1?a[0]:a}pathSegment(e,n,o){return oge(this)(e,this,n,o)}path(e,n,o){const r=this.segments,i=oge(this);let s=this._loop;n=n||0,o=o||this.points.length-n;for(const a of r)s&=i(e,this,a,{start:n,end:n+o-1});return!!s}draw(e,n,o,r){const i=this.options||{};(this.points||[]).length&&i.borderWidth&&(e.save(),Hzn(e,this,o,r),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function Fat(t,e,n,o){const r=t.options,{[n]:i}=t.getProps([n],o);return Math.abs(e-i)<r.radius+r.hitRadius}class Lzn extends $8{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(e){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,n,o){const r=this.options,{x:i,y:s}=this.getProps(["x","y"],o);return Math.pow(e-i,2)+Math.pow(n-s,2)<Math.pow(r.hitRadius+r.radius,2)}inXRange(e,n){return Fat(this,e,"x",n)}inYRange(e,n){return Fat(this,e,"y",n)}getCenterPoint(e){const{x:n,y:o}=this.getProps(["x","y"],e);return{x:n,y:o}}size(e){e=e||this.options||{};let n=e.radius||0;n=Math.max(n,n&&e.hoverRadius||0);const o=n&&e.borderWidth||0;return(n+o)*2}draw(e,n){const o=this.options;this.skip||o.radius<.1||!kH(this,n,this.size(o)/2)||(e.strokeStyle=o.borderColor,e.lineWidth=o.borderWidth,e.fillStyle=o.backgroundColor,Bxe(e,o,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}const Bat=(t,e)=>{let{boxHeight:n=e,boxWidth:o=e}=t;return t.usePointStyle&&(n=Math.min(n,e),o=t.pointStyleWidth||Math.min(o,e)),{boxWidth:o,boxHeight:n,itemHeight:Math.max(e,n)}},Ozn=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class zat extends $8{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,n,o){this.maxWidth=e,this.maxHeight=n,this._margins=o,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let n=cu(e.generateLabels,[this.chart],this)||[];e.filter&&(n=n.filter(o=>e.filter(o,this.chart.data))),e.sort&&(n=n.sort((o,r)=>e.sort(o,r,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:e,ctx:n}=this;if(!e.display){this.width=this.height=0;return}const o=e.labels,r=f1(o.font),i=r.size,s=this._computeTitleHeight(),{boxWidth:a,itemHeight:c}=Bat(o,i);let l,u;n.font=r.string,this.isHorizontal()?(l=this.maxWidth,u=this._fitRows(s,i,a,c)+10):(u=this.maxHeight,l=this._fitCols(s,r,a,c)+10),this.width=Math.min(l,e.maxWidth||this.maxWidth),this.height=Math.min(u,e.maxHeight||this.maxHeight)}_fitRows(e,n,o,r){const{ctx:i,maxWidth:s,options:{labels:{padding:a}}}=this,c=this.legendHitBoxes=[],l=this.lineWidths=[0],u=r+a;let _=e;i.textAlign="left",i.textBaseline="middle";let d=-1,m=-u;return this.legendItems.forEach((h,p)=>{const x=o+n/2+i.measureText(h.text).width;(p===0||l[l.length-1]+x+2*a>s)&&(_+=u,l[l.length-(p>0?0:1)]=0,m+=u,d++),c[p]={left:0,top:m,row:d,width:x,height:r},l[l.length-1]+=x+a}),_}_fitCols(e,n,o,r){const{ctx:i,maxHeight:s,options:{labels:{padding:a}}}=this,c=this.legendHitBoxes=[],l=this.columnSizes=[],u=s-e;let _=a,d=0,m=0,h=0,p=0;return this.legendItems.forEach((x,f)=>{const{itemWidth:g,itemHeight:y}=Fzn(o,n,i,x,r);f>0&&m+y+2*a>u&&(_+=d+a,l.push({width:d,height:m}),h+=d+a,p++,d=m=0),c[f]={left:h,top:m,col:p,width:g,height:y},d=Math.max(d,g),m+=y+a}),_+=d,l.push({width:d,height:m}),_}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:o,labels:{padding:r},rtl:i}}=this,s=zE(i,this.left,this.width);if(this.isHorizontal()){let a=0,c=p1(o,this.left+r,this.right-this.lineWidths[a]);for(const l of n)a!==l.row&&(a=l.row,c=p1(o,this.left+r,this.right-this.lineWidths[a])),l.top+=this.top+e+r,l.left=s.leftForLtr(s.x(c),l.width),c+=l.width+r}else{let a=0,c=p1(o,this.top+e+r,this.bottom-this.columnSizes[a].height);for(const l of n)l.col!==a&&(a=l.col,c=p1(o,this.top+e+r,this.bottom-this.columnSizes[a].height)),l.top=c,l.left+=this.left+r,l.left=s.leftForLtr(s.x(l.left),l.width),c+=l.height+r}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;zxe(e,this),this._draw(),Vxe(e)}}_draw(){const{options:e,columnSizes:n,lineWidths:o,ctx:r}=this,{align:i,labels:s}=e,a=Td.color,c=zE(e.rtl,this.left,this.width),l=f1(s.font),{padding:u}=s,_=l.size,d=_/2;let m;this.drawTitle(),r.textAlign=c.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=l.string;const{boxWidth:h,boxHeight:p,itemHeight:x}=Bat(s,_),f=function(S,M,w){if(isNaN(h)||h<=0||isNaN(p)||p<0)return;r.save();const D=Wa(w.lineWidth,1);if(r.fillStyle=Wa(w.fillStyle,a),r.lineCap=Wa(w.lineCap,"butt"),r.lineDashOffset=Wa(w.lineDashOffset,0),r.lineJoin=Wa(w.lineJoin,"miter"),r.lineWidth=D,r.strokeStyle=Wa(w.strokeStyle,a),r.setLineDash(Wa(w.lineDash,[])),s.usePointStyle){const A={radius:p*Math.SQRT2/2,pointStyle:w.pointStyle,rotation:w.rotation,borderWidth:D},I=c.xPlus(S,h/2),H=M+d;Lst(r,A,I,H,s.pointStyleWidth&&h)}else{const A=M+Math.max((_-p)/2,0),I=c.leftForLtr(S,h),H=HH(w.borderRadius);r.beginPath(),Object.values(H).some(O=>O!==0)?$xe(r,{x:I,y:A,w:h,h:p,radius:H}):r.rect(I,A,h,p),r.fill(),D!==0&&r.stroke()}r.restore()},g=function(S,M,w){NH(r,w.text,S,M+x/2,l,{strikethrough:w.hidden,textAlign:c.textAlign(w.textAlign)})},y=this.isHorizontal(),b=this._computeTitleHeight();y?m={x:p1(i,this.left+u,this.right-o[0]),y:this.top+u+b,line:0}:m={x:this.left+u,y:p1(i,this.top+b+u,this.bottom-n[0].height),line:0},Gst(this.ctx,e.textDirection);const v=x+u;this.legendItems.forEach((S,M)=>{r.strokeStyle=S.fontColor,r.fillStyle=S.fontColor;const w=r.measureText(S.text).width,D=c.textAlign(S.textAlign||(S.textAlign=s.textAlign)),A=h+d+w;let I=m.x,H=m.y;c.setWidth(this.width),y?M>0&&I+A+u>this.right&&(H=m.y+=v,m.line++,I=m.x=p1(i,this.left+u,this.right-o[m.line])):M>0&&H+v>this.bottom&&(I=m.x=I+n[m.line].width+u,m.line++,H=m.y=p1(i,this.top+b+u,this.bottom-n[m.line].height));const O=c.x(I);if(f(O,H,S),I=qOn(D,I+h+d,y?I+A:this.right,e.rtl),g(c.x(I),H,S),y)m.x+=A+u;else if(typeof S.text!="string"){const z=l.lineHeight;m.y+=Vat(S,z)+u}else m.y+=v}),Yst(this.ctx,e.textDirection)}drawTitle(){const e=this.options,n=e.title,o=f1(n.font),r=R5(n.padding);if(!n.display)return;const i=zE(e.rtl,this.left,this.width),s=this.ctx,a=n.position,c=o.size/2,l=r.top+c;let u,_=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),u=this.top+l,_=p1(e.align,_,this.right-d);else{const h=this.columnSizes.reduce((p,x)=>Math.max(p,x.height),0);u=l+p1(e.align,this.top,this.bottom-h-e.labels.padding-this._computeTitleHeight())}const m=p1(a,_,_+d);s.textAlign=i.textAlign(Hxe(a)),s.textBaseline="middle",s.strokeStyle=n.color,s.fillStyle=n.color,s.font=o.string,NH(s,n.text,m,u,o)}_computeTitleHeight(){const e=this.options.title,n=f1(e.font),o=R5(e.padding);return e.display?n.lineHeight+o.height:0}_getLegendItemAt(e,n){let o,r,i;if(DH(e,this.left,this.right)&&DH(n,this.top,this.bottom)){for(i=this.legendHitBoxes,o=0;o<i.length;++o)if(r=i[o],DH(e,r.left,r.left+r.width)&&DH(n,r.top,r.top+r.height))return this.legendItems[o]}return null}handleEvent(e){const n=this.options;if(!Vzn(e.type,n))return;const o=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const r=this._hoveredItem,i=Ozn(r,o);r&&!i&&cu(n.onLeave,[e,r,this],this),this._hoveredItem=o,o&&!i&&cu(n.onHover,[e,o,this],this)}else o&&cu(n.onClick,[e,o,this],this)}}function Fzn(t,e,n,o,r){const i=Bzn(o,t,e,n),s=zzn(r,o,e.lineHeight);return{itemWidth:i,itemHeight:s}}function Bzn(t,e,n,o){let r=t.text;return r&&typeof r!="string"&&(r=r.reduce((i,s)=>i.length>s.length?i:s)),e+n.size/2+o.measureText(r).width}function zzn(t,e,n){let o=t;return typeof e.text!="string"&&(o=Vat(e,n)),o}function Vat(t,e){const n=t.text?t.text.length:0;return e*n}function Vzn(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var $zn={id:"legend",_element:zat,start(t,e,n){const o=t.legend=new zat({ctx:t.ctx,options:n,chart:t});k5.configure(t,o,n),k5.addBox(t,o)},stop(t){k5.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const o=t.legend;k5.configure(t,o,n),o.options=n},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,n){const o=e.datasetIndex,r=n.chart;r.isDatasetVisible(o)?(r.hide(o),e.hidden=!0):(r.show(o),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:n,pointStyle:o,textAlign:r,color:i,useBorderRadius:s,borderRadius:a}}=t.legend.options;return t._getSortedDatasetMetas().map(c=>{const l=c.controller.getStyle(n?0:void 0),u=R5(l.borderWidth);return{text:e[c.index].label,fillStyle:l.backgroundColor,fontColor:i,hidden:!c.visible,lineCap:l.borderCapStyle,lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:l.borderColor,pointStyle:o||l.pointStyle,rotation:l.rotation,textAlign:r||l.textAlign,borderRadius:s&&(a||l.borderRadius),datasetIndex:c.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};let $at=class extends $8{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,n){const o=this.options;if(this.left=0,this.top=0,!o.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=n;const r=sp(o.text)?o.text.length:1;this._padding=R5(o.padding);const i=r*f1(o.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=i:this.width=i}isHorizontal(){const e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){const{top:n,left:o,bottom:r,right:i,options:s}=this,a=s.align;let c=0,l,u,_;return this.isHorizontal()?(u=p1(a,o,i),_=n+e,l=i-o):(s.position==="left"?(u=o+e,_=p1(a,r,n),c=ap*-.5):(u=i-e,_=p1(a,n,r),c=ap*.5),l=r-n),{titleX:u,titleY:_,maxWidth:l,rotation:c}}draw(){const e=this.ctx,n=this.options;if(!n.display)return;const o=f1(n.font),i=o.lineHeight/2+this._padding.top,{titleX:s,titleY:a,maxWidth:c,rotation:l}=this._drawArgs(i);NH(e,n.text,0,0,o,{color:n.color,maxWidth:c,rotation:l,textAlign:Hxe(n.align),textBaseline:"middle",translation:[s,a]})}};function Wzn(t,e){const n=new $at({ctx:t.ctx,options:e,chart:t});k5.configure(t,n,e),k5.addBox(t,n),t.titleBlock=n}var Uzn={id:"title",_element:$at,start(t,e,n){Wzn(t,n)},stop(t){const e=t.titleBlock;k5.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const o=t.titleBlock;k5.configure(t,o,n),o.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const $H={average(t){if(!t.length)return!1;let e,n,o=new Set,r=0,i=0;for(e=0,n=t.length;e<n;++e){const a=t[e].element;if(a&&a.hasValue()){const c=a.tooltipPosition();o.add(c.x),r+=c.y,++i}}return i===0||o.size===0?!1:{x:[...o].reduce((a,c)=>a+c)/o.size,y:r/i}},nearest(t,e){if(!t.length)return!1;let n=e.x,o=e.y,r=Number.POSITIVE_INFINITY,i,s,a;for(i=0,s=t.length;i<s;++i){const c=t[i].element;if(c&&c.hasValue()){const l=c.getCenterPoint(),u=kxe(e,l);u<r&&(r=u,a=c)}}if(a){const c=a.tooltipPosition();n=c.x,o=c.y}return{x:n,y:o}}};function p3(t,e){return e&&(sp(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function q9(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(`
|
|
5370
5370
|
`)>-1?t.split(`
|
|
5371
|
-
`):t}function Xzn(t,e){const{element:n,datasetIndex:o,index:r}=e,i=t.getDatasetMeta(o).controller,{label:s,value:a}=i.getLabelAndValue(r);return{chart:t,label:s,parsed:i.getParsed(r),raw:t.data.datasets[o].data[r],formattedValue:a,dataset:i.getDataset(),dataIndex:r,datasetIndex:o,element:n}}function Wat(t,e){const n=t.chart.ctx,{body:o,footer:r,title:i}=t,{boxWidth:s,boxHeight:a}=e,c=f1(e.bodyFont),l=f1(e.titleFont),u=f1(e.footerFont),_=i.length,d=r.length,m=o.length,h=R5(e.padding);let p=h.height,x=0,f=o.reduce((b,v)=>b+v.before.length+v.lines.length+v.after.length,0);if(f+=t.beforeBody.length+t.afterBody.length,_&&(p+=_*l.lineHeight+(_-1)*e.titleSpacing+e.titleMarginBottom),f){const b=e.displayColors?Math.max(a,c.lineHeight):c.lineHeight;p+=m*b+(f-m)*c.lineHeight+(f-1)*e.bodySpacing}d&&(p+=e.footerMarginTop+d*u.lineHeight+(d-1)*e.footerSpacing);let g=0;const y=function(b){x=Math.max(x,n.measureText(b).width+g)};return n.save(),n.font=l.string,ll(t.title,y),n.font=c.string,ll(t.beforeBody.concat(t.afterBody),y),g=e.displayColors?s+2+e.boxPadding:0,ll(o,b=>{ll(b.before,y),ll(b.lines,y),ll(b.after,y)}),g=0,n.font=u.string,ll(t.footer,y),n.restore(),x+=h.width,{width:x,height:p}}function jzn(t,e){const{y:n,height:o}=e;return n<o/2?"top":n>t.height-o/2?"bottom":"center"}function Gzn(t,e,n,o){const{x:r,width:i}=o,s=n.caretSize+n.caretPadding;if(t==="left"&&r+i+s>e.width||t==="right"&&r-i-s<0)return!0}function Yzn(t,e,n,o){const{x:r,width:i}=n,{width:s,chartArea:{left:a,right:c}}=t;let l="center";return o==="center"?l=r<=(a+c)/2?"left":"right":r<=i/2?l="left":r>=s-i/2&&(l="right"),Gzn(l,t,e,n)&&(l="center"),l}function Uat(t,e,n){const o=n.yAlign||e.yAlign||jzn(t,n);return{xAlign:n.xAlign||e.xAlign||Yzn(t,e,n,o),yAlign:o}}function qzn(t,e){let{x:n,width:o}=t;return e==="right"?n-=o:e==="center"&&(n-=o/2),n}function Jzn(t,e,n){let{y:o,height:r}=t;return e==="top"?o+=n:e==="bottom"?o-=r+n:o-=r/2,o}function Xat(t,e,n,o){const{caretSize:r,caretPadding:i,cornerRadius:s}=t,{xAlign:a,yAlign:c}=n,l=r+i,{topLeft:u,topRight:_,bottomLeft:d,bottomRight:m}=HH(s);let h=qzn(e,a);const p=Jzn(e,c,l);return c==="center"?a==="left"?h+=l:a==="right"&&(h-=l):a==="left"?h-=Math.max(u,d)+r:a==="right"&&(h+=Math.max(_,m)+r),{x:A5(h,0,o.width-e.width),y:A5(p,0,o.height-e.height)}}function MG(t,e,n){const o=R5(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-o.right:t.x+o.left}function jat(t){return p3([],q9(t))}function Kzn(t,e,n){return O8(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function Gat(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const Yat={beforeTitle:G9,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,o=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(o>0&&e.dataIndex<o)return n[e.dataIndex]}return""},afterTitle:G9,beforeBody:G9,beforeLabel:G9,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return D0(n)||(e+=n),e},labelColor(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:G9,afterBody:G9,beforeFooter:G9,footer:G9,afterFooter:G9};function zx(t,e,n,o){const r=t[e].call(n,o);return typeof r>"u"?Yat[e].call(n,o):r}let qat=class extends $8{static positioners=$H;constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const n=this.chart,o=this.options.setContext(this.getContext()),r=o.enabled&&n.options.animation&&o.animations,i=new eat(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(i)),i}getContext(){return this.$context||(this.$context=Kzn(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:o}=n,r=zx(o,"beforeTitle",this,e),i=zx(o,"title",this,e),s=zx(o,"afterTitle",this,e);let a=[];return a=p3(a,q9(r)),a=p3(a,q9(i)),a=p3(a,q9(s)),a}getBeforeBody(e,n){return jat(zx(n.callbacks,"beforeBody",this,e))}getBody(e,n){const{callbacks:o}=n,r=[];return ll(e,i=>{const s={before:[],lines:[],after:[]},a=Gat(o,i);p3(s.before,q9(zx(a,"beforeLabel",this,i))),p3(s.lines,zx(a,"label",this,i)),p3(s.after,q9(zx(a,"afterLabel",this,i))),r.push(s)}),r}getAfterBody(e,n){return jat(zx(n.callbacks,"afterBody",this,e))}getFooter(e,n){const{callbacks:o}=n,r=zx(o,"beforeFooter",this,e),i=zx(o,"footer",this,e),s=zx(o,"afterFooter",this,e);let a=[];return a=p3(a,q9(r)),a=p3(a,q9(i)),a=p3(a,q9(s)),a}_createItems(e){const n=this._active,o=this.chart.data,r=[],i=[],s=[];let a=[],c,l;for(c=0,l=n.length;c<l;++c)a.push(Xzn(this.chart,n[c]));return e.filter&&(a=a.filter((u,_,d)=>e.filter(u,_,d,o))),e.itemSort&&(a=a.sort((u,_)=>e.itemSort(u,_,o))),ll(a,u=>{const _=Gat(e.callbacks,u);r.push(zx(_,"labelColor",this,u)),i.push(zx(_,"labelPointStyle",this,u)),s.push(zx(_,"labelTextColor",this,u))}),this.labelColors=r,this.labelPointStyles=i,this.labelTextColors=s,this.dataPoints=a,a}update(e,n){const o=this.options.setContext(this.getContext()),r=this._active;let i,s=[];if(!r.length)this.opacity!==0&&(i={opacity:0});else{const a=$H[o.position].call(this,r,this._eventPosition);s=this._createItems(o),this.title=this.getTitle(s,o),this.beforeBody=this.getBeforeBody(s,o),this.body=this.getBody(s,o),this.afterBody=this.getAfterBody(s,o),this.footer=this.getFooter(s,o);const c=this._size=Wat(this,o),l=Object.assign({},a,c),u=Uat(this.chart,o,l),_=Xat(o,l,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,i={opacity:1,x:_.x,y:_.y,width:c.width,height:c.height,caretX:a.x,caretY:a.y}}this._tooltipItems=s,this.$context=void 0,i&&this._resolveAnimations().update(this,i),e&&o.external&&o.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,o,r){const i=this.getCaretPosition(e,o,r);n.lineTo(i.x1,i.y1),n.lineTo(i.x2,i.y2),n.lineTo(i.x3,i.y3)}getCaretPosition(e,n,o){const{xAlign:r,yAlign:i}=this,{caretSize:s,cornerRadius:a}=o,{topLeft:c,topRight:l,bottomLeft:u,bottomRight:_}=HH(a),{x:d,y:m}=e,{width:h,height:p}=n;let x,f,g,y,b,v;return i==="center"?(b=m+p/2,r==="left"?(x=d,f=x-s,y=b+s,v=b-s):(x=d+h,f=x+s,y=b-s,v=b+s),g=x):(r==="left"?f=d+Math.max(c,u)+s:r==="right"?f=d+h-Math.max(l,_)-s:f=this.caretX,i==="top"?(y=m,b=y-s,x=f-s,g=f+s):(y=m+p,b=y+s,x=f+s,g=f-s),v=y),{x1:x,x2:f,x3:g,y1:y,y2:b,y3:v}}drawTitle(e,n,o){const r=this.title,i=r.length;let s,a,c;if(i){const l=zE(o.rtl,this.x,this.width);for(e.x=MG(this,o.titleAlign,o),n.textAlign=l.textAlign(o.titleAlign),n.textBaseline="middle",s=f1(o.titleFont),a=o.titleSpacing,n.fillStyle=o.titleColor,n.font=s.string,c=0;c<i;++c)n.fillText(r[c],l.x(e.x),e.y+s.lineHeight/2),e.y+=s.lineHeight+a,c+1===i&&(e.y+=o.titleMarginBottom-a)}}_drawColorBox(e,n,o,r,i){const s=this.labelColors[o],a=this.labelPointStyles[o],{boxHeight:c,boxWidth:l}=i,u=f1(i.bodyFont),_=MG(this,"left",i),d=r.x(_),m=c<u.lineHeight?(u.lineHeight-c)/2:0,h=n.y+m;if(i.usePointStyle){const p={radius:Math.min(l,c)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},x=r.leftForLtr(d,l)+l/2,f=h+c/2;e.strokeStyle=i.multiKeyBackground,e.fillStyle=i.multiKeyBackground,Bxe(e,p,x,f),e.strokeStyle=s.borderColor,e.fillStyle=s.backgroundColor,Bxe(e,p,x,f)}else{e.lineWidth=wc(s.borderWidth)?Math.max(...Object.values(s.borderWidth)):s.borderWidth||1,e.strokeStyle=s.borderColor,e.setLineDash(s.borderDash||[]),e.lineDashOffset=s.borderDashOffset||0;const p=r.leftForLtr(d,l),x=r.leftForLtr(r.xPlus(d,1),l-2),f=HH(s.borderRadius);Object.values(f).some(g=>g!==0)?(e.beginPath(),e.fillStyle=i.multiKeyBackground,$xe(e,{x:p,y:h,w:l,h:c,radius:f}),e.fill(),e.stroke(),e.fillStyle=s.backgroundColor,e.beginPath(),$xe(e,{x,y:h+1,w:l-2,h:c-2,radius:f}),e.fill()):(e.fillStyle=i.multiKeyBackground,e.fillRect(p,h,l,c),e.strokeRect(p,h,l,c),e.fillStyle=s.backgroundColor,e.fillRect(x,h+1,l-2,c-2))}e.fillStyle=this.labelTextColors[o]}drawBody(e,n,o){const{body:r}=this,{bodySpacing:i,bodyAlign:s,displayColors:a,boxHeight:c,boxWidth:l,boxPadding:u}=o,_=f1(o.bodyFont);let d=_.lineHeight,m=0;const h=zE(o.rtl,this.x,this.width),p=function(w){n.fillText(w,h.x(e.x+m),e.y+d/2),e.y+=d+i},x=h.textAlign(s);let f,g,y,b,v,S,M;for(n.textAlign=s,n.textBaseline="middle",n.font=_.string,e.x=MG(this,x,o),n.fillStyle=o.bodyColor,ll(this.beforeBody,p),m=a&&x!=="right"?s==="center"?l/2+u:l+2+u:0,b=0,S=r.length;b<S;++b){for(f=r[b],g=this.labelTextColors[b],n.fillStyle=g,ll(f.before,p),y=f.lines,a&&y.length&&(this._drawColorBox(n,e,b,h,o),d=Math.max(_.lineHeight,c)),v=0,M=y.length;v<M;++v)p(y[v]),d=_.lineHeight;ll(f.after,p)}m=0,d=_.lineHeight,ll(this.afterBody,p),e.y-=i}drawFooter(e,n,o){const r=this.footer,i=r.length;let s,a;if(i){const c=zE(o.rtl,this.x,this.width);for(e.x=MG(this,o.footerAlign,o),e.y+=o.footerMarginTop,n.textAlign=c.textAlign(o.footerAlign),n.textBaseline="middle",s=f1(o.footerFont),n.fillStyle=o.footerColor,n.font=s.string,a=0;a<i;++a)n.fillText(r[a],c.x(e.x),e.y+s.lineHeight/2),e.y+=s.lineHeight+o.footerSpacing}}drawBackground(e,n,o,r){const{xAlign:i,yAlign:s}=this,{x:a,y:c}=e,{width:l,height:u}=o,{topLeft:_,topRight:d,bottomLeft:m,bottomRight:h}=HH(r.cornerRadius);n.fillStyle=r.backgroundColor,n.strokeStyle=r.borderColor,n.lineWidth=r.borderWidth,n.beginPath(),n.moveTo(a+_,c),s==="top"&&this.drawCaret(e,n,o,r),n.lineTo(a+l-d,c),n.quadraticCurveTo(a+l,c,a+l,c+d),s==="center"&&i==="right"&&this.drawCaret(e,n,o,r),n.lineTo(a+l,c+u-h),n.quadraticCurveTo(a+l,c+u,a+l-h,c+u),s==="bottom"&&this.drawCaret(e,n,o,r),n.lineTo(a+m,c+u),n.quadraticCurveTo(a,c+u,a,c+u-m),s==="center"&&i==="left"&&this.drawCaret(e,n,o,r),n.lineTo(a,c+_),n.quadraticCurveTo(a,c,a+_,c),n.closePath(),n.fill(),r.borderWidth>0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,o=this.$animations,r=o&&o.x,i=o&&o.y;if(r||i){const s=$H[e.position].call(this,this._active,this._eventPosition);if(!s)return;const a=this._size=Wat(this,e),c=Object.assign({},s,this._size),l=Uat(n,e,c),u=Xat(e,c,l,n);(r._to!==u.x||i._to!==u.y)&&(this.xAlign=l.xAlign,this.yAlign=l.yAlign,this.width=a.width,this.height=a.height,this.caretX=s.x,this.caretY=s.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(e){const n=this.options.setContext(this.getContext());let o=this.opacity;if(!o)return;this._updateAnimationTarget(n);const r={width:this.width,height:this.height},i={x:this.x,y:this.y};o=Math.abs(o)<.001?0:o;const s=R5(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(e.save(),e.globalAlpha=o,this.drawBackground(i,e,r,n),Gst(e,n.textDirection),i.y+=s.top,this.drawTitle(i,e,n),this.drawBody(i,e,n),this.drawFooter(i,e,n),Yst(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const o=this._active,r=e.map(({datasetIndex:a,index:c})=>{const l=this.chart.getDatasetMeta(a);if(!l)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:l.data[c],index:c}}),i=!iG(o,r),s=this._positionChanged(r,n);(i||s)&&(this._active=r,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,o=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const r=this.options,i=this._active||[],s=this._getActiveElements(e,i,n,o),a=this._positionChanged(s,e),c=n||!iG(s,i)||a;return c&&(this._active=s,(r.enabled||r.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),c}_getActiveElements(e,n,o,r){const i=this.options;if(e.type==="mouseout")return[];if(!r)return n.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const s=this.chart.getElementsAtEventForMode(e,i.mode,i,o);return i.reverse&&s.reverse(),s}_positionChanged(e,n){const{caretX:o,caretY:r,options:i}=this,s=$H[i.position].call(this,e,n);return s!==!1&&(o!==s.x||r!==s.y)}};var Qzn={id:"tooltip",_element:qat,positioners:$H,afterInit(t,e,n){n&&(t.tooltip=new qat({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Yat},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const Zzn=(t,e,n,o)=>(typeof e=="string"?(n=t.push(e)-1,o.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function eVn(t,e,n,o){const r=t.indexOf(e);if(r===-1)return Zzn(t,e,n,o);const i=t.lastIndexOf(e);return r!==i?n:r}const tVn=(t,e)=>t===null?null:A5(Math.round(t),0,e);function Jat(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class nVn extends VE{static id="category";static defaults={ticks:{callback:Jat}};constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const n=this._addedLabels;if(n.length){const o=this.getLabels();for(const{index:r,label:i}of n)o[r]===i&&o.splice(r,1);this._addedLabels=[]}super.init(e)}parse(e,n){if(D0(e))return null;const o=this.getLabels();return n=isFinite(n)&&o[n]===e?n:eVn(o,e,Wa(n,e),this._addedLabels),tVn(n,o.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:o,max:r}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(o=0),n||(r=this.getLabels().length-1)),this.min=o,this.max=r}buildTicks(){const e=this.min,n=this.max,o=this.options.offset,r=[];let i=this.getLabels();i=e===0&&n===i.length-1?i:i.slice(e,n+1),this._valueRange=Math.max(i.length-(o?0:1),1),this._startValue=this.min-(o?.5:0);for(let s=e;s<=n;s++)r.push({value:s});return r}getLabelForValue(e){return Jat.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}function oVn(t,e){const n=[],{bounds:r,step:i,min:s,max:a,precision:c,count:l,maxTicks:u,maxDigits:_,includeBounds:d}=t,m=i||1,h=u-1,{min:p,max:x}=e,f=!D0(s),g=!D0(a),y=!D0(l),b=(x-p)/(_+1);let v=Pst((x-p)/h/m)*m,S,M,w,D;if(v<1e-14&&!f&&!g)return[{value:p},{value:x}];D=Math.ceil(x/v)-Math.floor(p/v),D>h&&(v=Pst(D*v/h/m)*m),D0(c)||(S=Math.pow(10,c),v=Math.ceil(v*S)/S),r==="ticks"?(M=Math.floor(p/v)*v,w=Math.ceil(x/v)*v):(M=p,w=x),f&&g&&i&&FOn((a-s)/i,v/1e3)?(D=Math.round(Math.min((a-s)/v,u)),v=(a-s)/D,M=s,w=a):y?(M=f?s:M,w=g?a:w,D=l-1,v=(w-M)/D):(D=(w-M)/v,wH(D,Math.round(D),v/1e3)?D=Math.round(D):D=Math.ceil(D));const A=Math.max(vst(v),vst(M));S=Math.pow(10,D0(c)?A:c),M=Math.round(M*S)/S,w=Math.round(w*S)/S;let I=0;for(f&&(d&&M!==s?(n.push({value:s}),M<s&&I++,wH(Math.round((M+I*v)*S)/S,s,Kat(s,b,t))&&I++):M<s&&I++);I<D;++I){const H=Math.round((M+I*v)*S)/S;if(g&&H>a)break;n.push({value:H})}return g&&d&&w!==a?n.length&&wH(n[n.length-1].value,a,Kat(a,b,t))?n[n.length-1].value=a:n.push({value:a}):(!g||w===a)&&n.push({value:w}),n}function Kat(t,e,{horizontal:n,minRotation:o}){const r=N8(o),i=(n?Math.sin(r):Math.cos(r))||.001,s=.75*e*(""+t).length;return Math.min(e/i,s)}class rVn extends VE{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,n){return D0(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:n,maxDefined:o}=this.getUserBounds();let{min:r,max:i}=this;const s=c=>r=n?r:c,a=c=>i=o?i:c;if(e){const c=OE(r),l=OE(i);c<0&&l<0?a(0):c>0&&l>0&&s(0)}if(r===i){let c=i===0?1:Math.abs(i*.05);a(i+c),e||s(r-c)}this.min=r,this.max=i}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:n,stepSize:o}=e,r;return o?(r=Math.ceil(this.max/o)-Math.floor(this.min/o)+1,r>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${o} would result generating up to ${r} ticks. Limiting to 1000.`),r=1e3)):(r=this.computeTickLimit(),n=n||11),n&&(r=Math.min(n,r)),r}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,n=e.ticks;let o=this.getTickLimit();o=Math.max(2,o);const r={maxTicks:o,bounds:e.bounds,min:e.min,max:e.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},i=this._range||this,s=oVn(r,i);return e.bounds==="ticks"&&BOn(s,this,"value"),e.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const e=this.ticks;let n=this.min,o=this.max;if(super.configure(),this.options.offset&&e.length){const r=(o-n)/Math.max(e.length-1,1)/2;n-=r,o+=r}this._startValue=n,this._endValue=o,this._valueRange=o-n}getLabelForValue(e){return kst(e,this.chart.options.locale,this.options.ticks.format)}}class iVn extends rVn{static id="linear";static defaults={ticks:{callback:Nst.formatters.numeric}};determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=D5(e)?e:0,this.max=D5(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,o=N8(this.options.ticks.minRotation),r=(e?Math.sin(o):Math.cos(o))||.001,i=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,i.lineHeight/r))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}const TG={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Vx=Object.keys(TG);function Qat(t,e){return t-e}function Zat(t,e){if(D0(e))return null;const n=t._adapter,{parser:o,round:r,isoWeekday:i}=t._parseOpts;let s=e;return typeof o=="function"&&(s=o(s)),D5(s)||(s=typeof o=="string"?n.parse(s,o):n.parse(s)),s===null?null:(r&&(s=r==="week"&&(EH(i)||i===!0)?n.startOf(s,"isoWeek",i):n.startOf(s,r)),+s)}function ect(t,e,n,o){const r=Vx.length;for(let i=Vx.indexOf(t);i<r-1;++i){const s=TG[Vx[i]],a=s.steps?s.steps:Number.MAX_SAFE_INTEGER;if(s.common&&Math.ceil((n-e)/(a*s.size))<=o)return Vx[i]}return Vx[r-1]}function sVn(t,e,n,o,r){for(let i=Vx.length-1;i>=Vx.indexOf(n);i--){const s=Vx[i];if(TG[s].common&&t._adapter.diff(r,o,s)>=e-1)return s}return Vx[n?Vx.indexOf(n):0]}function aVn(t){for(let e=Vx.indexOf(t)+1,n=Vx.length;e<n;++e)if(TG[Vx[e]].common)return Vx[e]}function tct(t,e,n){if(!n)t[e]=!0;else if(n.length){const{lo:o,hi:r}=Nxe(n,e),i=n[o]>=e?n[o]:n[r];t[i]=!0}}function cVn(t,e,n,o){const r=t._adapter,i=+r.startOf(e[0].value,o),s=e[e.length-1].value;let a,c;for(a=i;a<=s;a=+r.add(a,1,o))c=n[a],c>=0&&(e[c].major=!0);return e}function nct(t,e,n){const o=[],r={},i=e.length;let s,a;for(s=0;s<i;++s)a=e[s],r[a]=s,o.push({value:a,major:!1});return i===0||!n?o:cVn(t,o,r,n)}class oct extends VE{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,n={}){const o=e.time||(e.time={}),r=this._adapter=new xBn._date(e.adapters.date);r.init(n),TH(o.displayFormats,r.formats()),this._parseOpts={parser:o.parser,round:o.round,isoWeekday:o.isoWeekday},super.init(e),this._normalized=n.normalized}parse(e,n){return e===void 0?null:Zat(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,n=this._adapter,o=e.time.unit||"day";let{min:r,max:i,minDefined:s,maxDefined:a}=this.getUserBounds();function c(l){!s&&!isNaN(l.min)&&(r=Math.min(r,l.min)),!a&&!isNaN(l.max)&&(i=Math.max(i,l.max))}(!s||!a)&&(c(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&c(this.getMinMax(!1))),r=D5(r)&&!isNaN(r)?r:+n.startOf(Date.now(),o),i=D5(i)&&!isNaN(i)?i:+n.endOf(Date.now(),o)+1,this.min=Math.min(r,i-1),this.max=Math.max(r+1,i)}_getLabelBounds(){const e=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;return e.length&&(n=e[0],o=e[e.length-1]),{min:n,max:o}}buildTicks(){const e=this.options,n=e.time,o=e.ticks,r=o.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&r.length&&(this.min=this._userMin||r[0],this.max=this._userMax||r[r.length-1]);const i=this.min,s=this.max,a=XOn(r,i,s);return this._unit=n.unit||(o.autoSkip?ect(n.minUnit,this.min,this.max,this._getLabelCapacity(i)):sVn(this,a.length,n.minUnit,this.min,this.max)),this._majorUnit=!o.major.enabled||this._unit==="year"?void 0:aVn(this._unit),this.initOffsets(r),e.reverse&&a.reverse(),nct(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let n=0,o=0,r,i;this.options.offset&&e.length&&(r=this.getDecimalForValue(e[0]),e.length===1?n=1-r:n=(this.getDecimalForValue(e[1])-r)/2,i=this.getDecimalForValue(e[e.length-1]),e.length===1?o=i:o=(i-this.getDecimalForValue(e[e.length-2]))/2);const s=e.length<3?.5:.25;n=A5(n,0,s),o=A5(o,0,s),this._offsets={start:n,end:o,factor:1/(n+1+o)}}_generate(){const e=this._adapter,n=this.min,o=this.max,r=this.options,i=r.time,s=i.unit||ect(i.minUnit,n,o,this._getLabelCapacity(n)),a=Wa(r.ticks.stepSize,1),c=s==="week"?i.isoWeekday:!1,l=EH(c)||c===!0,u={};let _=n,d,m;if(l&&(_=+e.startOf(_,"isoWeek",c)),_=+e.startOf(_,l?"day":s),e.diff(o,n,s)>1e5*a)throw new Error(n+" and "+o+" are too far apart with stepSize of "+a+" "+s);const h=r.ticks.source==="data"&&this.getDataTimestamps();for(d=_,m=0;d<o;d=+e.add(d,a,s),m++)tct(u,d,h);return(d===o||r.bounds==="ticks"||m===1)&&tct(u,d,h),Object.keys(u).sort(Qat).map(p=>+p)}getLabelForValue(e){const n=this._adapter,o=this.options.time;return o.tooltipFormat?n.format(e,o.tooltipFormat):n.format(e,o.displayFormats.datetime)}format(e,n){const r=this.options.time.displayFormats,i=this._unit,s=n||r[i];return this._adapter.format(e,s)}_tickFormatFunction(e,n,o,r){const i=this.options,s=i.ticks.callback;if(s)return cu(s,[e,n,o],this);const a=i.time.displayFormats,c=this._unit,l=this._majorUnit,u=c&&a[c],_=l&&a[l],d=o[n],m=l&&_&&d&&d.major;return this._adapter.format(e,r||(m?_:u))}generateTickLabels(e){let n,o,r;for(n=0,o=e.length;n<o;++n)r=e[n],r.label=this._tickFormatFunction(r.value,n,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const n=this._offsets,o=this.getDecimalForValue(e);return this.getPixelForDecimal((n.start+o)*n.factor)}getValueForPixel(e){const n=this._offsets,o=this.getDecimalForPixel(e)/n.factor-n.end;return this.min+o*(this.max-this.min)}_getLabelSize(e){const n=this.options.ticks,o=this.ctx.measureText(e).width,r=N8(this.isHorizontal()?n.maxRotation:n.minRotation),i=Math.cos(r),s=Math.sin(r),a=this._resolveTickFontOptions(0).size;return{w:o*i+a*s,h:o*s+a*i}}_getLabelCapacity(e){const n=this.options.time,o=n.displayFormats,r=o[n.unit]||o.millisecond,i=this._tickFormatFunction(e,0,nct(this,[e],this._majorUnit),r),s=this._getLabelSize(i),a=Math.floor(this.isHorizontal()?this.width/s.w:this.height/s.h)-1;return a>0?a:1}getDataTimestamps(){let e=this._cache.data||[],n,o;if(e.length)return e;const r=this.getMatchingVisibleMetas();if(this._normalized&&r.length)return this._cache.data=r[0].controller.getAllParsedValues(this);for(n=0,o=r.length;n<o;++n)e=e.concat(r[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let n,o;if(e.length)return e;const r=this.getLabels();for(n=0,o=r.length;n<o;++n)e.push(Zat(this,r[n]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return GOn(e.sort(Qat))}}function wG(t,e,n){let o=0,r=t.length-1,i,s,a,c;n?(e>=t[o].pos&&e<=t[r].pos&&({lo:o,hi:r}=H8(t,"pos",e)),{pos:i,time:a}=t[o],{pos:s,time:c}=t[r]):(e>=t[o].time&&e<=t[r].time&&({lo:o,hi:r}=H8(t,"time",e)),{time:i,pos:a}=t[o],{time:s,pos:c}=t[r]);const l=s-i;return l?a+(c-a)*(e-i)/l:a}class xao extends oct{static id="timeseries";static defaults=oct.defaults;constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(e);this._minPos=wG(n,this.min),this._tableRange=wG(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:o}=this,r=[],i=[];let s,a,c,l,u;for(s=0,a=e.length;s<a;++s)l=e[s],l>=n&&l<=o&&r.push(l);if(r.length<2)return[{time:n,pos:0},{time:o,pos:1}];for(s=0,a=r.length;s<a;++s)u=r[s+1],c=r[s-1],l=r[s],Math.round((u+c)/2)!==l&&i.push({time:l,pos:s/(a-1)});return i}_generate(){const e=this.min,n=this.max;let o=super.getDataTimestamps();return(!o.includes(e)||!o.length)&&o.splice(0,0,e),(!o.includes(n)||o.length===1)&&o.push(n),o.sort((r,i)=>r-i)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const n=this.getDataTimestamps(),o=this.getLabelTimestamps();return n.length&&o.length?e=this.normalize(n.concat(o)):e=n.length?n:o,e=this._cache.all=e,e}getDecimalForValue(e){return(wG(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,o=this.getDecimalForPixel(e)/n.factor-n.end;return wG(this._table,o*this._tableRange+this._minPos,!0)}}const rct="label";function ict(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function lVn(t,e){const n=t.options;n&&e&&Object.assign(n,e)}function sct(t,e){t.labels=e}function act(t,e,n=rct){const o=[];t.datasets=e.map(r=>{const i=t.datasets.find(s=>s[n]===r[n]);return!i||!r.data||o.includes(i)?{...r}:(o.push(i),Object.assign(i,r),i)})}function uVn(t,e=rct){const n={labels:[],datasets:[]};return sct(n,t.labels),act(n,t.datasets,e),n}function _Vn(t,e){const{height:n=150,width:o=300,redraw:r=!1,datasetIdKey:i,type:s,data:a,options:c,plugins:l=[],fallbackContent:u,updateMode:_,...d}=t,m=Y.useRef(null),h=Y.useRef(null),p=()=>{m.current&&(h.current=new CG(m.current,{type:s,data:uVn(a,i),options:c&&{...c},plugins:l}),ict(e,h.current))},x=()=>{ict(e,null),h.current&&(h.current.destroy(),h.current=null)};return Y.useEffect(()=>{!r&&h.current&&c&&lVn(h.current,c)},[r,c]),Y.useEffect(()=>{!r&&h.current&&sct(h.current.config.data,a.labels)},[r,a.labels]),Y.useEffect(()=>{!r&&h.current&&a.datasets&&act(h.current.config.data,a.datasets,i)},[r,a.datasets]),Y.useEffect(()=>{h.current&&(r?(x(),setTimeout(p)):h.current.update(_))},[r,c,a.labels,a.datasets,_]),Y.useEffect(()=>{h.current&&(x(),setTimeout(p))},[s]),Y.useEffect(()=>(p(),()=>x()),[]),G.jsx("canvas",{ref:m,role:"img",height:n,width:o,...d,children:u})}const dVn=Y.forwardRef(_Vn);function hVn(t,e){return CG.register(e),Y.forwardRef((n,o)=>G.jsx(dVn,{...n,ref:o,type:t}))}const mVn=hVn("line",fBn);var cct=({editEvents:t,schematic_component_id:e})=>{const n=t.filter(i=>"schematic_component_id"in i&&i.schematic_component_id===e).filter(i=>"edit_event_type"in i&&i.edit_event_type==="edit_schematic_component_location"),o=n.reduce((i,s)=>i+s.new_center.x-s.original_center.x,0),r=n.reduce((i,s)=>i+s.new_center.y-s.original_center.y,0);return{x:o,y:r}},pVn=({svgDivRef:t,realToSvgProjection:e,svgToScreenProjection:n,activeEditEvent:o,editEvents:r})=>{const i=Y.useRef(null);Y.useEffect(()=>{const s=t.current;if(!s)return;const a=new MutationObserver(l=>{const u=s.innerHTML;u!==i.current&&(i.current=u,c())}),c=()=>{const l=new Set;for(const _ of r)"edit_event_type"in _&&_.edit_event_type==="edit_schematic_component_location"&&l.add(_.schematic_component_id);o&&l.add(o.schematic_component_id);const u=s.querySelectorAll('[data-circuit-json-type="schematic_component"]');for(const _ of Array.from(u)){const d=_.getAttribute("data-schematic-component-id"),m=cct({editEvents:[...r,...o?[o]:[]],schematic_component_id:d}),h={x:m.x*e.a,y:m.y*e.d},p=_.style;p.transform=`translate(${h.x}px, ${h.y}px)`,o?.schematic_component_id===d?(p.outline="solid 2px rgba(255,0,0,0.5)",p.outlineOffset="5px"):p.outline&&(p.outline="")}};return a.observe(s,{childList:!0,subtree:!1,characterData:!1}),c(),()=>{a.disconnect()}},[t,r,o])},fVn=({svgDivRef:t,circuitJson:e,activeEditEvent:n,editEvents:o})=>{Y.useRef(null),Y.useEffect(()=>{const r=t.current;if(!r)return;const i=()=>{const a=r.querySelectorAll('[data-circuit-json-type="schematic_trace"] path');for(const c of Array.from(a))c.setAttribute("stroke-dasharray","0"),c.style.animation="";for(const c of[...o,...n?[n]:[]])if("schematic_component_id"in c&&c.edit_event_type==="edit_schematic_component_location"){const l=Gp(e).schematic_component.get(c.schematic_component_id);if(!l)return;const u=Gp(e).source_port.list({source_component_id:l.source_component_id}),_=new Set(u.map(p=>p.source_port_id)),d=Gp(e).source_trace.list().filter(p=>p.connected_source_port_ids?.some(x=>_.has(x))),m=new Set(d.map(p=>p.source_trace_id));Gp(e).schematic_trace.list().filter(p=>m.has(p.source_trace_id)).forEach(p=>{const x=r.querySelectorAll(`[data-schematic-trace-id="${p.schematic_trace_id}"] path`);for(const f of Array.from(x))if(!f.getAttribute("class")?.includes("invisible")&&(f.setAttribute("stroke-dasharray","20,20"),f.style.animation="dash-animation 350ms linear infinite, pulse-animation 900ms linear infinite",!r.querySelector("style#dash-animation"))){const g=document.createElement("style");g.id="dash-animation",g.textContent=`
|
|
5371
|
+
`):t}function Xzn(t,e){const{element:n,datasetIndex:o,index:r}=e,i=t.getDatasetMeta(o).controller,{label:s,value:a}=i.getLabelAndValue(r);return{chart:t,label:s,parsed:i.getParsed(r),raw:t.data.datasets[o].data[r],formattedValue:a,dataset:i.getDataset(),dataIndex:r,datasetIndex:o,element:n}}function Wat(t,e){const n=t.chart.ctx,{body:o,footer:r,title:i}=t,{boxWidth:s,boxHeight:a}=e,c=f1(e.bodyFont),l=f1(e.titleFont),u=f1(e.footerFont),_=i.length,d=r.length,m=o.length,h=R5(e.padding);let p=h.height,x=0,f=o.reduce((b,v)=>b+v.before.length+v.lines.length+v.after.length,0);if(f+=t.beforeBody.length+t.afterBody.length,_&&(p+=_*l.lineHeight+(_-1)*e.titleSpacing+e.titleMarginBottom),f){const b=e.displayColors?Math.max(a,c.lineHeight):c.lineHeight;p+=m*b+(f-m)*c.lineHeight+(f-1)*e.bodySpacing}d&&(p+=e.footerMarginTop+d*u.lineHeight+(d-1)*e.footerSpacing);let g=0;const y=function(b){x=Math.max(x,n.measureText(b).width+g)};return n.save(),n.font=l.string,ll(t.title,y),n.font=c.string,ll(t.beforeBody.concat(t.afterBody),y),g=e.displayColors?s+2+e.boxPadding:0,ll(o,b=>{ll(b.before,y),ll(b.lines,y),ll(b.after,y)}),g=0,n.font=u.string,ll(t.footer,y),n.restore(),x+=h.width,{width:x,height:p}}function jzn(t,e){const{y:n,height:o}=e;return n<o/2?"top":n>t.height-o/2?"bottom":"center"}function Gzn(t,e,n,o){const{x:r,width:i}=o,s=n.caretSize+n.caretPadding;if(t==="left"&&r+i+s>e.width||t==="right"&&r-i-s<0)return!0}function Yzn(t,e,n,o){const{x:r,width:i}=n,{width:s,chartArea:{left:a,right:c}}=t;let l="center";return o==="center"?l=r<=(a+c)/2?"left":"right":r<=i/2?l="left":r>=s-i/2&&(l="right"),Gzn(l,t,e,n)&&(l="center"),l}function Uat(t,e,n){const o=n.yAlign||e.yAlign||jzn(t,n);return{xAlign:n.xAlign||e.xAlign||Yzn(t,e,n,o),yAlign:o}}function qzn(t,e){let{x:n,width:o}=t;return e==="right"?n-=o:e==="center"&&(n-=o/2),n}function Jzn(t,e,n){let{y:o,height:r}=t;return e==="top"?o+=n:e==="bottom"?o-=r+n:o-=r/2,o}function Xat(t,e,n,o){const{caretSize:r,caretPadding:i,cornerRadius:s}=t,{xAlign:a,yAlign:c}=n,l=r+i,{topLeft:u,topRight:_,bottomLeft:d,bottomRight:m}=HH(s);let h=qzn(e,a);const p=Jzn(e,c,l);return c==="center"?a==="left"?h+=l:a==="right"&&(h-=l):a==="left"?h-=Math.max(u,d)+r:a==="right"&&(h+=Math.max(_,m)+r),{x:A5(h,0,o.width-e.width),y:A5(p,0,o.height-e.height)}}function MG(t,e,n){const o=R5(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-o.right:t.x+o.left}function jat(t){return p3([],q9(t))}function Kzn(t,e,n){return O8(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function Gat(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const Yat={beforeTitle:G9,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,o=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(o>0&&e.dataIndex<o)return n[e.dataIndex]}return""},afterTitle:G9,beforeBody:G9,beforeLabel:G9,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return D0(n)||(e+=n),e},labelColor(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:G9,afterBody:G9,beforeFooter:G9,footer:G9,afterFooter:G9};function zx(t,e,n,o){const r=t[e].call(n,o);return typeof r>"u"?Yat[e].call(n,o):r}let qat=class extends $8{static positioners=$H;constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const n=this.chart,o=this.options.setContext(this.getContext()),r=o.enabled&&n.options.animation&&o.animations,i=new eat(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(i)),i}getContext(){return this.$context||(this.$context=Kzn(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:o}=n,r=zx(o,"beforeTitle",this,e),i=zx(o,"title",this,e),s=zx(o,"afterTitle",this,e);let a=[];return a=p3(a,q9(r)),a=p3(a,q9(i)),a=p3(a,q9(s)),a}getBeforeBody(e,n){return jat(zx(n.callbacks,"beforeBody",this,e))}getBody(e,n){const{callbacks:o}=n,r=[];return ll(e,i=>{const s={before:[],lines:[],after:[]},a=Gat(o,i);p3(s.before,q9(zx(a,"beforeLabel",this,i))),p3(s.lines,zx(a,"label",this,i)),p3(s.after,q9(zx(a,"afterLabel",this,i))),r.push(s)}),r}getAfterBody(e,n){return jat(zx(n.callbacks,"afterBody",this,e))}getFooter(e,n){const{callbacks:o}=n,r=zx(o,"beforeFooter",this,e),i=zx(o,"footer",this,e),s=zx(o,"afterFooter",this,e);let a=[];return a=p3(a,q9(r)),a=p3(a,q9(i)),a=p3(a,q9(s)),a}_createItems(e){const n=this._active,o=this.chart.data,r=[],i=[],s=[];let a=[],c,l;for(c=0,l=n.length;c<l;++c)a.push(Xzn(this.chart,n[c]));return e.filter&&(a=a.filter((u,_,d)=>e.filter(u,_,d,o))),e.itemSort&&(a=a.sort((u,_)=>e.itemSort(u,_,o))),ll(a,u=>{const _=Gat(e.callbacks,u);r.push(zx(_,"labelColor",this,u)),i.push(zx(_,"labelPointStyle",this,u)),s.push(zx(_,"labelTextColor",this,u))}),this.labelColors=r,this.labelPointStyles=i,this.labelTextColors=s,this.dataPoints=a,a}update(e,n){const o=this.options.setContext(this.getContext()),r=this._active;let i,s=[];if(!r.length)this.opacity!==0&&(i={opacity:0});else{const a=$H[o.position].call(this,r,this._eventPosition);s=this._createItems(o),this.title=this.getTitle(s,o),this.beforeBody=this.getBeforeBody(s,o),this.body=this.getBody(s,o),this.afterBody=this.getAfterBody(s,o),this.footer=this.getFooter(s,o);const c=this._size=Wat(this,o),l=Object.assign({},a,c),u=Uat(this.chart,o,l),_=Xat(o,l,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,i={opacity:1,x:_.x,y:_.y,width:c.width,height:c.height,caretX:a.x,caretY:a.y}}this._tooltipItems=s,this.$context=void 0,i&&this._resolveAnimations().update(this,i),e&&o.external&&o.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,o,r){const i=this.getCaretPosition(e,o,r);n.lineTo(i.x1,i.y1),n.lineTo(i.x2,i.y2),n.lineTo(i.x3,i.y3)}getCaretPosition(e,n,o){const{xAlign:r,yAlign:i}=this,{caretSize:s,cornerRadius:a}=o,{topLeft:c,topRight:l,bottomLeft:u,bottomRight:_}=HH(a),{x:d,y:m}=e,{width:h,height:p}=n;let x,f,g,y,b,v;return i==="center"?(b=m+p/2,r==="left"?(x=d,f=x-s,y=b+s,v=b-s):(x=d+h,f=x+s,y=b-s,v=b+s),g=x):(r==="left"?f=d+Math.max(c,u)+s:r==="right"?f=d+h-Math.max(l,_)-s:f=this.caretX,i==="top"?(y=m,b=y-s,x=f-s,g=f+s):(y=m+p,b=y+s,x=f+s,g=f-s),v=y),{x1:x,x2:f,x3:g,y1:y,y2:b,y3:v}}drawTitle(e,n,o){const r=this.title,i=r.length;let s,a,c;if(i){const l=zE(o.rtl,this.x,this.width);for(e.x=MG(this,o.titleAlign,o),n.textAlign=l.textAlign(o.titleAlign),n.textBaseline="middle",s=f1(o.titleFont),a=o.titleSpacing,n.fillStyle=o.titleColor,n.font=s.string,c=0;c<i;++c)n.fillText(r[c],l.x(e.x),e.y+s.lineHeight/2),e.y+=s.lineHeight+a,c+1===i&&(e.y+=o.titleMarginBottom-a)}}_drawColorBox(e,n,o,r,i){const s=this.labelColors[o],a=this.labelPointStyles[o],{boxHeight:c,boxWidth:l}=i,u=f1(i.bodyFont),_=MG(this,"left",i),d=r.x(_),m=c<u.lineHeight?(u.lineHeight-c)/2:0,h=n.y+m;if(i.usePointStyle){const p={radius:Math.min(l,c)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},x=r.leftForLtr(d,l)+l/2,f=h+c/2;e.strokeStyle=i.multiKeyBackground,e.fillStyle=i.multiKeyBackground,Bxe(e,p,x,f),e.strokeStyle=s.borderColor,e.fillStyle=s.backgroundColor,Bxe(e,p,x,f)}else{e.lineWidth=wc(s.borderWidth)?Math.max(...Object.values(s.borderWidth)):s.borderWidth||1,e.strokeStyle=s.borderColor,e.setLineDash(s.borderDash||[]),e.lineDashOffset=s.borderDashOffset||0;const p=r.leftForLtr(d,l),x=r.leftForLtr(r.xPlus(d,1),l-2),f=HH(s.borderRadius);Object.values(f).some(g=>g!==0)?(e.beginPath(),e.fillStyle=i.multiKeyBackground,$xe(e,{x:p,y:h,w:l,h:c,radius:f}),e.fill(),e.stroke(),e.fillStyle=s.backgroundColor,e.beginPath(),$xe(e,{x,y:h+1,w:l-2,h:c-2,radius:f}),e.fill()):(e.fillStyle=i.multiKeyBackground,e.fillRect(p,h,l,c),e.strokeRect(p,h,l,c),e.fillStyle=s.backgroundColor,e.fillRect(x,h+1,l-2,c-2))}e.fillStyle=this.labelTextColors[o]}drawBody(e,n,o){const{body:r}=this,{bodySpacing:i,bodyAlign:s,displayColors:a,boxHeight:c,boxWidth:l,boxPadding:u}=o,_=f1(o.bodyFont);let d=_.lineHeight,m=0;const h=zE(o.rtl,this.x,this.width),p=function(w){n.fillText(w,h.x(e.x+m),e.y+d/2),e.y+=d+i},x=h.textAlign(s);let f,g,y,b,v,S,M;for(n.textAlign=s,n.textBaseline="middle",n.font=_.string,e.x=MG(this,x,o),n.fillStyle=o.bodyColor,ll(this.beforeBody,p),m=a&&x!=="right"?s==="center"?l/2+u:l+2+u:0,b=0,S=r.length;b<S;++b){for(f=r[b],g=this.labelTextColors[b],n.fillStyle=g,ll(f.before,p),y=f.lines,a&&y.length&&(this._drawColorBox(n,e,b,h,o),d=Math.max(_.lineHeight,c)),v=0,M=y.length;v<M;++v)p(y[v]),d=_.lineHeight;ll(f.after,p)}m=0,d=_.lineHeight,ll(this.afterBody,p),e.y-=i}drawFooter(e,n,o){const r=this.footer,i=r.length;let s,a;if(i){const c=zE(o.rtl,this.x,this.width);for(e.x=MG(this,o.footerAlign,o),e.y+=o.footerMarginTop,n.textAlign=c.textAlign(o.footerAlign),n.textBaseline="middle",s=f1(o.footerFont),n.fillStyle=o.footerColor,n.font=s.string,a=0;a<i;++a)n.fillText(r[a],c.x(e.x),e.y+s.lineHeight/2),e.y+=s.lineHeight+o.footerSpacing}}drawBackground(e,n,o,r){const{xAlign:i,yAlign:s}=this,{x:a,y:c}=e,{width:l,height:u}=o,{topLeft:_,topRight:d,bottomLeft:m,bottomRight:h}=HH(r.cornerRadius);n.fillStyle=r.backgroundColor,n.strokeStyle=r.borderColor,n.lineWidth=r.borderWidth,n.beginPath(),n.moveTo(a+_,c),s==="top"&&this.drawCaret(e,n,o,r),n.lineTo(a+l-d,c),n.quadraticCurveTo(a+l,c,a+l,c+d),s==="center"&&i==="right"&&this.drawCaret(e,n,o,r),n.lineTo(a+l,c+u-h),n.quadraticCurveTo(a+l,c+u,a+l-h,c+u),s==="bottom"&&this.drawCaret(e,n,o,r),n.lineTo(a+m,c+u),n.quadraticCurveTo(a,c+u,a,c+u-m),s==="center"&&i==="left"&&this.drawCaret(e,n,o,r),n.lineTo(a,c+_),n.quadraticCurveTo(a,c,a+_,c),n.closePath(),n.fill(),r.borderWidth>0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,o=this.$animations,r=o&&o.x,i=o&&o.y;if(r||i){const s=$H[e.position].call(this,this._active,this._eventPosition);if(!s)return;const a=this._size=Wat(this,e),c=Object.assign({},s,this._size),l=Uat(n,e,c),u=Xat(e,c,l,n);(r._to!==u.x||i._to!==u.y)&&(this.xAlign=l.xAlign,this.yAlign=l.yAlign,this.width=a.width,this.height=a.height,this.caretX=s.x,this.caretY=s.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(e){const n=this.options.setContext(this.getContext());let o=this.opacity;if(!o)return;this._updateAnimationTarget(n);const r={width:this.width,height:this.height},i={x:this.x,y:this.y};o=Math.abs(o)<.001?0:o;const s=R5(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(e.save(),e.globalAlpha=o,this.drawBackground(i,e,r,n),Gst(e,n.textDirection),i.y+=s.top,this.drawTitle(i,e,n),this.drawBody(i,e,n),this.drawFooter(i,e,n),Yst(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const o=this._active,r=e.map(({datasetIndex:a,index:c})=>{const l=this.chart.getDatasetMeta(a);if(!l)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:l.data[c],index:c}}),i=!iG(o,r),s=this._positionChanged(r,n);(i||s)&&(this._active=r,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,o=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const r=this.options,i=this._active||[],s=this._getActiveElements(e,i,n,o),a=this._positionChanged(s,e),c=n||!iG(s,i)||a;return c&&(this._active=s,(r.enabled||r.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),c}_getActiveElements(e,n,o,r){const i=this.options;if(e.type==="mouseout")return[];if(!r)return n.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const s=this.chart.getElementsAtEventForMode(e,i.mode,i,o);return i.reverse&&s.reverse(),s}_positionChanged(e,n){const{caretX:o,caretY:r,options:i}=this,s=$H[i.position].call(this,e,n);return s!==!1&&(o!==s.x||r!==s.y)}};var Qzn={id:"tooltip",_element:qat,positioners:$H,afterInit(t,e,n){n&&(t.tooltip=new qat({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Yat},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const Zzn=(t,e,n,o)=>(typeof e=="string"?(n=t.push(e)-1,o.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function eVn(t,e,n,o){const r=t.indexOf(e);if(r===-1)return Zzn(t,e,n,o);const i=t.lastIndexOf(e);return r!==i?n:r}const tVn=(t,e)=>t===null?null:A5(Math.round(t),0,e);function Jat(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class nVn extends VE{static id="category";static defaults={ticks:{callback:Jat}};constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const n=this._addedLabels;if(n.length){const o=this.getLabels();for(const{index:r,label:i}of n)o[r]===i&&o.splice(r,1);this._addedLabels=[]}super.init(e)}parse(e,n){if(D0(e))return null;const o=this.getLabels();return n=isFinite(n)&&o[n]===e?n:eVn(o,e,Wa(n,e),this._addedLabels),tVn(n,o.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:o,max:r}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(o=0),n||(r=this.getLabels().length-1)),this.min=o,this.max=r}buildTicks(){const e=this.min,n=this.max,o=this.options.offset,r=[];let i=this.getLabels();i=e===0&&n===i.length-1?i:i.slice(e,n+1),this._valueRange=Math.max(i.length-(o?0:1),1),this._startValue=this.min-(o?.5:0);for(let s=e;s<=n;s++)r.push({value:s});return r}getLabelForValue(e){return Jat.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}function oVn(t,e){const n=[],{bounds:r,step:i,min:s,max:a,precision:c,count:l,maxTicks:u,maxDigits:_,includeBounds:d}=t,m=i||1,h=u-1,{min:p,max:x}=e,f=!D0(s),g=!D0(a),y=!D0(l),b=(x-p)/(_+1);let v=Pst((x-p)/h/m)*m,S,M,w,D;if(v<1e-14&&!f&&!g)return[{value:p},{value:x}];D=Math.ceil(x/v)-Math.floor(p/v),D>h&&(v=Pst(D*v/h/m)*m),D0(c)||(S=Math.pow(10,c),v=Math.ceil(v*S)/S),r==="ticks"?(M=Math.floor(p/v)*v,w=Math.ceil(x/v)*v):(M=p,w=x),f&&g&&i&&FOn((a-s)/i,v/1e3)?(D=Math.round(Math.min((a-s)/v,u)),v=(a-s)/D,M=s,w=a):y?(M=f?s:M,w=g?a:w,D=l-1,v=(w-M)/D):(D=(w-M)/v,wH(D,Math.round(D),v/1e3)?D=Math.round(D):D=Math.ceil(D));const A=Math.max(vst(v),vst(M));S=Math.pow(10,D0(c)?A:c),M=Math.round(M*S)/S,w=Math.round(w*S)/S;let I=0;for(f&&(d&&M!==s?(n.push({value:s}),M<s&&I++,wH(Math.round((M+I*v)*S)/S,s,Kat(s,b,t))&&I++):M<s&&I++);I<D;++I){const H=Math.round((M+I*v)*S)/S;if(g&&H>a)break;n.push({value:H})}return g&&d&&w!==a?n.length&&wH(n[n.length-1].value,a,Kat(a,b,t))?n[n.length-1].value=a:n.push({value:a}):(!g||w===a)&&n.push({value:w}),n}function Kat(t,e,{horizontal:n,minRotation:o}){const r=N8(o),i=(n?Math.sin(r):Math.cos(r))||.001,s=.75*e*(""+t).length;return Math.min(e/i,s)}class rVn extends VE{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,n){return D0(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:n,maxDefined:o}=this.getUserBounds();let{min:r,max:i}=this;const s=c=>r=n?r:c,a=c=>i=o?i:c;if(e){const c=OE(r),l=OE(i);c<0&&l<0?a(0):c>0&&l>0&&s(0)}if(r===i){let c=i===0?1:Math.abs(i*.05);a(i+c),e||s(r-c)}this.min=r,this.max=i}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:n,stepSize:o}=e,r;return o?(r=Math.ceil(this.max/o)-Math.floor(this.min/o)+1,r>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${o} would result generating up to ${r} ticks. Limiting to 1000.`),r=1e3)):(r=this.computeTickLimit(),n=n||11),n&&(r=Math.min(n,r)),r}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,n=e.ticks;let o=this.getTickLimit();o=Math.max(2,o);const r={maxTicks:o,bounds:e.bounds,min:e.min,max:e.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},i=this._range||this,s=oVn(r,i);return e.bounds==="ticks"&&BOn(s,this,"value"),e.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const e=this.ticks;let n=this.min,o=this.max;if(super.configure(),this.options.offset&&e.length){const r=(o-n)/Math.max(e.length-1,1)/2;n-=r,o+=r}this._startValue=n,this._endValue=o,this._valueRange=o-n}getLabelForValue(e){return kst(e,this.chart.options.locale,this.options.ticks.format)}}class iVn extends rVn{static id="linear";static defaults={ticks:{callback:Nst.formatters.numeric}};determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=D5(e)?e:0,this.max=D5(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,o=N8(this.options.ticks.minRotation),r=(e?Math.sin(o):Math.cos(o))||.001,i=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,i.lineHeight/r))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}const TG={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Vx=Object.keys(TG);function Qat(t,e){return t-e}function Zat(t,e){if(D0(e))return null;const n=t._adapter,{parser:o,round:r,isoWeekday:i}=t._parseOpts;let s=e;return typeof o=="function"&&(s=o(s)),D5(s)||(s=typeof o=="string"?n.parse(s,o):n.parse(s)),s===null?null:(r&&(s=r==="week"&&(EH(i)||i===!0)?n.startOf(s,"isoWeek",i):n.startOf(s,r)),+s)}function ect(t,e,n,o){const r=Vx.length;for(let i=Vx.indexOf(t);i<r-1;++i){const s=TG[Vx[i]],a=s.steps?s.steps:Number.MAX_SAFE_INTEGER;if(s.common&&Math.ceil((n-e)/(a*s.size))<=o)return Vx[i]}return Vx[r-1]}function sVn(t,e,n,o,r){for(let i=Vx.length-1;i>=Vx.indexOf(n);i--){const s=Vx[i];if(TG[s].common&&t._adapter.diff(r,o,s)>=e-1)return s}return Vx[n?Vx.indexOf(n):0]}function aVn(t){for(let e=Vx.indexOf(t)+1,n=Vx.length;e<n;++e)if(TG[Vx[e]].common)return Vx[e]}function tct(t,e,n){if(!n)t[e]=!0;else if(n.length){const{lo:o,hi:r}=Nxe(n,e),i=n[o]>=e?n[o]:n[r];t[i]=!0}}function cVn(t,e,n,o){const r=t._adapter,i=+r.startOf(e[0].value,o),s=e[e.length-1].value;let a,c;for(a=i;a<=s;a=+r.add(a,1,o))c=n[a],c>=0&&(e[c].major=!0);return e}function nct(t,e,n){const o=[],r={},i=e.length;let s,a;for(s=0;s<i;++s)a=e[s],r[a]=s,o.push({value:a,major:!1});return i===0||!n?o:cVn(t,o,r,n)}class oct extends VE{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,n={}){const o=e.time||(e.time={}),r=this._adapter=new xBn._date(e.adapters.date);r.init(n),TH(o.displayFormats,r.formats()),this._parseOpts={parser:o.parser,round:o.round,isoWeekday:o.isoWeekday},super.init(e),this._normalized=n.normalized}parse(e,n){return e===void 0?null:Zat(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,n=this._adapter,o=e.time.unit||"day";let{min:r,max:i,minDefined:s,maxDefined:a}=this.getUserBounds();function c(l){!s&&!isNaN(l.min)&&(r=Math.min(r,l.min)),!a&&!isNaN(l.max)&&(i=Math.max(i,l.max))}(!s||!a)&&(c(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&c(this.getMinMax(!1))),r=D5(r)&&!isNaN(r)?r:+n.startOf(Date.now(),o),i=D5(i)&&!isNaN(i)?i:+n.endOf(Date.now(),o)+1,this.min=Math.min(r,i-1),this.max=Math.max(r+1,i)}_getLabelBounds(){const e=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;return e.length&&(n=e[0],o=e[e.length-1]),{min:n,max:o}}buildTicks(){const e=this.options,n=e.time,o=e.ticks,r=o.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&r.length&&(this.min=this._userMin||r[0],this.max=this._userMax||r[r.length-1]);const i=this.min,s=this.max,a=XOn(r,i,s);return this._unit=n.unit||(o.autoSkip?ect(n.minUnit,this.min,this.max,this._getLabelCapacity(i)):sVn(this,a.length,n.minUnit,this.min,this.max)),this._majorUnit=!o.major.enabled||this._unit==="year"?void 0:aVn(this._unit),this.initOffsets(r),e.reverse&&a.reverse(),nct(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let n=0,o=0,r,i;this.options.offset&&e.length&&(r=this.getDecimalForValue(e[0]),e.length===1?n=1-r:n=(this.getDecimalForValue(e[1])-r)/2,i=this.getDecimalForValue(e[e.length-1]),e.length===1?o=i:o=(i-this.getDecimalForValue(e[e.length-2]))/2);const s=e.length<3?.5:.25;n=A5(n,0,s),o=A5(o,0,s),this._offsets={start:n,end:o,factor:1/(n+1+o)}}_generate(){const e=this._adapter,n=this.min,o=this.max,r=this.options,i=r.time,s=i.unit||ect(i.minUnit,n,o,this._getLabelCapacity(n)),a=Wa(r.ticks.stepSize,1),c=s==="week"?i.isoWeekday:!1,l=EH(c)||c===!0,u={};let _=n,d,m;if(l&&(_=+e.startOf(_,"isoWeek",c)),_=+e.startOf(_,l?"day":s),e.diff(o,n,s)>1e5*a)throw new Error(n+" and "+o+" are too far apart with stepSize of "+a+" "+s);const h=r.ticks.source==="data"&&this.getDataTimestamps();for(d=_,m=0;d<o;d=+e.add(d,a,s),m++)tct(u,d,h);return(d===o||r.bounds==="ticks"||m===1)&&tct(u,d,h),Object.keys(u).sort(Qat).map(p=>+p)}getLabelForValue(e){const n=this._adapter,o=this.options.time;return o.tooltipFormat?n.format(e,o.tooltipFormat):n.format(e,o.displayFormats.datetime)}format(e,n){const r=this.options.time.displayFormats,i=this._unit,s=n||r[i];return this._adapter.format(e,s)}_tickFormatFunction(e,n,o,r){const i=this.options,s=i.ticks.callback;if(s)return cu(s,[e,n,o],this);const a=i.time.displayFormats,c=this._unit,l=this._majorUnit,u=c&&a[c],_=l&&a[l],d=o[n],m=l&&_&&d&&d.major;return this._adapter.format(e,r||(m?_:u))}generateTickLabels(e){let n,o,r;for(n=0,o=e.length;n<o;++n)r=e[n],r.label=this._tickFormatFunction(r.value,n,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const n=this._offsets,o=this.getDecimalForValue(e);return this.getPixelForDecimal((n.start+o)*n.factor)}getValueForPixel(e){const n=this._offsets,o=this.getDecimalForPixel(e)/n.factor-n.end;return this.min+o*(this.max-this.min)}_getLabelSize(e){const n=this.options.ticks,o=this.ctx.measureText(e).width,r=N8(this.isHorizontal()?n.maxRotation:n.minRotation),i=Math.cos(r),s=Math.sin(r),a=this._resolveTickFontOptions(0).size;return{w:o*i+a*s,h:o*s+a*i}}_getLabelCapacity(e){const n=this.options.time,o=n.displayFormats,r=o[n.unit]||o.millisecond,i=this._tickFormatFunction(e,0,nct(this,[e],this._majorUnit),r),s=this._getLabelSize(i),a=Math.floor(this.isHorizontal()?this.width/s.w:this.height/s.h)-1;return a>0?a:1}getDataTimestamps(){let e=this._cache.data||[],n,o;if(e.length)return e;const r=this.getMatchingVisibleMetas();if(this._normalized&&r.length)return this._cache.data=r[0].controller.getAllParsedValues(this);for(n=0,o=r.length;n<o;++n)e=e.concat(r[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let n,o;if(e.length)return e;const r=this.getLabels();for(n=0,o=r.length;n<o;++n)e.push(Zat(this,r[n]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return GOn(e.sort(Qat))}}function wG(t,e,n){let o=0,r=t.length-1,i,s,a,c;n?(e>=t[o].pos&&e<=t[r].pos&&({lo:o,hi:r}=H8(t,"pos",e)),{pos:i,time:a}=t[o],{pos:s,time:c}=t[r]):(e>=t[o].time&&e<=t[r].time&&({lo:o,hi:r}=H8(t,"time",e)),{time:i,pos:a}=t[o],{time:s,pos:c}=t[r]);const l=s-i;return l?a+(c-a)*(e-i)/l:a}class gao extends oct{static id="timeseries";static defaults=oct.defaults;constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(e);this._minPos=wG(n,this.min),this._tableRange=wG(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:o}=this,r=[],i=[];let s,a,c,l,u;for(s=0,a=e.length;s<a;++s)l=e[s],l>=n&&l<=o&&r.push(l);if(r.length<2)return[{time:n,pos:0},{time:o,pos:1}];for(s=0,a=r.length;s<a;++s)u=r[s+1],c=r[s-1],l=r[s],Math.round((u+c)/2)!==l&&i.push({time:l,pos:s/(a-1)});return i}_generate(){const e=this.min,n=this.max;let o=super.getDataTimestamps();return(!o.includes(e)||!o.length)&&o.splice(0,0,e),(!o.includes(n)||o.length===1)&&o.push(n),o.sort((r,i)=>r-i)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const n=this.getDataTimestamps(),o=this.getLabelTimestamps();return n.length&&o.length?e=this.normalize(n.concat(o)):e=n.length?n:o,e=this._cache.all=e,e}getDecimalForValue(e){return(wG(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,o=this.getDecimalForPixel(e)/n.factor-n.end;return wG(this._table,o*this._tableRange+this._minPos,!0)}}const rct="label";function ict(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function lVn(t,e){const n=t.options;n&&e&&Object.assign(n,e)}function sct(t,e){t.labels=e}function act(t,e,n=rct){const o=[];t.datasets=e.map(r=>{const i=t.datasets.find(s=>s[n]===r[n]);return!i||!r.data||o.includes(i)?{...r}:(o.push(i),Object.assign(i,r),i)})}function uVn(t,e=rct){const n={labels:[],datasets:[]};return sct(n,t.labels),act(n,t.datasets,e),n}function _Vn(t,e){const{height:n=150,width:o=300,redraw:r=!1,datasetIdKey:i,type:s,data:a,options:c,plugins:l=[],fallbackContent:u,updateMode:_,...d}=t,m=Y.useRef(null),h=Y.useRef(null),p=()=>{m.current&&(h.current=new CG(m.current,{type:s,data:uVn(a,i),options:c&&{...c},plugins:l}),ict(e,h.current))},x=()=>{ict(e,null),h.current&&(h.current.destroy(),h.current=null)};return Y.useEffect(()=>{!r&&h.current&&c&&lVn(h.current,c)},[r,c]),Y.useEffect(()=>{!r&&h.current&&sct(h.current.config.data,a.labels)},[r,a.labels]),Y.useEffect(()=>{!r&&h.current&&a.datasets&&act(h.current.config.data,a.datasets,i)},[r,a.datasets]),Y.useEffect(()=>{h.current&&(r?(x(),setTimeout(p)):h.current.update(_))},[r,c,a.labels,a.datasets,_]),Y.useEffect(()=>{h.current&&(x(),setTimeout(p))},[s]),Y.useEffect(()=>(p(),()=>x()),[]),G.jsx("canvas",{ref:m,role:"img",height:n,width:o,...d,children:u})}const dVn=Y.forwardRef(_Vn);function hVn(t,e){return CG.register(e),Y.forwardRef((n,o)=>G.jsx(dVn,{...n,ref:o,type:t}))}const mVn=hVn("line",fBn);var cct=({editEvents:t,schematic_component_id:e})=>{const n=t.filter(i=>"schematic_component_id"in i&&i.schematic_component_id===e).filter(i=>"edit_event_type"in i&&i.edit_event_type==="edit_schematic_component_location"),o=n.reduce((i,s)=>i+s.new_center.x-s.original_center.x,0),r=n.reduce((i,s)=>i+s.new_center.y-s.original_center.y,0);return{x:o,y:r}},pVn=({svgDivRef:t,realToSvgProjection:e,svgToScreenProjection:n,activeEditEvent:o,editEvents:r})=>{const i=Y.useRef(null);Y.useEffect(()=>{const s=t.current;if(!s)return;const a=new MutationObserver(l=>{const u=s.innerHTML;u!==i.current&&(i.current=u,c())}),c=()=>{const l=new Set;for(const _ of r)"edit_event_type"in _&&_.edit_event_type==="edit_schematic_component_location"&&l.add(_.schematic_component_id);o&&l.add(o.schematic_component_id);const u=s.querySelectorAll('[data-circuit-json-type="schematic_component"]');for(const _ of Array.from(u)){const d=_.getAttribute("data-schematic-component-id"),m=cct({editEvents:[...r,...o?[o]:[]],schematic_component_id:d}),h={x:m.x*e.a,y:m.y*e.d},p=_.style;p.transform=`translate(${h.x}px, ${h.y}px)`,o?.schematic_component_id===d?(p.outline="solid 2px rgba(255,0,0,0.5)",p.outlineOffset="5px"):p.outline&&(p.outline="")}};return a.observe(s,{childList:!0,subtree:!1,characterData:!1}),c(),()=>{a.disconnect()}},[t,r,o])},fVn=({svgDivRef:t,circuitJson:e,activeEditEvent:n,editEvents:o})=>{Y.useRef(null),Y.useEffect(()=>{const r=t.current;if(!r)return;const i=()=>{const a=r.querySelectorAll('[data-circuit-json-type="schematic_trace"] path');for(const c of Array.from(a))c.setAttribute("stroke-dasharray","0"),c.style.animation="";for(const c of[...o,...n?[n]:[]])if("schematic_component_id"in c&&c.edit_event_type==="edit_schematic_component_location"){const l=Gp(e).schematic_component.get(c.schematic_component_id);if(!l)return;const u=Gp(e).source_port.list({source_component_id:l.source_component_id}),_=new Set(u.map(p=>p.source_port_id)),d=Gp(e).source_trace.list().filter(p=>p.connected_source_port_ids?.some(x=>_.has(x))),m=new Set(d.map(p=>p.source_trace_id));Gp(e).schematic_trace.list().filter(p=>m.has(p.source_trace_id)).forEach(p=>{const x=r.querySelectorAll(`[data-schematic-trace-id="${p.schematic_trace_id}"] path`);for(const f of Array.from(x))if(!f.getAttribute("class")?.includes("invisible")&&(f.setAttribute("stroke-dasharray","20,20"),f.style.animation="dash-animation 350ms linear infinite, pulse-animation 900ms linear infinite",!r.querySelector("style#dash-animation"))){const g=document.createElement("style");g.id="dash-animation",g.textContent=`
|
|
5372
5372
|
@keyframes dash-animation {
|
|
5373
5373
|
to {
|
|
5374
5374
|
stroke-dashoffset: -40;
|
|
@@ -5686,7 +5686,7 @@ test("${l} should solve problem correctly", () => {
|
|
|
5686
5686
|
// Add more specific assertions based on expected output
|
|
5687
5687
|
// expect(solver.netLabelPlacementSolver!.netLabelPlacements).toMatchInlineSnapshot()
|
|
5688
5688
|
})
|
|
5689
|
-
`,_=new Blob([u],{type:"text/plain"}),d=URL.createObjectURL(_),m=document.createElement("a");m.href=d,m.download=`${l}.test.ts`,m.click(),URL.revokeObjectURL(d)}catch(c){alert(`Error generating test.ts for ${t.constructor.name}: ${c instanceof Error?c.message:String(c)}`)}o(!1)};return G.jsxs("div",{className:`relative ${e}`,ref:r,children:[G.jsx("button",{className:"px-2 py-1 rounded text-xs cursor-pointer",onClick:()=>o(!n),title:`Download options for ${t.constructor.name}`,children:t.constructor.name}),n&&G.jsxs("div",{className:"absolute top-full left-0 mt-1 bg-white border border-gray-300 rounded shadow-lg z-10 min-w-[150px]",children:[G.jsx("button",{className:"w-full text-left px-3 py-2 hover:bg-gray-100 text-xs",onClick:i,children:"Download JSON"}),G.jsx("button",{className:"w-full text-left px-3 py-2 hover:bg-gray-100 text-xs",onClick:s,children:"Download page.tsx"}),G.jsx("button",{className:"w-full text-left px-3 py-2 hover:bg-gray-100 text-xs",onClick:a,children:"Download test.ts"})]})]})},Ddt=t=>t.activeSubSolver?[t,...Ddt(t.activeSubSolver)]:[t],lJn=({solver:t})=>{const e=Ddt(t);return G.jsx("div",{className:"flex gap-1 items-center text-sm pt-1",children:e.map((n,o)=>G.jsxs("div",{className:"flex items-center",children:[o>0&&G.jsx("span",{className:"text-gray-400 mx-1",children:"→"}),G.jsx(cJn,{solver:n})]},n.constructor.name))})},uJn=({solver:t,triggerRender:e,animationSpeed:n=25,onSolverStarted:o,onSolverCompleted:r})=>{const[i,s]=Y.useReducer(p=>!p,!1),a=Y.useRef(void 0),c=()=>{!t.solved&&!t.failed&&(t.step(),e())},l=()=>{!t.solved&&!t.failed&&(o&&o(t),t.solve(),e(),r&&r(t))},u=()=>{i?(a.current&&(clearInterval(a.current),a.current=void 0),s()):(s(),a.current=setInterval(()=>{if(t.solved||t.failed){a.current&&(clearInterval(a.current),a.current=void 0),s(),e(),r&&t.solved&&r(t);return}t.step(),e()},n))},_=()=>{const p=t;if(p.getCurrentPhase&&!t.solved&&!t.failed){const x=p.getCurrentPhase();for(;p.getCurrentPhase()===x&&!t.solved&&!t.failed;)t.step();e()}},d=()=>{if(t.solved||t.failed||i)return;const p=window.prompt("Step until which iteration?",`${t.iterations}`);if(p===null)return;const x=Number(p);if(!Number.isFinite(x)){window.alert("Please enter a valid number for the iteration");return}for(;t.iterations<x&&!t.solved&&!t.failed;)t.step();e(),t.solved&&r&&r(t)};Y.useEffect(()=>()=>{a.current&&clearInterval(a.current)},[]),Y.useEffect(()=>{(t.solved||t.failed)&&i&&(a.current&&(clearInterval(a.current),a.current=void 0),s())},[t.solved,t.failed,i]);const m=t.getCurrentPhase!==void 0,h=m?t.getCurrentPhase():null;return G.jsxs("div",{className:"space-y-2 p-2 border-b",children:[G.jsx("div",{className:"flex items-center",children:G.jsx(lJn,{solver:t})}),G.jsxs("div",{className:"flex gap-2 items-center flex-wrap",children:[G.jsx("button",{onClick:c,disabled:t.solved||t.failed||i,className:"bg-blue-500 hover:bg-blue-600 disabled:bg-gray-300 text-white px-3 py-1 rounded text-sm",children:"Step"}),G.jsx("button",{onClick:l,disabled:t.solved||t.failed||i,className:"bg-green-500 hover:bg-green-600 disabled:bg-gray-300 text-white px-3 py-1 rounded text-sm",children:"Solve"}),G.jsx("button",{onClick:u,disabled:t.solved||t.failed,className:`px-3 py-1 rounded text-white text-sm ${i?"bg-red-500 hover:bg-red-600":"bg-yellow-500 hover:bg-yellow-600"} disabled:bg-gray-300`,children:i?"Stop":"Animate"}),G.jsx("button",{onClick:d,disabled:t.solved||t.failed||i,className:"bg-orange-500 hover:bg-orange-600 disabled:bg-gray-300 text-white px-3 py-1 rounded text-sm",children:"Step Until Iteration"}),m&&G.jsx("button",{onClick:_,disabled:t.solved||t.failed||i,className:"bg-purple-500 hover:bg-purple-600 disabled:bg-gray-300 text-white px-3 py-1 rounded text-sm",children:"Next Stage"}),G.jsxs("div",{className:"text-sm text-gray-600",children:["Iterations: ",t.iterations]}),t.timeToSolve!==void 0&&G.jsxs("div",{className:"text-sm text-gray-600",children:["Time: ",(t.timeToSolve/1e3).toFixed(3),"s"]}),h&&G.jsxs("div",{className:"text-sm text-gray-600",children:["Phase: ",G.jsx("span",{className:"font-medium",children:h})]}),t.solved&&G.jsx("div",{className:"px-2 py-1 bg-green-100 text-green-800 rounded text-sm",children:"Solved"}),t.failed&&G.jsx("div",{className:"px-2 py-1 bg-red-100 text-red-800 rounded text-sm",children:"Failed"})]}),t.error&&G.jsxs("div",{className:"text-red-600 text-sm",children:["Error: ",t.error]})]})},_Jn=(t,e,n)=>{const o=t.currentPipelineStepIndex;return e<o?"Completed":e===o&&t.activeSubSolver?t.activeSubSolver.failed?"Failed":"In Progress":"Not Started"},dJn=(t,e)=>{const o=t.pipelineDef[e].solverName,r=_Jn(t,e),i=t[o],s=t.firstIterationOfPhase?.[o]??null,a=t.iterations;let c=0;if(r==="Completed"){const d=t.pipelineDef[e+1],m=d?t.firstIterationOfPhase?.[d.solverName]:void 0;m!==void 0&&s!==null?c=m-s:s!==null&&(c=a-s)}else r==="In Progress"&&s!==null&&(c=a-s);const l=t.timeSpentOnPhase?.[o]??0;let u=0;r==="Completed"?u=1:r==="In Progress"&&i&&(u=i.progress??0);const _=i?.stats??null;return{index:e,name:o,status:r,firstIteration:s,iterations:c,progress:u,timeSpent:l,stats:_&&Object.keys(_).length>0?_:null,solverInstance:i??null}},hJn=({status:t})=>{const e={"Not Started":"text-blue-600","In Progress":"text-yellow-600",Completed:"text-green-600",Failed:"text-red-600"};return G.jsx("span",{className:`font-medium ${e[t]}`,children:t})},mJn=({progress:t})=>{if(t===0)return null;const e=Math.round(t*100);return G.jsxs("div",{className:"flex items-center gap-2",children:[G.jsx("div",{className:"w-20 h-2 bg-gray-200 rounded overflow-hidden",children:G.jsx("div",{className:"h-full bg-blue-500 transition-all duration-200",style:{width:`${e}%`}})}),G.jsxs("span",{className:"text-xs text-gray-500",children:[e,"%"]})]})},pJn=t=>Object.entries(t).map(([e,n])=>`${e}: ${n}`).join(", "),fJn=({stats:t})=>{if(!t||Object.keys(t).length===0)return G.jsx("span",{children:"-"});const e=Object.entries(t),n=pJn(t);return G.jsxs("details",{className:"cursor-pointer",children:[G.jsx("summary",{className:"whitespace-nowrap overflow-hidden text-ellipsis max-w-[200px]",children:n}),G.jsx("div",{className:"mt-1 text-xs",children:e.map(([o,r])=>G.jsxs("div",{children:[o,": ",String(r)]},o))})]})},Dye=t=>{if(t===null||typeof t!="object")return t;if(Array.isArray(t))return t.map(Dye);const e={};for(const[n,o]of Object.entries(t))n.startsWith("_")||(e[n]=Dye(o));return e},xJn=(t,e)=>{try{if(typeof t.getConstructorParams!="function"){alert(`getConstructorParams() is not implemented for ${e}`);return}const n=Dye(t.getConstructorParams()),o=new Blob([JSON.stringify(n,null,2)],{type:"application/json"}),r=URL.createObjectURL(o),i=document.createElement("a");i.href=r,i.download=`${e}_input.json`,i.click(),URL.revokeObjectURL(r)}catch(n){alert(`Error downloading input for ${e}: ${n instanceof Error?n.message:String(n)}`)}},gJn=({solver:t,onStepUntilPhase:e,onDownloadInput:n})=>{const o=t.pipelineDef.map((a,c)=>dJn(t,c)),r=a=>{e?.(a)},i=a=>{a.solverInstance&&(n?n(a.solverInstance,a.name):xJn(a.solverInstance,a.name))},s=a=>`${(a/1e3).toFixed(2)}s`;return G.jsxs("div",{className:"border-t border-gray-200",children:[G.jsx("div",{className:"px-4 py-2 bg-gray-50 border-b border-gray-200",children:G.jsx("h3",{className:"text-sm font-semibold text-gray-700",children:"Pipeline Steps"})}),G.jsx("div",{className:"overflow-x-auto",children:G.jsxs("table",{className:"w-full text-sm",children:[G.jsx("thead",{children:G.jsxs("tr",{className:"bg-gray-50 border-b border-gray-200",children:[G.jsx("th",{className:"px-4 py-2 text-left font-semibold text-gray-700",children:"Step"}),G.jsx("th",{className:"px-4 py-2 text-left font-semibold text-gray-700",children:"Status"}),G.jsxs("th",{className:"px-4 py-2 text-center font-semibold text-gray-700",children:["i",G.jsx("sub",{children:"0"})]}),G.jsx("th",{className:"px-4 py-2 text-left font-semibold text-gray-700",children:"Iterations"}),G.jsx("th",{className:"px-4 py-2 text-left font-semibold text-gray-700",children:"Progress"}),G.jsx("th",{className:"px-4 py-2 text-left font-semibold text-gray-700",children:"Time"}),G.jsx("th",{className:"px-4 py-2 text-left font-semibold text-gray-700",children:"Stats"}),G.jsx("th",{className:"px-4 py-2 text-left font-semibold text-gray-700",children:"Input"})]})}),G.jsx("tbody",{children:o.map(a=>G.jsxs("tr",{className:`border-b border-gray-100 ${a.status==="In Progress"?"bg-yellow-50":""}`,children:[G.jsx("td",{className:"px-4 py-2",children:G.jsxs("div",{className:"flex items-center gap-2",children:[G.jsx("span",{className:"text-gray-400 w-6",children:String(a.index+1).padStart(2,"0")}),G.jsx("button",{onClick:()=>r(a.name),disabled:a.status==="Completed"||t.solved||t.failed,className:"text-blue-500 hover:text-blue-700 disabled:text-gray-300 disabled:cursor-not-allowed",title:`Step until ${a.name} completes`,children:G.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:"w-4 h-4",children:G.jsx("path",{fillRule:"evenodd",d:"M4.5 5.653c0-1.426 1.529-2.33 2.779-1.643l11.54 6.348c1.295.712 1.295 2.573 0 3.285L7.28 19.991c-1.25.687-2.779-.217-2.779-1.643V5.653z",clipRule:"evenodd"})})}),G.jsx("span",{className:"font-medium text-gray-900",children:a.name})]})}),G.jsx("td",{className:"px-4 py-2",children:G.jsx(hJn,{status:a.status})}),G.jsx("td",{className:"px-4 py-2 text-center text-gray-600",children:a.firstIteration!==null?a.firstIteration:""}),G.jsx("td",{className:"px-4 py-2 text-gray-600",children:a.iterations}),G.jsx("td",{className:"px-4 py-2",children:G.jsx(mJn,{progress:a.progress})}),G.jsx("td",{className:"px-4 py-2 text-gray-600",children:s(a.timeSpent)}),G.jsx("td",{className:"px-4 py-2 text-gray-500",children:G.jsx(fJn,{stats:a.stats})}),G.jsx("td",{className:"px-4 py-2",children:a.solverInstance?G.jsxs("button",{onClick:()=>i(a),className:"flex items-center gap-1 text-blue-500 hover:text-blue-700",title:`Download input for ${a.name}`,children:[G.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:"w-4 h-4",children:G.jsx("path",{fillRule:"evenodd",d:"M12 2.25a.75.75 0 01.75.75v11.69l3.22-3.22a.75.75 0 111.06 1.06l-4.5 4.5a.75.75 0 01-1.06 0l-4.5-4.5a.75.75 0 111.06-1.06l3.22 3.22V3a.75.75 0 01.75-.75zm-9 13.5a.75.75 0 01.75.75v2.25a1.5 1.5 0 001.5 1.5h13.5a1.5 1.5 0 001.5-1.5V16.5a.75.75 0 011.5 0v2.25a3 3 0 01-3 3H5.25a3 3 0 01-3-3V16.5a.75.75 0 01.75-.75z",clipRule:"evenodd"})}),G.jsx("span",{children:"Input"})]}):null})]},a.name))})]})})]})},yJn=class extends cr.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t){console.error("InteractiveGraphics render error:",t)}render(){return this.state.hasError?this.props.fallback:this.props.children}};function bJn({graphics:t}){const e=t.points??[],n=t.lines??[],o=t.rects??[],r=t.circles??[],i=t.texts??[];let s=Number.POSITIVE_INFINITY,a=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY,l=Number.NEGATIVE_INFINITY;const u=(x,f)=>{typeof x=="number"&&(x<s&&(s=x),x>c&&(c=x)),typeof f=="number"&&(f<a&&(a=f),f>l&&(l=f))};for(const x of e)u(x.x,x.y);for(const x of n){const f=x.points??[];for(const g of f)u(g.x,g.y)}for(const x of o){const f=x.x??0,g=x.y??0,y=x.width??0,b=x.height??0;u(f,g),u(f+y,g+b)}for(const x of r){const f=x.x??0,g=x.y??0,y=x.radius??1;u(f-y,g-y),u(f+y,g+y)}for(const x of i)u(x.x,x.y);(!isFinite(s)||!isFinite(a)||!isFinite(c)||!isFinite(l))&&(s=-20,a=-20,c=20,l=20);const _=10,d=s-_,m=a-_,h=Math.max(1,c-s+2*_),p=Math.max(1,l-a+2*_);return G.jsxs("svg",{className:"w-full h-[400px] bg-white",viewBox:`${d} ${m} ${h} ${p}`,role:"img","aria-label":"Graphics fallback",children:[o.map((x,f)=>G.jsx("rect",{x:x.x??0,y:x.y??0,width:x.width??0,height:x.height??0,fill:"none",stroke:x.strokeColor??"black",strokeWidth:x.strokeWidth??1},`rect-${f}`)),n.map((x,f)=>G.jsx("polyline",{fill:"none",stroke:x.strokeColor??"black",strokeWidth:x.strokeWidth??1,points:(x.points??[]).map(g=>`${g.x??0},${g.y??0}`).join(" ")},`line-${f}`)),r.map((x,f)=>G.jsx("circle",{cx:x.x??0,cy:x.y??0,r:x.radius??1.5,fill:x.fillColor??"none",stroke:x.strokeColor??"black",strokeWidth:x.strokeWidth??1},`circle-${f}`)),e.map((x,f)=>G.jsx("circle",{cx:x.x??0,cy:x.y??0,r:x.radius??1.5,fill:x.color??"black"},`point-${f}`)),i.map((x,f)=>G.jsx("text",{x:x.x??0,y:x.y??0,fontSize:x.fontSize??10,fill:x.color??"black",children:x.text??""},`text-${f}`))]})}var PJn=({solver:t,animationSpeed:e=25,onSolverStarted:n,onSolverCompleted:o})=>{const[r,i]=Y.useReducer(u=>u+1,0),s=Y.useMemo(()=>{try{return t.visualize()||{points:[],lines:[],rects:[],circles:[]}}catch(u){return console.error("Visualization error:",u),{points:[],lines:[],rects:[],circles:[]}}},[t,r]),a=Y.useMemo(()=>(s.rects?.length||0)===0&&(s.lines?.length||0)===0&&(s.points?.length||0)===0&&(s.circles?.length||0)===0,[s]);Y.useEffect(()=>{if(!(typeof document>"u")&&!document.querySelector('script[src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"]')){const u=document.createElement("script");u.src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4",document.head.appendChild(u)}},[]);const c=t.pipelineDef!==void 0,l=u=>{const _=t;if(!t.solved&&!t.failed){for(;!t.solved&&!t.failed&&_.currentPipelineStepIndex<=_.pipelineDef.findIndex(d=>d.solverName===u);)t.step();i()}};return G.jsxs("div",{children:[G.jsx(uJn,{solver:t,triggerRender:i,animationSpeed:e,onSolverStarted:n,onSolverCompleted:o}),a?G.jsx("div",{className:"p-4 text-gray-500",children:"No Graphics Yet"}):G.jsx(yJn,{fallback:G.jsx(bJn,{graphics:s}),children:G.jsx(aJn,{graphics:s})}),c&&G.jsx(gJn,{solver:t,onStepUntilPhase:l})]})};const vJn=()=>{Y.useEffect(()=>{const t="tailwind-cdn-script";if(document.getElementById(t)||window.tailwind)return;const e=document.createElement("div");e.className="hidden",document.body.appendChild(e);const n=window.getComputedStyle(e).display==="none";if(document.body.removeChild(e),n)return;const o=document.createElement("script");o.id=t,o.src="https://cdn.tailwindcss.com",document.head.appendChild(o)},[])},SJn=t=>t.toLowerCase().includes("pack")?BDn:t.toLowerCase().includes("rout")?UDn:CDn,CJn=({solverEvents:t=[]})=>{const[e,n]=Y.useState(null);vJn();const o=Y.useMemo(()=>{const a=new Map;for(const c of t){const l=`${c.componentName}-${c.solverName}`;a.set(l,c)}return a},[t]),r=Y.useMemo(()=>Array.from(o.keys()),[o]),i=e?o.get(e):null,s=Y.useMemo(()=>{if(!i)return{instance:null,error:null,classFound:!1};const a=zie[i.solverName];if(!a)return{instance:null,error:`Solver class "${i.solverName}" not found in SOLVERS registry. Available: ${Object.keys(zie).join(", ")}`,classFound:!1};try{const c=i.solverParams,l=c?.input!==void 0?c.input:c;return{instance:new a(l),error:null,classFound:!0}}catch(c){const l=c instanceof Error?c.message:String(c);return console.error("Failed to reconstruct solver:",c),{instance:null,error:`Failed to instantiate solver: ${l}`,classFound:!0}}},[i]);return t.length===0?G.jsx("div",{className:"rf-p-4",children:G.jsx("div",{className:"rf-bg-gray-50 rf-rounded-md rf-border rf-border-gray-200",children:G.jsxs("div",{className:"rf-p-4",children:[G.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-gray-800 rf-mb-3",children:"No Solvers Detected"}),G.jsx("p",{className:"rf-text-sm rf-text-gray-600",children:"Solvers will appear here when the circuit runs. Solvers are used for tasks like component packing and autorouting."})]})})}):G.jsxs("div",{className:"rf-flex rf-h-full rf-overflow-hidden",children:[G.jsxs("div",{className:"rf-w-64 rf-border-r rf-border-gray-200 rf-overflow-y-auto rf-flex-shrink-0",children:[G.jsxs("div",{className:"rf-text-xs rf-font-semibold rf-text-gray-500 rf-px-3 rf-py-2 rf-bg-gray-50 rf-border-b rf-border-gray-200",children:[r.length," ",r.length===1?"Solver":"Solvers"]}),r.map(a=>{const c=o.get(a),l=e===a;return G.jsx("div",{className:`rf-px-3 rf-py-2 rf-cursor-pointer rf-border-b rf-border-gray-100 ${l?"rf-bg-blue-50 rf-border-l-2 rf-border-l-blue-500":"hover:rf-bg-gray-50"}`,onClick:()=>n(a),children:(()=>{const u=SJn(c.solverName);return G.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[G.jsx(u,{className:"rf-w-4 rf-h-4 rf-text-blue-500 rf-flex-shrink-0"}),G.jsxs("div",{className:"rf-flex-1 rf-min-w-0",children:[G.jsx("div",{className:"rf-text-sm rf-font-medium rf-text-gray-800 rf-truncate",children:c.componentName}),G.jsx("div",{className:"rf-text-xs rf-text-gray-500 rf-truncate",children:c.solverName})]})]})})()},a)})]}),G.jsx("div",{className:"rf-flex-1 rf-overflow-hidden",children:i?s.instance?G.jsx(M5,{fallback:G.jsx("div",{className:"rf-p-4",children:G.jsxs("div",{className:"rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200 rf-p-4",children:[G.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-2",children:"Error Loading Solver Debugger"}),G.jsxs("p",{className:"rf-text-sm rf-text-red-600",children:["Failed to render the solver debugger for"," ",i.solverName]})]})}),children:G.jsx(PJn,{solver:s.instance})}):G.jsxs("div",{className:"rf-p-4",children:[G.jsxs("div",{className:"rf-mb-4",children:[G.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-gray-800",children:i.solverName}),G.jsxs("p",{className:"rf-text-sm rf-text-gray-500",children:["Component: ",i.componentName]})]}),s.error&&G.jsx("div",{className:`rf-rounded-md rf-border rf-p-4 rf-mb-4 ${s.classFound?"rf-bg-red-50 rf-border-red-200":"rf-bg-yellow-50 rf-border-yellow-200"}`,children:G.jsx("p",{className:`rf-text-sm ${s.classFound?"rf-text-red-700":"rf-text-yellow-700"}`,children:s.error})}),G.jsxs("div",{className:"rf-border rf-border-gray-200 rf-rounded-md rf-overflow-hidden",children:[G.jsx("div",{className:"rf-px-3 rf-py-2 rf-bg-gray-50",children:G.jsx("span",{className:"rf-text-sm rf-font-medium rf-text-gray-700",children:"Solver Parameters"})}),G.jsx("div",{className:"rf-p-3 rf-bg-white rf-border-t rf-border-gray-200",children:G.jsx("pre",{className:"rf-text-xs rf-font-mono rf-text-gray-600 rf-whitespace-pre-wrap rf-overflow-x-auto",children:JSON.stringify(i.solverParams,null,2)})})]})]}):G.jsx("div",{className:"rf-flex rf-items-center rf-justify-center rf-h-full",children:G.jsx("p",{className:"rf-text-sm rf-text-gray-500",children:"Select a solver from the list to view details"})})})]})},Adt=({errorMessage:t,errorStack:e,circuitJsonErrors:n})=>{Y.useEffect(()=>{if(t){const o=new Error(t);e&&(o.stack=e);try{EW.captureException(o)}catch{}}},[t,e]),Y.useEffect(()=>{if(n&&n.length>0)for(const o of n){const r=new Error(o.message||"Circuit JSON Error");o.stack&&(r.stack=o.stack);try{EW.captureException(r,{error_type:o.type})}catch{}}},[n])},Rdt="0.0.1840",MJn={version:Rdt},yY=OIe()(FIe(t=>({lastRunEvalVersion:void 0,setLastRunEvalVersion:e=>{t({lastRunEvalVersion:e})}}),{name:"runframe-runner-store"})),TJn=t=>{const[e,n]=Y.useState([]),[o,r]=Y.useState(null),[i,s]=Y.useState(""),[a,c]=RT("eval-version-selection",null),l=yY(m=>m.setLastRunEvalVersion),u=yY(m=>m.lastRunEvalVersion);return Y.useEffect(()=>{t&&fetch("https://data.jsdelivr.com/v1/package/npm/@tscircuit/eval").then(m=>m.json()).then(m=>{if(Array.isArray(m?.versions)){let h=[...m.versions];m.tags?.latest&&(r(m.tags.latest),h=h.filter(p=>p!==m.tags.latest)),n(h)}}).catch(()=>{})},[t]),Y.useEffect(()=>{t&&(a?(window.TSCIRCUIT_LATEST_EVAL_VERSION=a,l(a)):o&&(window.TSCIRCUIT_LATEST_EVAL_VERSION=o,l(o)))},[t,a,o]),{versions:Y.useMemo(()=>e.filter(m=>m.includes(i)).slice(0,50),[e,i]),latestVersion:o,lastRunEvalVersion:u,search:i,setSearch:s,selectVersion:m=>{c(m),s("")}}},wJn=({snippetNames:t,onSelect:e,onCancel:n,isOpen:o})=>{const[r,i]=Y.useState(""),[s,a]=Y.useState("");if(!o)return null;const c=t.filter(_=>_.toLowerCase().includes(s.toLowerCase())),l=s&&!t.includes(s),u=_=>{_.key==="Enter"&&(c.length===1?i(c[0]):l&&i(s))};return G.jsx("div",{className:"rf-fixed rf-inset-0 rf-bg-black rf-bg-opacity-50 rf-flex rf-items-center rf-justify-center rf-z-[100]",children:G.jsxs("div",{className:"rf-bg-white rf-rounded-lg rf-p-6 rf-w-96",children:[G.jsx("h2",{className:"rf-text-lg rf-font-semibold rf-mb-4",children:"Select Snippet"}),G.jsx("input",{type:"text",className:"rf-w-full rf-px-4 rf-py-2 rf-border rf-rounded rf-mb-4",placeholder:"Search snippets or new snippet name...",value:s,onChange:_=>a(_.target.value),onKeyDown:u}),G.jsxs("div",{className:"rf-h-60 rf-overflow-y-auto",children:[c.map(_=>G.jsx("button",{type:"button",className:`w-full text-left px-4 py-2 rounded hover:bg-gray-100 ${r===_?"bg-blue-50":""}`,onClick:()=>i(_),children:_},_)),l&&G.jsxs("button",{type:"button",className:`w-full text-left px-4 py-2 rounded hover:bg-gray-100 text-blue-500 ${r===s?"bg-blue-50":""}`,onClick:()=>i(s),children:['Create new "',s,'"']})]}),G.jsxs("div",{className:"rf-mt-4 rf-flex rf-justify-end rf-gap-2",children:[G.jsx("button",{type:"button",className:"rf-px-4 rf-py-2 rf-text-gray-600 rf-hover:text-gray-800",onClick:n,children:"Cancel"}),G.jsx("button",{type:"button",className:"rf-px-4 rf-py-2 rf-bg-blue-500 rf-text-white rf-rounded rf-hover:bg-blue-600 rf-disabled:opacity-50",onClick:()=>r&&e(r),disabled:!r,children:r===s?`Create "${r}"`:`Save to ${r}`})]})]})})},EJn=t=>{const e=Y.useRef(null),n=eu(o=>o.recentEvents);Y.useEffect(()=>{if(n.length===0)return;const o=n[0];o.event_id!==e.current&&(t(o),e.current=o.event_id)},[n,t])};function DJn(t){const e=AJn(t),n=Y.forwardRef((o,r)=>{const{children:i,...s}=o,a=Y.Children.toArray(i),c=a.find(kJn);if(c){const l=c.props.children,u=a.map(_=>_===c?Y.Children.count(l)>1?Y.Children.only(null):Y.isValidElement(l)?l.props.children:null:_);return G.jsx(e,{...s,ref:r,children:Y.isValidElement(l)?Y.cloneElement(l,void 0,u):null})}return G.jsx(e,{...s,ref:r,children:i})});return n.displayName=`${t}.Slot`,n}function AJn(t){const e=Y.forwardRef((n,o)=>{const{children:r,...i}=n;if(Y.isValidElement(r)){const s=HJn(r),a=NJn(i,r.props);return r.type!==Y.Fragment&&(a.ref=o?Rx(o,s):s),Y.cloneElement(r,a)}return Y.Children.count(r)>1?Y.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var RJn=Symbol("radix.slottable");function kJn(t){return Y.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===RJn}function NJn(t,e){const n={...e};for(const o in e){const r=t[o],i=e[o];/^on[A-Z]/.test(o)?r&&i?n[o]=(...a)=>{const c=i(...a);return r(...a),c}:r&&(n[o]=r):o==="style"?n[o]={...r,...i}:o==="className"&&(n[o]=[r,i].filter(Boolean).join(" "))}return{...t,...n}}function HJn(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var bY="Dialog",[kdt,Ndt]=d4(bY),[IJn,B4]=kdt(bY),Hdt=t=>{const{__scopeDialog:e,children:n,open:o,defaultOpen:r,onOpenChange:i,modal:s=!0}=t,a=Y.useRef(null),c=Y.useRef(null),[l,u]=DP({prop:o,defaultProp:r??!1,onChange:i,caller:bY});return G.jsx(IJn,{scope:e,triggerRef:a,contentRef:c,contentId:Jp(),titleId:Jp(),descriptionId:Jp(),open:l,onOpenChange:u,onOpenToggle:Y.useCallback(()=>u(_=>!_),[u]),modal:s,children:n})};Hdt.displayName=bY;var Idt="DialogTrigger",Ldt=Y.forwardRef((t,e)=>{const{__scopeDialog:n,...o}=t,r=B4(Idt,n),i=tu(e,r.triggerRef);return G.jsx(Cc.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":kye(r.open),...o,ref:i,onClick:Vr(t.onClick,r.onOpenToggle)})});Ldt.displayName=Idt;var Aye="DialogPortal",[LJn,Odt]=kdt(Aye,{forceMount:void 0}),Fdt=t=>{const{__scopeDialog:e,forceMount:n,children:o,container:r}=t,i=B4(Aye,e);return G.jsx(LJn,{scope:e,forceMount:n,children:Y.Children.map(o,s=>G.jsx(Fg,{present:n||i.open,children:G.jsx(Lj,{asChild:!0,container:r,children:s})}))})};Fdt.displayName=Aye;var PY="DialogOverlay",Bdt=Y.forwardRef((t,e)=>{const n=Odt(PY,t.__scopeDialog),{forceMount:o=n.forceMount,...r}=t,i=B4(PY,t.__scopeDialog);return i.modal?G.jsx(Fg,{present:o||i.open,children:G.jsx(FJn,{...r,ref:e})}):null});Bdt.displayName=PY;var OJn=DJn("DialogOverlay.RemoveScroll"),FJn=Y.forwardRef((t,e)=>{const{__scopeDialog:n,...o}=t,r=B4(PY,n);return G.jsx(Uj,{as:OJn,allowPinchZoom:!0,shards:[r.contentRef],children:G.jsx(Cc.div,{"data-state":kye(r.open),...o,ref:e,style:{pointerEvents:"auto",...o.style}})})}),Z8="DialogContent",zdt=Y.forwardRef((t,e)=>{const n=Odt(Z8,t.__scopeDialog),{forceMount:o=n.forceMount,...r}=t,i=B4(Z8,t.__scopeDialog);return G.jsx(Fg,{present:o||i.open,children:i.modal?G.jsx(BJn,{...r,ref:e}):G.jsx(zJn,{...r,ref:e})})});zdt.displayName=Z8;var BJn=Y.forwardRef((t,e)=>{const n=B4(Z8,t.__scopeDialog),o=Y.useRef(null),r=tu(e,n.contentRef,o);return Y.useEffect(()=>{const i=o.current;if(i)return Y2e(i)},[]),G.jsx(Vdt,{...t,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Vr(t.onCloseAutoFocus,i=>{i.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Vr(t.onPointerDownOutside,i=>{const s=i.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&i.preventDefault()}),onFocusOutside:Vr(t.onFocusOutside,i=>i.preventDefault())})}),zJn=Y.forwardRef((t,e)=>{const n=B4(Z8,t.__scopeDialog),o=Y.useRef(!1),r=Y.useRef(!1);return G.jsx(Vdt,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{t.onCloseAutoFocus?.(i),i.defaultPrevented||(o.current||n.triggerRef.current?.focus(),i.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:i=>{t.onInteractOutside?.(i),i.defaultPrevented||(o.current=!0,i.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const s=i.target;n.triggerRef.current?.contains(s)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&r.current&&i.preventDefault()}})}),Vdt=Y.forwardRef((t,e)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:i,...s}=t,a=B4(Z8,n),c=Y.useRef(null),l=tu(e,c);return D2e(),G.jsxs(G.Fragment,{children:[G.jsx(Sj,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:i,children:G.jsx(ZN,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":kye(a.open),...s,ref:l,onDismiss:()=>a.onOpenChange(!1)})}),G.jsxs(G.Fragment,{children:[G.jsx($Jn,{titleId:a.titleId}),G.jsx(UJn,{contentRef:c,descriptionId:a.descriptionId})]})]})}),Rye="DialogTitle",$dt=Y.forwardRef((t,e)=>{const{__scopeDialog:n,...o}=t,r=B4(Rye,n);return G.jsx(Cc.h2,{id:r.titleId,...o,ref:e})});$dt.displayName=Rye;var Wdt="DialogDescription",Udt=Y.forwardRef((t,e)=>{const{__scopeDialog:n,...o}=t,r=B4(Wdt,n);return G.jsx(Cc.p,{id:r.descriptionId,...o,ref:e})});Udt.displayName=Wdt;var Xdt="DialogClose",jdt=Y.forwardRef((t,e)=>{const{__scopeDialog:n,...o}=t,r=B4(Xdt,n);return G.jsx(Cc.button,{type:"button",...o,ref:e,onClick:Vr(t.onClick,()=>r.onOpenChange(!1))})});jdt.displayName=Xdt;function kye(t){return t?"open":"closed"}var Gdt="DialogTitleWarning",[VJn,Ydt]=EZt(Gdt,{contentName:Z8,titleName:Rye,docsSlug:"dialog"}),$Jn=({titleId:t})=>{const e=Ydt(Gdt),n=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
|
|
5689
|
+
`,_=new Blob([u],{type:"text/plain"}),d=URL.createObjectURL(_),m=document.createElement("a");m.href=d,m.download=`${l}.test.ts`,m.click(),URL.revokeObjectURL(d)}catch(c){alert(`Error generating test.ts for ${t.constructor.name}: ${c instanceof Error?c.message:String(c)}`)}o(!1)};return G.jsxs("div",{className:`relative ${e}`,ref:r,children:[G.jsx("button",{className:"px-2 py-1 rounded text-xs cursor-pointer",onClick:()=>o(!n),title:`Download options for ${t.constructor.name}`,children:t.constructor.name}),n&&G.jsxs("div",{className:"absolute top-full left-0 mt-1 bg-white border border-gray-300 rounded shadow-lg z-10 min-w-[150px]",children:[G.jsx("button",{className:"w-full text-left px-3 py-2 hover:bg-gray-100 text-xs",onClick:i,children:"Download JSON"}),G.jsx("button",{className:"w-full text-left px-3 py-2 hover:bg-gray-100 text-xs",onClick:s,children:"Download page.tsx"}),G.jsx("button",{className:"w-full text-left px-3 py-2 hover:bg-gray-100 text-xs",onClick:a,children:"Download test.ts"})]})]})},Ddt=t=>t.activeSubSolver?[t,...Ddt(t.activeSubSolver)]:[t],lJn=({solver:t})=>{const e=Ddt(t);return G.jsx("div",{className:"flex gap-1 items-center text-sm pt-1",children:e.map((n,o)=>G.jsxs("div",{className:"flex items-center",children:[o>0&&G.jsx("span",{className:"text-gray-400 mx-1",children:"→"}),G.jsx(cJn,{solver:n})]},n.constructor.name))})},uJn=({solver:t,triggerRender:e,animationSpeed:n=25,onSolverStarted:o,onSolverCompleted:r})=>{const[i,s]=Y.useReducer(p=>!p,!1),a=Y.useRef(void 0),c=()=>{!t.solved&&!t.failed&&(t.step(),e())},l=()=>{!t.solved&&!t.failed&&(o&&o(t),t.solve(),e(),r&&r(t))},u=()=>{i?(a.current&&(clearInterval(a.current),a.current=void 0),s()):(s(),a.current=setInterval(()=>{if(t.solved||t.failed){a.current&&(clearInterval(a.current),a.current=void 0),s(),e(),r&&t.solved&&r(t);return}t.step(),e()},n))},_=()=>{const p=t;if(p.getCurrentPhase&&!t.solved&&!t.failed){const x=p.getCurrentPhase();for(;p.getCurrentPhase()===x&&!t.solved&&!t.failed;)t.step();e()}},d=()=>{if(t.solved||t.failed||i)return;const p=window.prompt("Step until which iteration?",`${t.iterations}`);if(p===null)return;const x=Number(p);if(!Number.isFinite(x)){window.alert("Please enter a valid number for the iteration");return}for(;t.iterations<x&&!t.solved&&!t.failed;)t.step();e(),t.solved&&r&&r(t)};Y.useEffect(()=>()=>{a.current&&clearInterval(a.current)},[]),Y.useEffect(()=>{(t.solved||t.failed)&&i&&(a.current&&(clearInterval(a.current),a.current=void 0),s())},[t.solved,t.failed,i]);const m=t.getCurrentPhase!==void 0,h=m?t.getCurrentPhase():null;return G.jsxs("div",{className:"space-y-2 p-2 border-b",children:[G.jsx("div",{className:"flex items-center",children:G.jsx(lJn,{solver:t})}),G.jsxs("div",{className:"flex gap-2 items-center flex-wrap",children:[G.jsx("button",{onClick:c,disabled:t.solved||t.failed||i,className:"bg-blue-500 hover:bg-blue-600 disabled:bg-gray-300 text-white px-3 py-1 rounded text-sm",children:"Step"}),G.jsx("button",{onClick:l,disabled:t.solved||t.failed||i,className:"bg-green-500 hover:bg-green-600 disabled:bg-gray-300 text-white px-3 py-1 rounded text-sm",children:"Solve"}),G.jsx("button",{onClick:u,disabled:t.solved||t.failed,className:`px-3 py-1 rounded text-white text-sm ${i?"bg-red-500 hover:bg-red-600":"bg-yellow-500 hover:bg-yellow-600"} disabled:bg-gray-300`,children:i?"Stop":"Animate"}),G.jsx("button",{onClick:d,disabled:t.solved||t.failed||i,className:"bg-orange-500 hover:bg-orange-600 disabled:bg-gray-300 text-white px-3 py-1 rounded text-sm",children:"Step Until Iteration"}),m&&G.jsx("button",{onClick:_,disabled:t.solved||t.failed||i,className:"bg-purple-500 hover:bg-purple-600 disabled:bg-gray-300 text-white px-3 py-1 rounded text-sm",children:"Next Stage"}),G.jsxs("div",{className:"text-sm text-gray-600",children:["Iterations: ",t.iterations]}),t.timeToSolve!==void 0&&G.jsxs("div",{className:"text-sm text-gray-600",children:["Time: ",(t.timeToSolve/1e3).toFixed(3),"s"]}),h&&G.jsxs("div",{className:"text-sm text-gray-600",children:["Phase: ",G.jsx("span",{className:"font-medium",children:h})]}),t.solved&&G.jsx("div",{className:"px-2 py-1 bg-green-100 text-green-800 rounded text-sm",children:"Solved"}),t.failed&&G.jsx("div",{className:"px-2 py-1 bg-red-100 text-red-800 rounded text-sm",children:"Failed"})]}),t.error&&G.jsxs("div",{className:"text-red-600 text-sm",children:["Error: ",t.error]})]})},_Jn=(t,e,n)=>{const o=t.currentPipelineStepIndex;return e<o?"Completed":e===o&&t.activeSubSolver?t.activeSubSolver.failed?"Failed":"In Progress":"Not Started"},dJn=(t,e)=>{const o=t.pipelineDef[e].solverName,r=_Jn(t,e),i=t[o],s=t.firstIterationOfPhase?.[o]??null,a=t.iterations;let c=0;if(r==="Completed"){const d=t.pipelineDef[e+1],m=d?t.firstIterationOfPhase?.[d.solverName]:void 0;m!==void 0&&s!==null?c=m-s:s!==null&&(c=a-s)}else r==="In Progress"&&s!==null&&(c=a-s);const l=t.timeSpentOnPhase?.[o]??0;let u=0;r==="Completed"?u=1:r==="In Progress"&&i&&(u=i.progress??0);const _=i?.stats??null;return{index:e,name:o,status:r,firstIteration:s,iterations:c,progress:u,timeSpent:l,stats:_&&Object.keys(_).length>0?_:null,solverInstance:i??null}},hJn=({status:t})=>{const e={"Not Started":"text-blue-600","In Progress":"text-yellow-600",Completed:"text-green-600",Failed:"text-red-600"};return G.jsx("span",{className:`font-medium ${e[t]}`,children:t})},mJn=({progress:t})=>{if(t===0)return null;const e=Math.round(t*100);return G.jsxs("div",{className:"flex items-center gap-2",children:[G.jsx("div",{className:"w-20 h-2 bg-gray-200 rounded overflow-hidden",children:G.jsx("div",{className:"h-full bg-blue-500 transition-all duration-200",style:{width:`${e}%`}})}),G.jsxs("span",{className:"text-xs text-gray-500",children:[e,"%"]})]})},pJn=t=>Object.entries(t).map(([e,n])=>`${e}: ${n}`).join(", "),fJn=({stats:t})=>{if(!t||Object.keys(t).length===0)return G.jsx("span",{children:"-"});const e=Object.entries(t),n=pJn(t);return G.jsxs("details",{className:"cursor-pointer",children:[G.jsx("summary",{className:"whitespace-nowrap overflow-hidden text-ellipsis max-w-[200px]",children:n}),G.jsx("div",{className:"mt-1 text-xs",children:e.map(([o,r])=>G.jsxs("div",{children:[o,": ",String(r)]},o))})]})},Dye=t=>{if(t===null||typeof t!="object")return t;if(Array.isArray(t))return t.map(Dye);const e={};for(const[n,o]of Object.entries(t))n.startsWith("_")||(e[n]=Dye(o));return e},xJn=(t,e)=>{try{if(typeof t.getConstructorParams!="function"){alert(`getConstructorParams() is not implemented for ${e}`);return}const n=Dye(t.getConstructorParams()),o=new Blob([JSON.stringify(n,null,2)],{type:"application/json"}),r=URL.createObjectURL(o),i=document.createElement("a");i.href=r,i.download=`${e}_input.json`,i.click(),URL.revokeObjectURL(r)}catch(n){alert(`Error downloading input for ${e}: ${n instanceof Error?n.message:String(n)}`)}},gJn=({solver:t,onStepUntilPhase:e,onDownloadInput:n})=>{const o=t.pipelineDef.map((a,c)=>dJn(t,c)),r=a=>{e?.(a)},i=a=>{a.solverInstance&&(n?n(a.solverInstance,a.name):xJn(a.solverInstance,a.name))},s=a=>`${(a/1e3).toFixed(2)}s`;return G.jsxs("div",{className:"border-t border-gray-200",children:[G.jsx("div",{className:"px-4 py-2 bg-gray-50 border-b border-gray-200",children:G.jsx("h3",{className:"text-sm font-semibold text-gray-700",children:"Pipeline Steps"})}),G.jsx("div",{className:"overflow-x-auto",children:G.jsxs("table",{className:"w-full text-sm",children:[G.jsx("thead",{children:G.jsxs("tr",{className:"bg-gray-50 border-b border-gray-200",children:[G.jsx("th",{className:"px-4 py-2 text-left font-semibold text-gray-700",children:"Step"}),G.jsx("th",{className:"px-4 py-2 text-left font-semibold text-gray-700",children:"Status"}),G.jsxs("th",{className:"px-4 py-2 text-center font-semibold text-gray-700",children:["i",G.jsx("sub",{children:"0"})]}),G.jsx("th",{className:"px-4 py-2 text-left font-semibold text-gray-700",children:"Iterations"}),G.jsx("th",{className:"px-4 py-2 text-left font-semibold text-gray-700",children:"Progress"}),G.jsx("th",{className:"px-4 py-2 text-left font-semibold text-gray-700",children:"Time"}),G.jsx("th",{className:"px-4 py-2 text-left font-semibold text-gray-700",children:"Stats"}),G.jsx("th",{className:"px-4 py-2 text-left font-semibold text-gray-700",children:"Input"})]})}),G.jsx("tbody",{children:o.map(a=>G.jsxs("tr",{className:`border-b border-gray-100 ${a.status==="In Progress"?"bg-yellow-50":""}`,children:[G.jsx("td",{className:"px-4 py-2",children:G.jsxs("div",{className:"flex items-center gap-2",children:[G.jsx("span",{className:"text-gray-400 w-6",children:String(a.index+1).padStart(2,"0")}),G.jsx("button",{onClick:()=>r(a.name),disabled:a.status==="Completed"||t.solved||t.failed,className:"text-blue-500 hover:text-blue-700 disabled:text-gray-300 disabled:cursor-not-allowed",title:`Step until ${a.name} completes`,children:G.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:"w-4 h-4",children:G.jsx("path",{fillRule:"evenodd",d:"M4.5 5.653c0-1.426 1.529-2.33 2.779-1.643l11.54 6.348c1.295.712 1.295 2.573 0 3.285L7.28 19.991c-1.25.687-2.779-.217-2.779-1.643V5.653z",clipRule:"evenodd"})})}),G.jsx("span",{className:"font-medium text-gray-900",children:a.name})]})}),G.jsx("td",{className:"px-4 py-2",children:G.jsx(hJn,{status:a.status})}),G.jsx("td",{className:"px-4 py-2 text-center text-gray-600",children:a.firstIteration!==null?a.firstIteration:""}),G.jsx("td",{className:"px-4 py-2 text-gray-600",children:a.iterations}),G.jsx("td",{className:"px-4 py-2",children:G.jsx(mJn,{progress:a.progress})}),G.jsx("td",{className:"px-4 py-2 text-gray-600",children:s(a.timeSpent)}),G.jsx("td",{className:"px-4 py-2 text-gray-500",children:G.jsx(fJn,{stats:a.stats})}),G.jsx("td",{className:"px-4 py-2",children:a.solverInstance?G.jsxs("button",{onClick:()=>i(a),className:"flex items-center gap-1 text-blue-500 hover:text-blue-700",title:`Download input for ${a.name}`,children:[G.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:"w-4 h-4",children:G.jsx("path",{fillRule:"evenodd",d:"M12 2.25a.75.75 0 01.75.75v11.69l3.22-3.22a.75.75 0 111.06 1.06l-4.5 4.5a.75.75 0 01-1.06 0l-4.5-4.5a.75.75 0 111.06-1.06l3.22 3.22V3a.75.75 0 01.75-.75zm-9 13.5a.75.75 0 01.75.75v2.25a1.5 1.5 0 001.5 1.5h13.5a1.5 1.5 0 001.5-1.5V16.5a.75.75 0 011.5 0v2.25a3 3 0 01-3 3H5.25a3 3 0 01-3-3V16.5a.75.75 0 01.75-.75z",clipRule:"evenodd"})}),G.jsx("span",{children:"Input"})]}):null})]},a.name))})]})})]})},yJn=class extends cr.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t){console.error("InteractiveGraphics render error:",t)}render(){return this.state.hasError?this.props.fallback:this.props.children}};function bJn({graphics:t}){const e=t.points??[],n=t.lines??[],o=t.rects??[],r=t.circles??[],i=t.texts??[];let s=Number.POSITIVE_INFINITY,a=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY,l=Number.NEGATIVE_INFINITY;const u=(x,f)=>{typeof x=="number"&&(x<s&&(s=x),x>c&&(c=x)),typeof f=="number"&&(f<a&&(a=f),f>l&&(l=f))};for(const x of e)u(x.x,x.y);for(const x of n){const f=x.points??[];for(const g of f)u(g.x,g.y)}for(const x of o){const f=x.x??0,g=x.y??0,y=x.width??0,b=x.height??0;u(f,g),u(f+y,g+b)}for(const x of r){const f=x.x??0,g=x.y??0,y=x.radius??1;u(f-y,g-y),u(f+y,g+y)}for(const x of i)u(x.x,x.y);(!isFinite(s)||!isFinite(a)||!isFinite(c)||!isFinite(l))&&(s=-20,a=-20,c=20,l=20);const _=10,d=s-_,m=a-_,h=Math.max(1,c-s+2*_),p=Math.max(1,l-a+2*_);return G.jsxs("svg",{className:"w-full h-[400px] bg-white",viewBox:`${d} ${m} ${h} ${p}`,role:"img","aria-label":"Graphics fallback",children:[o.map((x,f)=>G.jsx("rect",{x:x.x??0,y:x.y??0,width:x.width??0,height:x.height??0,fill:"none",stroke:x.strokeColor??"black",strokeWidth:x.strokeWidth??1},`rect-${f}`)),n.map((x,f)=>G.jsx("polyline",{fill:"none",stroke:x.strokeColor??"black",strokeWidth:x.strokeWidth??1,points:(x.points??[]).map(g=>`${g.x??0},${g.y??0}`).join(" ")},`line-${f}`)),r.map((x,f)=>G.jsx("circle",{cx:x.x??0,cy:x.y??0,r:x.radius??1.5,fill:x.fillColor??"none",stroke:x.strokeColor??"black",strokeWidth:x.strokeWidth??1},`circle-${f}`)),e.map((x,f)=>G.jsx("circle",{cx:x.x??0,cy:x.y??0,r:x.radius??1.5,fill:x.color??"black"},`point-${f}`)),i.map((x,f)=>G.jsx("text",{x:x.x??0,y:x.y??0,fontSize:x.fontSize??10,fill:x.color??"black",children:x.text??""},`text-${f}`))]})}var PJn=({solver:t,animationSpeed:e=25,onSolverStarted:n,onSolverCompleted:o})=>{const[r,i]=Y.useReducer(u=>u+1,0),s=Y.useMemo(()=>{try{return t.visualize()||{points:[],lines:[],rects:[],circles:[]}}catch(u){return console.error("Visualization error:",u),{points:[],lines:[],rects:[],circles:[]}}},[t,r]),a=Y.useMemo(()=>(s.rects?.length||0)===0&&(s.lines?.length||0)===0&&(s.points?.length||0)===0&&(s.circles?.length||0)===0,[s]);Y.useEffect(()=>{if(!(typeof document>"u")&&!document.querySelector('script[src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"]')){const u=document.createElement("script");u.src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4",document.head.appendChild(u)}},[]);const c=t.pipelineDef!==void 0,l=u=>{const _=t;if(!t.solved&&!t.failed){for(;!t.solved&&!t.failed&&_.currentPipelineStepIndex<=_.pipelineDef.findIndex(d=>d.solverName===u);)t.step();i()}};return G.jsxs("div",{children:[G.jsx(uJn,{solver:t,triggerRender:i,animationSpeed:e,onSolverStarted:n,onSolverCompleted:o}),a?G.jsx("div",{className:"p-4 text-gray-500",children:"No Graphics Yet"}):G.jsx(yJn,{fallback:G.jsx(bJn,{graphics:s}),children:G.jsx(aJn,{graphics:s})}),c&&G.jsx(gJn,{solver:t,onStepUntilPhase:l})]})};const vJn=()=>{Y.useEffect(()=>{const t="tailwind-cdn-script";if(document.getElementById(t)||window.tailwind)return;const e=document.createElement("div");e.className="hidden",document.body.appendChild(e);const n=window.getComputedStyle(e).display==="none";if(document.body.removeChild(e),n)return;const o=document.createElement("script");o.id=t,o.src="https://cdn.tailwindcss.com",document.head.appendChild(o)},[])},SJn=t=>t.toLowerCase().includes("pack")?BDn:t.toLowerCase().includes("rout")?UDn:CDn,CJn=({solverEvents:t=[]})=>{const[e,n]=Y.useState(null);vJn();const o=Y.useMemo(()=>{const a=new Map;for(const c of t){const l=`${c.componentName}-${c.solverName}`;a.set(l,c)}return a},[t]),r=Y.useMemo(()=>Array.from(o.keys()),[o]),i=e?o.get(e):null,s=Y.useMemo(()=>{if(!i)return{instance:null,error:null,classFound:!1};const a=zie[i.solverName];if(!a)return{instance:null,error:`Solver class "${i.solverName}" not found in SOLVERS registry. Available: ${Object.keys(zie).join(", ")}`,classFound:!1};try{const c=i.solverParams,l=c?.input!==void 0?c.input:c;return{instance:new a(l),error:null,classFound:!0}}catch(c){const l=c instanceof Error?c.message:String(c);return console.error("Failed to reconstruct solver:",c),{instance:null,error:`Failed to instantiate solver: ${l}`,classFound:!0}}},[i]);return t.length===0?G.jsx("div",{className:"rf-p-4",children:G.jsx("div",{className:"rf-bg-gray-50 rf-rounded-md rf-border rf-border-gray-200",children:G.jsxs("div",{className:"rf-p-4",children:[G.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-gray-800 rf-mb-3",children:"No Solvers Detected"}),G.jsx("p",{className:"rf-text-sm rf-text-gray-600",children:"Solvers will appear here when the circuit runs. Solvers are used for tasks like component packing and autorouting."})]})})}):G.jsxs("div",{className:"rf-flex rf-h-full rf-overflow-hidden",children:[G.jsxs("div",{className:"rf-w-64 rf-border-r rf-border-gray-200 rf-overflow-y-auto rf-flex-shrink-0",children:[G.jsxs("div",{className:"rf-text-xs rf-font-semibold rf-text-gray-500 rf-px-3 rf-py-2 rf-bg-gray-50 rf-border-b rf-border-gray-200",children:[r.length," ",r.length===1?"Solver":"Solvers"]}),r.map(a=>{const c=o.get(a),l=e===a;return G.jsx("div",{className:`rf-px-3 rf-py-2 rf-cursor-pointer rf-border-b rf-border-gray-100 ${l?"rf-bg-blue-50 rf-border-l-2 rf-border-l-blue-500":"hover:rf-bg-gray-50"}`,onClick:()=>n(a),children:(()=>{const u=SJn(c.solverName);return G.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[G.jsx(u,{className:"rf-w-4 rf-h-4 rf-text-blue-500 rf-flex-shrink-0"}),G.jsxs("div",{className:"rf-flex-1 rf-min-w-0",children:[G.jsx("div",{className:"rf-text-sm rf-font-medium rf-text-gray-800 rf-truncate",children:c.componentName}),G.jsx("div",{className:"rf-text-xs rf-text-gray-500 rf-truncate",children:c.solverName})]})]})})()},a)})]}),G.jsx("div",{className:"rf-flex-1 rf-overflow-hidden",children:i?s.instance?G.jsx(M5,{fallback:G.jsx("div",{className:"rf-p-4",children:G.jsxs("div",{className:"rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200 rf-p-4",children:[G.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-2",children:"Error Loading Solver Debugger"}),G.jsxs("p",{className:"rf-text-sm rf-text-red-600",children:["Failed to render the solver debugger for"," ",i.solverName]})]})}),children:G.jsx(PJn,{solver:s.instance})}):G.jsxs("div",{className:"rf-p-4",children:[G.jsxs("div",{className:"rf-mb-4",children:[G.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-gray-800",children:i.solverName}),G.jsxs("p",{className:"rf-text-sm rf-text-gray-500",children:["Component: ",i.componentName]})]}),s.error&&G.jsx("div",{className:`rf-rounded-md rf-border rf-p-4 rf-mb-4 ${s.classFound?"rf-bg-red-50 rf-border-red-200":"rf-bg-yellow-50 rf-border-yellow-200"}`,children:G.jsx("p",{className:`rf-text-sm ${s.classFound?"rf-text-red-700":"rf-text-yellow-700"}`,children:s.error})}),G.jsxs("div",{className:"rf-border rf-border-gray-200 rf-rounded-md rf-overflow-hidden",children:[G.jsx("div",{className:"rf-px-3 rf-py-2 rf-bg-gray-50",children:G.jsx("span",{className:"rf-text-sm rf-font-medium rf-text-gray-700",children:"Solver Parameters"})}),G.jsx("div",{className:"rf-p-3 rf-bg-white rf-border-t rf-border-gray-200",children:G.jsx("pre",{className:"rf-text-xs rf-font-mono rf-text-gray-600 rf-whitespace-pre-wrap rf-overflow-x-auto",children:JSON.stringify(i.solverParams,null,2)})})]})]}):G.jsx("div",{className:"rf-flex rf-items-center rf-justify-center rf-h-full",children:G.jsx("p",{className:"rf-text-sm rf-text-gray-500",children:"Select a solver from the list to view details"})})})]})},Adt=({errorMessage:t,errorStack:e,circuitJsonErrors:n})=>{Y.useEffect(()=>{if(t){const o=new Error(t);e&&(o.stack=e);try{EW.captureException(o)}catch{}}},[t,e]),Y.useEffect(()=>{if(n&&n.length>0)for(const o of n){const r=new Error(o.message||"Circuit JSON Error");o.stack&&(r.stack=o.stack);try{EW.captureException(r,{error_type:o.type})}catch{}}},[n])},Rdt="0.0.1841",MJn={version:Rdt},yY=OIe()(FIe(t=>({lastRunEvalVersion:void 0,setLastRunEvalVersion:e=>{t({lastRunEvalVersion:e})}}),{name:"runframe-runner-store"})),TJn=t=>{const[e,n]=Y.useState([]),[o,r]=Y.useState(null),[i,s]=Y.useState(""),[a,c]=RT("eval-version-selection",null),l=yY(m=>m.setLastRunEvalVersion),u=yY(m=>m.lastRunEvalVersion);return Y.useEffect(()=>{t&&fetch("https://data.jsdelivr.com/v1/package/npm/@tscircuit/eval").then(m=>m.json()).then(m=>{if(Array.isArray(m?.versions)){let h=[...m.versions];m.tags?.latest&&(r(m.tags.latest),h=h.filter(p=>p!==m.tags.latest)),n(h)}}).catch(()=>{})},[t]),Y.useEffect(()=>{t&&(a?(window.TSCIRCUIT_LATEST_EVAL_VERSION=a,l(a)):o&&(window.TSCIRCUIT_LATEST_EVAL_VERSION=o,l(o)))},[t,a,o]),{versions:Y.useMemo(()=>e.filter(m=>m.includes(i)).slice(0,50),[e,i]),latestVersion:o,lastRunEvalVersion:u,search:i,setSearch:s,selectVersion:m=>{c(m),s("")}}},wJn=({snippetNames:t,onSelect:e,onCancel:n,isOpen:o})=>{const[r,i]=Y.useState(""),[s,a]=Y.useState("");if(!o)return null;const c=t.filter(_=>_.toLowerCase().includes(s.toLowerCase())),l=s&&!t.includes(s),u=_=>{_.key==="Enter"&&(c.length===1?i(c[0]):l&&i(s))};return G.jsx("div",{className:"rf-fixed rf-inset-0 rf-bg-black rf-bg-opacity-50 rf-flex rf-items-center rf-justify-center rf-z-[100]",children:G.jsxs("div",{className:"rf-bg-white rf-rounded-lg rf-p-6 rf-w-96",children:[G.jsx("h2",{className:"rf-text-lg rf-font-semibold rf-mb-4",children:"Select Snippet"}),G.jsx("input",{type:"text",className:"rf-w-full rf-px-4 rf-py-2 rf-border rf-rounded rf-mb-4",placeholder:"Search snippets or new snippet name...",value:s,onChange:_=>a(_.target.value),onKeyDown:u}),G.jsxs("div",{className:"rf-h-60 rf-overflow-y-auto",children:[c.map(_=>G.jsx("button",{type:"button",className:`w-full text-left px-4 py-2 rounded hover:bg-gray-100 ${r===_?"bg-blue-50":""}`,onClick:()=>i(_),children:_},_)),l&&G.jsxs("button",{type:"button",className:`w-full text-left px-4 py-2 rounded hover:bg-gray-100 text-blue-500 ${r===s?"bg-blue-50":""}`,onClick:()=>i(s),children:['Create new "',s,'"']})]}),G.jsxs("div",{className:"rf-mt-4 rf-flex rf-justify-end rf-gap-2",children:[G.jsx("button",{type:"button",className:"rf-px-4 rf-py-2 rf-text-gray-600 rf-hover:text-gray-800",onClick:n,children:"Cancel"}),G.jsx("button",{type:"button",className:"rf-px-4 rf-py-2 rf-bg-blue-500 rf-text-white rf-rounded rf-hover:bg-blue-600 rf-disabled:opacity-50",onClick:()=>r&&e(r),disabled:!r,children:r===s?`Create "${r}"`:`Save to ${r}`})]})]})})},EJn=t=>{const e=Y.useRef(null),n=eu(o=>o.recentEvents);Y.useEffect(()=>{if(n.length===0)return;const o=n[0];o.event_id!==e.current&&(t(o),e.current=o.event_id)},[n,t])};function DJn(t){const e=AJn(t),n=Y.forwardRef((o,r)=>{const{children:i,...s}=o,a=Y.Children.toArray(i),c=a.find(kJn);if(c){const l=c.props.children,u=a.map(_=>_===c?Y.Children.count(l)>1?Y.Children.only(null):Y.isValidElement(l)?l.props.children:null:_);return G.jsx(e,{...s,ref:r,children:Y.isValidElement(l)?Y.cloneElement(l,void 0,u):null})}return G.jsx(e,{...s,ref:r,children:i})});return n.displayName=`${t}.Slot`,n}function AJn(t){const e=Y.forwardRef((n,o)=>{const{children:r,...i}=n;if(Y.isValidElement(r)){const s=HJn(r),a=NJn(i,r.props);return r.type!==Y.Fragment&&(a.ref=o?Rx(o,s):s),Y.cloneElement(r,a)}return Y.Children.count(r)>1?Y.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var RJn=Symbol("radix.slottable");function kJn(t){return Y.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===RJn}function NJn(t,e){const n={...e};for(const o in e){const r=t[o],i=e[o];/^on[A-Z]/.test(o)?r&&i?n[o]=(...a)=>{const c=i(...a);return r(...a),c}:r&&(n[o]=r):o==="style"?n[o]={...r,...i}:o==="className"&&(n[o]=[r,i].filter(Boolean).join(" "))}return{...t,...n}}function HJn(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var bY="Dialog",[kdt,Ndt]=d4(bY),[IJn,B4]=kdt(bY),Hdt=t=>{const{__scopeDialog:e,children:n,open:o,defaultOpen:r,onOpenChange:i,modal:s=!0}=t,a=Y.useRef(null),c=Y.useRef(null),[l,u]=DP({prop:o,defaultProp:r??!1,onChange:i,caller:bY});return G.jsx(IJn,{scope:e,triggerRef:a,contentRef:c,contentId:Jp(),titleId:Jp(),descriptionId:Jp(),open:l,onOpenChange:u,onOpenToggle:Y.useCallback(()=>u(_=>!_),[u]),modal:s,children:n})};Hdt.displayName=bY;var Idt="DialogTrigger",Ldt=Y.forwardRef((t,e)=>{const{__scopeDialog:n,...o}=t,r=B4(Idt,n),i=tu(e,r.triggerRef);return G.jsx(Cc.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":kye(r.open),...o,ref:i,onClick:Vr(t.onClick,r.onOpenToggle)})});Ldt.displayName=Idt;var Aye="DialogPortal",[LJn,Odt]=kdt(Aye,{forceMount:void 0}),Fdt=t=>{const{__scopeDialog:e,forceMount:n,children:o,container:r}=t,i=B4(Aye,e);return G.jsx(LJn,{scope:e,forceMount:n,children:Y.Children.map(o,s=>G.jsx(Fg,{present:n||i.open,children:G.jsx(Lj,{asChild:!0,container:r,children:s})}))})};Fdt.displayName=Aye;var PY="DialogOverlay",Bdt=Y.forwardRef((t,e)=>{const n=Odt(PY,t.__scopeDialog),{forceMount:o=n.forceMount,...r}=t,i=B4(PY,t.__scopeDialog);return i.modal?G.jsx(Fg,{present:o||i.open,children:G.jsx(FJn,{...r,ref:e})}):null});Bdt.displayName=PY;var OJn=DJn("DialogOverlay.RemoveScroll"),FJn=Y.forwardRef((t,e)=>{const{__scopeDialog:n,...o}=t,r=B4(PY,n);return G.jsx(Uj,{as:OJn,allowPinchZoom:!0,shards:[r.contentRef],children:G.jsx(Cc.div,{"data-state":kye(r.open),...o,ref:e,style:{pointerEvents:"auto",...o.style}})})}),Z8="DialogContent",zdt=Y.forwardRef((t,e)=>{const n=Odt(Z8,t.__scopeDialog),{forceMount:o=n.forceMount,...r}=t,i=B4(Z8,t.__scopeDialog);return G.jsx(Fg,{present:o||i.open,children:i.modal?G.jsx(BJn,{...r,ref:e}):G.jsx(zJn,{...r,ref:e})})});zdt.displayName=Z8;var BJn=Y.forwardRef((t,e)=>{const n=B4(Z8,t.__scopeDialog),o=Y.useRef(null),r=tu(e,n.contentRef,o);return Y.useEffect(()=>{const i=o.current;if(i)return Y2e(i)},[]),G.jsx(Vdt,{...t,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Vr(t.onCloseAutoFocus,i=>{i.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Vr(t.onPointerDownOutside,i=>{const s=i.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&i.preventDefault()}),onFocusOutside:Vr(t.onFocusOutside,i=>i.preventDefault())})}),zJn=Y.forwardRef((t,e)=>{const n=B4(Z8,t.__scopeDialog),o=Y.useRef(!1),r=Y.useRef(!1);return G.jsx(Vdt,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{t.onCloseAutoFocus?.(i),i.defaultPrevented||(o.current||n.triggerRef.current?.focus(),i.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:i=>{t.onInteractOutside?.(i),i.defaultPrevented||(o.current=!0,i.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const s=i.target;n.triggerRef.current?.contains(s)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&r.current&&i.preventDefault()}})}),Vdt=Y.forwardRef((t,e)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:i,...s}=t,a=B4(Z8,n),c=Y.useRef(null),l=tu(e,c);return D2e(),G.jsxs(G.Fragment,{children:[G.jsx(Sj,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:i,children:G.jsx(ZN,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":kye(a.open),...s,ref:l,onDismiss:()=>a.onOpenChange(!1)})}),G.jsxs(G.Fragment,{children:[G.jsx($Jn,{titleId:a.titleId}),G.jsx(UJn,{contentRef:c,descriptionId:a.descriptionId})]})]})}),Rye="DialogTitle",$dt=Y.forwardRef((t,e)=>{const{__scopeDialog:n,...o}=t,r=B4(Rye,n);return G.jsx(Cc.h2,{id:r.titleId,...o,ref:e})});$dt.displayName=Rye;var Wdt="DialogDescription",Udt=Y.forwardRef((t,e)=>{const{__scopeDialog:n,...o}=t,r=B4(Wdt,n);return G.jsx(Cc.p,{id:r.descriptionId,...o,ref:e})});Udt.displayName=Wdt;var Xdt="DialogClose",jdt=Y.forwardRef((t,e)=>{const{__scopeDialog:n,...o}=t,r=B4(Xdt,n);return G.jsx(Cc.button,{type:"button",...o,ref:e,onClick:Vr(t.onClick,()=>r.onOpenChange(!1))})});jdt.displayName=Xdt;function kye(t){return t?"open":"closed"}var Gdt="DialogTitleWarning",[VJn,Ydt]=EZt(Gdt,{contentName:Z8,titleName:Rye,docsSlug:"dialog"}),$Jn=({titleId:t})=>{const e=Ydt(Gdt),n=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
|
|
5690
5690
|
|
|
5691
5691
|
If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
5692
5692
|
|
|
@@ -5782,6 +5782,6 @@ Please report this to https://github.com/markedjs/marked.`,t){const o="<p>An err
|
|
|
5782
5782
|
rf-max-h-[90vh] rf-overflow-y-auto
|
|
5783
5783
|
`,children:G.jsx("div",{className:"rf-relative rf-w-full",children:n==="initial"&&G.jsx(zeo,{onCancel:e,packageReleaseId:i??"",signIn:s??(()=>{}),isLoggedIn:a})})})})}),jeo=({isOpen:t,onClose:e,stage:n,setStage:o,signIn:r,isLoggedIn:i})=>{const s=eu(a=>a.circuitJson);return G.jsx(Xeo,{signIn:r,isOpen:t,onClose:e,stage:n,setStage:o,circuitJson:s,isLoggedIn:i??!1})},Geo=()=>{const[t,e]=Y.useState(!1),[n,o]=Y.useState("initial");return{isOpen:t,stage:n,open:()=>e(!0),close:()=>{e(!1),o("initial")},setStage:o,OrderDialog:jeo}};async function Fmt(){const t=await fetch(`${Ax}/files/list`),{file_list:e}=await t.json(),n=new Map;for(const o of e){const i=await(await fetch(`${Ax}/files/get?file_path=${encodeURIComponent(o.file_path)}`)).json();(i.file?.text_content||i.file?.binary_content_b64)&&n.set(o.file_path,{text_content:i.file.text_content,binary_content_b64:i.file.binary_content_b64})}return n}const Yeo="https://api.tscircuit.com/bug_reports/view?bug_report_id=",qeo=t=>`${Yeo}${t}`,Jeo=t=>{const[e,n]=Y.useState(!1),[o,r]=Y.useState(!1),[i,s]=Y.useState(null),[a,c]=Y.useState(null),[l,u]=Y.useState([]),_=Y.useRef(null),[d,m]=Y.useState(null),[h,p]=Y.useState(0),x=t?.onLoginRequired,f=Y.useMemo(()=>NY()?!0:typeof document>"u"?!1:document.cookie.split(";").some(S=>S.trim().startsWith("session=")),[e]);Y.useEffect(()=>{if(e&&!d&&_.current){const S=typeof window<"u"?window.__TSCIRCUIT_LAST_EXECUTION_ERROR:void 0;S&&(_.current.value=`I'm getting this execution error:
|
|
5784
5784
|
|
|
5785
|
-
${S}`)}},[e,d]),Y.useEffect(()=>{e&&!d&&Fmt().then(S=>{p(S.size)}).catch(S=>{console.error("Failed to fetch file count",S),p(0)})},[e,d]);const g=Y.useCallback(()=>{s(null),m(null),c(null),u([]),_.current&&(_.current.value=""),n(!0)},[]),y=Y.useCallback(()=>{n(!1)},[]),b=Y.useCallback(async()=>{r(!0),s(null),c(null),u([]);const S=Xv(),M=_.current?.value||"";try{const w=await Fmt();if(w.size===0){ds.error("No project files available to include in the bug report"),r(!1);return}const D=new Date(Date.now()+1440*60*1e3).toISOString(),I=(await S.post("bug_reports/create",{json:{text:M.trim()||void 0,is_auto_deleted:!0,delete_at:D}}).json()).bug_report.bug_report_id,H=Array.from(w.entries()),O=[];for(let V=0;V<H.length;V++){const[j,q]=H[V];c({current:V+1,total:H.length,currentFile:j});try{const K={bug_report_id:I,file_path:j};q.text_content&&(K.content_text=q.text_content),q.binary_content_b64&&(K.content_base64=q.binary_content_b64),await S.post("bug_reports/upload_file",{json:K})}catch(K){const ne=K instanceof Uv?`HTTP ${K.response.status}`:K instanceof Error?K.message:"Upload failed";O.push({filePath:j,message:ne}),u([...O])}}c(null);const z=qeo(I);m({bugReportUrl:z})}catch(w){if(console.error("Failed to submit bug report",w),w instanceof Uv)if(w.response.status===401)if(f){const D="Your session has expired. Please sign in again to continue.";s(D),ds.error(D),x&&(y(),x())}else{const D="You must be logged in to report a bug. Please sign in via cli and try again.";s(D),ds.error(D),setTimeout(()=>{x&&(y(),x())},1e3)}else{const D=`Failed to submit bug report (${w.response.status})`;s(D),ds.error(D)}else if(w instanceof Error)s(w.message),ds.error(w.message);else{const D="Failed to submit bug report";s(D),ds.error(D)}}finally{r(!1)}},[f,x]);return{BugReportDialog:Y.useMemo(()=>{const S=a?Math.round(a.current/a.total*100):0;return G.jsx(mht,{open:e,onOpenChange:M=>{M?(s(null),m(null),c(null),u([]),n(!0)):o||y()},children:G.jsxs(Oye,{children:[G.jsxs(Fye,{children:[G.jsx(zye,{children:d?"Bug Report Created":"Report Bug"}),G.jsx(Vye,{asChild:!0,children:d?G.jsxs("div",{className:"rf-text-left rf-space-y-3 rf-text-sm",children:[G.jsx("p",{children:"Bug report created successfully."}),l.length>0&&G.jsxs("div",{className:"rf-bg-red-50 rf-border rf-border-red-200 rf-rounded rf-p-2 rf-max-h-28 rf-overflow-y-auto rf-overflow-x-hidden",children:[G.jsxs("p",{className:"rf-text-red-700 rf-font-medium rf-text-xs rf-mb-1",children:[l.length," file(s) failed:"]}),l.map((M,w)=>G.jsxs("div",{className:"rf-text-red-600 rf-text-xs rf-mb-0.5",title:`${M.filePath}: ${M.message}`,children:[G.jsx("span",{className:"rf-font-medium rf-break-all",children:M.filePath.split("/").pop()}),G.jsx("span",{className:"rf-text-red-500 rf-block rf-truncate",children:M.message})]},w))]}),G.jsx("div",{children:G.jsx("a",{className:"rf-text-blue-600 hover:rf-underline",href:d.bugReportUrl,target:"_blank",rel:"noreferrer",children:"View bug report"})}),G.jsxs("p",{children:["Please share this link privately with tscircuit staff so we can help debug. Join the",G.jsx("a",{className:"rf-ml-1 rf-text-blue-600 hover:rf-underline",href:"https://tscircuit.com/join",target:"_blank",rel:"noreferrer",children:"tscircuit Discord"}),"."]})]}):G.jsx("div",{className:"rf-text-left rf-space-y-3 rf-text-sm",children:a?G.jsxs("div",{className:"rf-space-y-2 rf-overflow-hidden",children:[G.jsxs("div",{className:"rf-flex rf-justify-between rf-text-xs",children:[G.jsx("span",{children:"Uploading files..."}),G.jsxs("span",{children:[a.current,"/",a.total]})]}),G.jsx("div",{className:"rf-w-full rf-h-2 rf-bg-gray-200 rf-rounded-full rf-overflow-hidden",children:G.jsx("div",{className:"rf-h-full rf-bg-blue-500 rf-transition-all rf-duration-150",style:{width:`${S}%`}})}),G.jsx("p",{className:"rf-text-xs rf-text-gray-500 rf-break-all rf-truncate rf-w-full rf-max-w-full",children:`${a.currentFile.slice(0,60)}${a.currentFile.length>60?"...":""}`}),l.length>0&&G.jsx("div",{className:"rf-bg-red-50 rf-border rf-border-red-200 rf-rounded rf-p-2 rf-max-h-20 rf-overflow-y-auto rf-overflow-x-hidden",children:l.map((M,w)=>G.jsxs("div",{className:"rf-text-red-600 rf-text-xs rf-mb-0.5",title:`${M.filePath}: ${M.message}`,children:[G.jsx("span",{className:"rf-font-medium rf-break-all",children:M.filePath.split("/").pop()}),G.jsx("span",{className:"rf-text-red-500 rf-block rf-truncate",children:M.message})]},w))})]}):G.jsxs(G.Fragment,{children:[G.jsxs("p",{children:["Reporting a bug will upload your entire project",h>0?` (${h} file${h===1?"":"s"})`:""," ","to tscircuit support."]}),G.jsxs("div",{className:"rf-space-y-2",children:[G.jsx("label",{htmlFor:"bug-description",className:"rf-block rf-font-medium",children:"Description (optional)"}),G.jsx("textarea",{ref:_,id:"bug-description",className:"rf-w-full rf-min-h-[100px] rf-px-3 rf-py-2 rf-text-sm rf-border rf-border-gray-300 rf-rounded-md focus:rf-outline-none focus:rf-ring-2 focus:rf-ring-blue-500",placeholder:"Describe the issue you're experiencing...",disabled:o})]}),G.jsxs("p",{children:["Share the generated bug report link privately with tscircuit staff so we can help debug your issue. You can also reach out on our",G.jsx("a",{className:"rf-ml-1 rf-text-blue-600 hover:rf-underline",href:"https://tscircuit.com/join",target:"_blank",rel:"noreferrer",children:"Discord community"}),"."]}),!f&&G.jsx("p",{className:"rf-text-red-600",children:"You appear to be logged out. Please log in before reporting a bug or the upload will fail."}),i&&G.jsx("p",{className:"rf-text-red-600",children:i})]})})})]}),G.jsx(Bye,{children:d?G.jsx("button",{type:"button",className:fE(),onClick:()=>{y()},children:"Close"}):G.jsxs(G.Fragment,{children:[G.jsx($ye,{disabled:o,onClick:()=>{o||y()},children:"Cancel"}),!f&&x?G.jsx("button",{type:"button",className:fE(),onClick:M=>{M.preventDefault(),y(),x()},children:"Sign In"}):G.jsx("button",{type:"button",className:h4(fE(),o&&"rf-opacity-70 rf-cursor-not-allowed"),disabled:o,onClick:M=>{M.preventDefault(),b()},children:o?"Reporting...":"Upload & Report"})]})})]})},"bug-report-dialog")},[e,o,y,i,d,h,f,b,x,a,l]),openBugReportDialog:g}};function Keo({open:t,onOpenChange:e,onExport:n}){const[o,r]=Y.useState(!1),i=()=>{n({includeSilkscreen:o}),e(!1)},s=()=>{e(!1)};return G.jsx(QE,{open:t,onOpenChange:e,children:G.jsxs(eC,{children:[G.jsxs(tC,{children:[G.jsx(nC,{children:"LightBurn Export Options"}),G.jsx(ZE,{children:"Configure export settings for PCB laser ablation with LightBurn"})]}),G.jsx("div",{className:"rf-flex rf-flex-col rf-gap-4 rf-py-4",children:G.jsxs("div",{className:"rf-flex rf-items-center rf-space-x-2",children:[G.jsx(cI,{id:"includeSilkscreen",checked:o,onCheckedChange:a=>r(a===!0)}),G.jsx("label",{htmlFor:"includeSilkscreen",className:"rf-text-xs rf-font-medium rf-leading-none peer-disabled:rf-cursor-not-allowed peer-disabled:rf-opacity-70",children:"Include silkscreen layer"})]})}),G.jsxs(lI,{children:[G.jsx(dc,{variant:"outline",onClick:s,children:"Cancel"}),G.jsx(dc,{onClick:i,children:"Export"})]})]})})}const Qeo=/#(\d+)/,Zeo=t=>{const e=t.match(Qeo);if(!e)return null;const n=Number.parseInt(e[1],10);return Number.isFinite(n)?n:null},eto=t=>{if(typeof t=="number")return Number.isFinite(t)?t:null;if(typeof t=="string"){const e=new Date(t).getTime();return Number.isFinite(e)?e:null}return null},tto=t=>{if(!t)return null;let e=null,n=-1,o=-1;for(const[r,i]of Object.entries(t)){const s=Zeo(r),a=eto(i.createdAt);if(s!==null){s>n&&(n=s,e={key:r,value:i});continue}if(n===-1){if(a!==null&&a>o){o=a,e={key:r,value:i};continue}e||(e={key:r,value:i})}}return e},bI=t=>{const e=yY(De=>De.lastRunEvalVersion),n=eu(De=>De.currentMainComponentPath),[o,r]=Y.useState(null),[i,s]=Y.useState(!1),[a,c]=Y.useState(!0),[l,u]=Y.useState(!1),[_,d]=Y.useState(null),[m,h]=Y.useState(null),[p,x]=Y.useState(!1),[f,g]=Y.useState(null),[y,b]=Y.useState(null),[v,S]=Y.useState(!1),[M,w]=Y.useState(!1),[D,A]=Y.useState(!1),[I,H]=Y.useState(null),O=Geo(),z=eu(De=>De.pushEvent),V=eu(De=>De.recentEvents),j=Y.useMemo(()=>Date.now(),[]);EJn(De=>{if(!(new Date(De.created_at).valueOf()<j+500)){if(De.event_type==="FILE_UPDATED"){s(!0);return}if(De.event_type==="SNIPPET_SAVED"){s(!1),c(!1),g("Snippet saved successfully."),S(!1);return}De.event_type==="REQUEST_EXPORT"&&(w(!0),g("Export processing..."),S(!1)),De.event_type==="EXPORT_CREATED"&&(g(`Export created: ${De.exportFilePath}`),S(!1),w(!1))}}),Y.useEffect(()=>{if(!l||_===null)return;const De=V.filter(xe=>new Date(xe.created_at).valueOf()>_),pe=De.find(xe=>xe.event_type==="FAILED_TO_SAVE_SNIPPET"),Me=De.find(xe=>xe.event_type==="SNIPPET_SAVED");pe&&(u(!1),d(null),b(pe.message??"Failed to save snippet. See console for error."),console.error(pe.message),S(!0),pe.error_code==="SNIPPET_UNSET"&&pe.available_snippet_names&&(h(pe.available_snippet_names),x(!0))),Me&&(u(!1),d(null),g("Snippet saved successfully."),S(!1))},[V,l]);const q=async()=>{u(!0),d(Date.now()),g(null),S(!1),await z({event_type:"REQUEST_TO_SAVE_SNIPPET",snippet_name:o})},ne=eu(De=>De.circuitJson)??t.circuitJson,[ce,ee]=Y.useState(!1),[oe,ie]=Y.useState(!1),{BugReportDialog:ae,openBugReportDialog:de}=Jeo({onLoginRequired:t.onLoginRequired}),be=async De=>{I&&(await Ght({circuitJson:I.circuitJson,projectName:I.projectName,options:De}),H(null))},Ce=Y.useMemo(()=>tto(t.autoroutingLog),[t.autoroutingLog]);return G.jsxs(G.Fragment,{children:[G.jsxs("div",{className:"rf-flex rf-items-center rf-gap-1 rf-flex-shrink-0",children:[G.jsxs(qj,{children:[G.jsx(Jj,{asChild:!0,children:G.jsx("div",{className:"rf-whitespace-nowrap rf-text-xs font-medium rf-p-2 rf-mx-1 rf-cursor-pointer rf-relative",children:"File"})}),G.jsxs(uH,{className:"rf-z-[101]",children:[!t.isWebEmbedded&&G.jsxs(G.Fragment,{children:[G.jsx(Md,{className:"rf-text-xs",onSelect:q,disabled:l,children:l?"Saving...":"Push"}),parseInt(window.location.port)>5e3&&G.jsx(Md,{className:"rf-text-xs",onSelect:()=>{O.open()},children:"Order"}),G.jsx(Md,{className:"rf-text-xs",onSelect:()=>ee(!0),disabled:l,children:"Import"}),G.jsx(Md,{className:"rf-text-xs",onSelect:()=>{if(!NY()){ds.error("Requires tscircuit token");return}ie(!0)},children:"AI Review"})]}),!t.isWebEmbedded&&t.onLoginRequired&&G.jsx(Md,{className:"rf-text-xs",onSelect:()=>{t.onLoginRequired?.()},children:"Sign In"}),!t.isWebEmbedded&&G.jsxs(lH,{children:[G.jsx(wE,{className:"rf-text-xs",children:"Report Bug"}),G.jsx(cH,{children:G.jsxs(EE,{children:[G.jsx(Md,{className:"rf-text-xs",onSelect:()=>{de()},children:"Report Entire Circuit"}),G.jsx(Md,{className:"rf-text-xs",disabled:!Ce||!t.onReportAutoroutingLog,onSelect:()=>{!Ce||!t.onReportAutoroutingLog||t.onReportAutoroutingLog(Ce.key,{simpleRouteJson:Ce.value.simpleRouteJson})},children:"Report Autorouter Bug"})]})})]}),G.jsxs(lH,{children:[G.jsx(wE,{className:"rf-text-xs",disabled:M,children:M?"Exporting...":"Export"}),G.jsx(cH,{children:G.jsx(EE,{children:YQn.map((De,pe)=>G.jsx(Md,{onSelect:()=>{if(!ne){ds.error("No Circuit JSON to export");return}let Me="Untitled";if(n){const We=n.split("/").pop();We&&(Me=We.replace(/\.[^.]+$/,""))}const xe=t.projectName??o??Me;if(De.name==="LightBurn"){H({circuitJson:ne,projectName:xe}),A(!0);return}qQn({exportName:De.name,circuitJson:ne,projectName:xe?.replace(/\.(board|circuit)$/,"")})},disabled:M,children:G.jsx("span",{className:"rf-text-xs",children:De.name})},pe))})})]}),!t.isWebEmbedded&&G.jsxs(lH,{children:[G.jsx(wE,{className:"rf-text-xs",children:"Advanced"}),G.jsx(cH,{children:G.jsxs(EE,{children:[G.jsx(Md,{className:"rf-flex rf-items-center rf-gap-2",children:G.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[G.jsx(cI,{id:"load-latest-eval",checked:t.shouldLoadLatestEval,onCheckedChange:De=>{t.onChangeShouldLoadLatestEval?.(De===!0)}}),G.jsx("label",{htmlFor:"load-latest-eval",className:"rf-text-xs rf-cursor-pointer",children:"Force Latest @tscircuit/eval"})]})}),e&&G.jsx(Md,{className:"rf-flex rf-items-center rf-gap-2",children:G.jsx("div",{className:"rf-flex rf-items-center rf-gap-2",children:G.jsxs("span",{className:"rf-text-xs",children:["@tscircuit/eval@",e]})})}),G.jsx(Md,{className:"rf-flex rf-items-center rf-gap-2",children:G.jsx("div",{className:"rf-flex rf-items-center rf-gap-2",children:G.jsxs("span",{className:"rf-text-xs",children:["@tscircuit/runframe@",MJn.version]})})}),G.jsx(Md,{className:"rf-flex rf-items-center rf-gap-2",onClick:()=>{window.open("/api/admin","_blank")},children:G.jsx("div",{className:"rf-flex rf-items-center rf-gap-2",children:G.jsx("span",{className:"rf-text-xs",children:"CLI Admin Panel"})})})]})})]})]}),G.jsx(mht,{open:v,onOpenChange:S,children:G.jsxs(Oye,{children:[G.jsxs(Fye,{children:[G.jsx(zye,{children:"Error Saving Snippet"}),G.jsx(Vye,{children:y})]}),G.jsx(Bye,{children:G.jsx($ye,{onClick:()=>S(!1),children:"Dismiss"})})]})}),G.jsx(wJn,{snippetNames:m??[],onSelect:async De=>{u(!0),d(Date.now()),r(De),await z({event_type:"REQUEST_TO_SAVE_SNIPPET",snippet_name:De}),x(!1)},onCancel:()=>x(!1),isOpen:p})]}),G.jsxs(qj,{children:[G.jsx(Jj,{asChild:!0,children:G.jsx("div",{className:"rf-whitespace-nowrap rf-text-xs font-medium rf-p-2 rf-mx-1 rf-cursor-pointer rf-relative",children:"View"})}),G.jsx(uH,{className:"rf-z-[104]",children:G.jsxs(lH,{children:[G.jsx(wE,{className:"rf-text-xs",children:"Schematic"}),G.jsx(cH,{children:G.jsxs(EE,{children:[G.jsx(Md,{className:"rf-flex rf-items-center rf-gap-2",onSelect:De=>De.preventDefault(),children:G.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[G.jsx(cI,{id:"show-schematic-ports",checked:t.showSchematicPorts,onCheckedChange:De=>{t.onChangeShowSchematicPorts?.(De===!0)}}),G.jsx("label",{htmlFor:"show-schematic-ports",className:"rf-text-xs rf-cursor-pointer",children:"Show Schematic Ports"})]})}),G.jsx(Md,{className:"rf-flex rf-items-center rf-gap-2",onSelect:De=>De.preventDefault(),children:G.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[G.jsx(cI,{id:"show-schematic-grid",checked:t.showSchematicDebugGrid,onCheckedChange:De=>{t.onChangeShowSchematicDebugGrid?.(De===!0)}}),G.jsx("label",{htmlFor:"show-schematic-grid",className:"rf-text-xs rf-cursor-pointer",children:"Show Schematic Grid"})]})})]})})]})})]})]}),ae,G.jsx(Keo,{open:D,onOpenChange:A,onExport:be}),G.jsx(Bht,{isOpen:ce,onClose:()=>ee(!1)}),G.jsx(oeo,{isOpen:oe,onClose:()=>ie(!1),packageName:o}),G.jsx(QKe,{position:"top-center",reverseOrder:!1,containerStyle:{zIndex:1e5},toastOptions:{className:"rf-break-all",style:{zIndex:1e5}}}),G.jsx(O.OrderDialog,{isOpen:O.isOpen,onClose:O.close,stage:O.stage,setStage:O.setStage})]})},nto=["assembly","pinout","analog_simulation","bom","circuit_json","errors","render_log","solvers"],Bmt=({code:t,fsMap:e,onRunClicked:n=void 0,errorMessage:o,errorStack:r,circuitJson:i,autoroutingGraphics:s,showRightHeaderContent:a=!0,showCodeTab:c=!1,codeTabContent:l,showJsonTab:u=!0,showRenderLogTab:_=!0,onActiveTabChange:d,renderLog:m,showImportAndFormatButtons:h=!0,className:p,headerClassName:x,leftHeaderContent:f,readOnly:g,isStreaming:y,autoroutingLog:b,onReportAutoroutingLog:v,isRunningCode:S,hasCodeChangedSinceLastRun:M,onEditEvent:w,editEvents:D,defaultActiveTab:A,defaultTab:I,availableTabs:H,autoRotate3dViewerDisabled:O,showSchematicDebugGrid:z=!1,showSchematicPorts:V=!1,onChangeShowSchematicDebugGrid:j,onChangeShowSchematicPorts:q,showToggleFullScreen:K=!0,defaultToFullScreen:ne=!1,activeEffectName:ce,allowSelectingVersion:ee=!0,showFileMenu:oe=!1,isWebEmbedded:ie=!1,projectName:ae,onRerunWithDebug:de,solverEvents:be})=>{fY();const{versions:Ce,latestVersion:De,lastRunEvalVersion:pe,search:Me,setSearch:xe,selectVersion:We}=TJn(ee),Xe=Y.useMemo(()=>i?i.filter(Dt=>Dt&&"error_type"in Dt||Dt.type.includes("error")):null,[i]),Je=Y.useMemo(()=>i?i.filter(Dt=>Dt&&"warning_type"in Dt||Dt.type.includes("warning")):null,[i]),fe=Y.useMemo(()=>i?i.some(Dt=>Dt.type==="schematic_group"):!0,[i]),Ye=Y.useMemo(()=>i?.some(Dt=>Dt.type==="pcb_panel"),[i]);Adt({errorMessage:o,errorStack:r,circuitJsonErrors:Xe});const Oe=I??H?.[0]??"pcb",[Ne,Ve]=RT("runframe-active-tab",A??Oe,A),[Re,Pe]=Y.useState(null),[Ee,we]=Y.useState(ne),[ze,Ue]=Y.useState(z),[et,ot]=Y.useState(V),at=j?z:ze,lt=q?V:et,xt=j??Ue,Ct=q??ot;zYn(Ee);const Lt=Y.useCallback(Dt=>{Ve(Dt),d?.(Dt)},[d,Ve]),$t=()=>{we(!Ee)};Y.useEffect(()=>{o&&(Ne!=="errors"&&Pe(Ne),Lt("errors"))},[o]),Y.useEffect(()=>{(Ne==="code"||Ne==="errors")&&i&&!o&&Lt(Re??A??I??H?.[0]??"pcb")},[i]);const Ot=Y.useCallback(Dt=>{window.TSCIRCUIT_3D_OBJECT_REF=Dt===null?void 0:Dt},[]);return G.jsx("div",{className:lr("flex flex-col relative rf-overflow-x-hidden rf-h-full",p),children:G.jsx("div",{className:lr("rf-md:sticky rf-md:top-2 rf-h-full",Ee&&"rf-fixed rf-top-0 rf-left-0 rf-w-full rf-h-full rf-bg-white rf-overflow-hidden"),children:G.jsxs(gae,{value:Ne,onValueChange:Lt,className:"rf-flex-grow rf-flex rf-flex-col rf-h-full",children:[G.jsxs("div",{className:lr("rf-flex rf-items-center rf-gap-2 rf-p-2 rf-pb-0",x),children:[f,oe&&!f&&G.jsx(bI,{isWebEmbedded:ie,circuitJson:i,projectName:ae,showSchematicDebugGrid:at,onChangeShowSchematicDebugGrid:xt,showSchematicPorts:lt,onChangeShowSchematicPorts:Ct}),(f||oe)&&G.jsx("div",{className:"rf-flex-grow"}),!f&&!oe&&S&&G.jsx($9,{className:"rf-w-4 rf-h-4 rf-animate-spin"}),!f&&!oe&&G.jsx("div",{className:"rf-flex-grow"}),m&&m.progress!==1&&!o&&G.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2 rf-min-w-0 rf-max-w-xs",children:[ce?G.jsx("div",{className:"rf-text-xs rf-text-gray-500 rf-truncate rf-min-w-0",title:ce,children:ce}):m.lastRenderEvent&&G.jsx("div",{className:"rf-text-xs rf-text-gray-500 rf-truncate rf-min-w-0",title:m.lastRenderEvent?.phase??"",children:m.lastRenderEvent?.phase??""}),G.jsx("div",{className:"rf-w-4 rf-h-4 rf-bg-blue-500 rf-opacity-50 rf-rounded-full rf-text-white rf-flex-shrink-0",children:G.jsx($9,{className:"rf-w-4 rf-h-4 rf-animate-spin"})}),G.jsxs("div",{className:"rf-text-xs rf-font-bold rf-text-gray-700 rf-tabular-nums rf-flex-shrink-0",children:[((m.progress??0)*100).toFixed(1),"%"]})]}),a&&G.jsxs(AW,{children:[c&&G.jsx(z6,{value:"code",children:"Code"}),!H||H.includes("pcb")?G.jsxs(z6,{value:"pcb",className:"rf-whitespace-nowrap",children:[i&&G.jsx("span",{className:lr("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",M?"rf-bg-gray-500":"rf-bg-blue-500")}),"PCB"]}):null,!H||H.includes("schematic")?G.jsxs(z6,{value:"schematic",className:lr("rf-whitespace-nowrap",i&&!fe&&"rf-opacity-50"),disabled:i?!fe||Ye:!1,children:[i&&G.jsx("span",{className:lr("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",M?"rf-bg-gray-500":"rf-bg-blue-500")}),"Schematic"]}):null,!H||H.includes("cad")?G.jsxs(z6,{value:"cad",children:[i&&G.jsx("span",{className:lr("inline-flex items-center justify-center w-2 h-2 mr-1 text-xs font-bold text-white rounded-full",M?"rf-bg-gray-500":"rf-bg-blue-500")}),"3D"]}):null,!["pcb","cad","schematic"].includes(Ne)&&G.jsx(z6,{value:Ne,children:VFe(Ne)}),G.jsxs(qj,{children:[G.jsx(Jj,{asChild:!0,children:G.jsxs("div",{className:"rf-whitespace-nowrap rf-p-2 rf-mr-1 rf-cursor-pointer rf-relative",children:[G.jsx(NDn,{className:"rf-w-4 rf-h-4"}),(Xe&&Xe.length>0||o)&&G.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"})]})}),G.jsxs(uH,{className:"rf-*:text-xs rf-z-[101]",children:[nto.filter(Dt=>!H||H.includes(Dt)).map(Dt=>G.jsxs(Md,{onSelect:()=>Lt(Dt),children:[Ne!==Dt&&G.jsx(sot,{className:"rf-w-3 rf-h-3 rf-opacity-30"}),Ne===Dt&&G.jsx(T8,{className:"rf-w-3 rf-h-3"}),G.jsx("div",{className:"rf-pr-2",children:VFe(Dt)}),Dt==="errors"&&(Xe&&Xe.length>0||o)&&G.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:o?1:Xe?.length}),Dt==="solvers"&&be&&be.length>0&&G.jsx("span",{className:"rf-inline-flex rf-items-center rf-justify-center rf-min-w-[12px] rf-h-3 rf-px-1 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-blue-500 rf-rounded-full",children:be.length})]},Dt)),G.jsx(Md,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:G.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/runframe@",Rdt.split(".").map((Dt,Wt)=>Wt===2?parseInt(Dt)+1:Dt).join(".")]})}),ee?G.jsxs(lH,{onOpenChange:Dt=>!Dt&&xe(""),children:[G.jsx(wE,{className:"rf-text-xs rf-opacity-60",children:G.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/eval@",pe??De??"latest"]})}),G.jsx(cH,{children:G.jsxs(EE,{className:"rf-*:text-xs rf-w-40 rf-max-h-[200px] rf-overflow-y-auto",children:[G.jsx("div",{className:"rf-p-1",children:G.jsx(sge,{value:Me,onChange:Dt=>xe(Dt.target.value),placeholder:"Search...",className:"rf-h-7 rf-text-xs"})}),G.jsx(ait,{}),G.jsx(Md,{onSelect:()=>We(null),children:De?`${De} (latest)`:"latest"}),Ce.map(Dt=>G.jsx(Md,{onSelect:()=>We(Dt),children:Dt},Dt))]})})]}):pe&&G.jsx(Md,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:G.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/eval@",pe]})})]})]})]}),K&&G.jsx(dc,{onClick:$t,variant:"ghost",children:Ee?G.jsx($Dn,{size:16}):G.jsx(FDn,{size:16})})]}),c&&G.jsx(a1,{value:"code",className:"rf-flex-grow rf-overflow-hidden",children:G.jsx("div",{className:"rf-h-full",children:l})}),(!H||H.includes("pcb"))&&G.jsx(a1,{value:"pcb",children:G.jsx("div",{className:lr("rf-overflow-hidden",Ee?"rf-h-[calc(100vh-52px)]":"rf-h-full"),children:G.jsx(M5,{fallbackRender:({error:Dt})=>G.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:G.jsxs("div",{className:"rf-p-4",children:[G.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading PCB viewer"}),G.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:Dt?.message||"An unknown error occurred"})]})}),children:i?G.jsx(FYn,{focusOnHover:!1,circuitJson:i,debugGraphics:s,containerClassName:lr("rf-h-full rf-w-full",Ee?"rf-min-h-[calc(100vh-240px)]":"rf-min-h-[620px]"),onEditEventsChanged:Dt=>{if(w)for(const Wt of Dt)w(Wt)}}):G.jsx(J9,{onRunClicked:n})})})}),(!H||H.includes("assembly"))&&G.jsx(a1,{value:"assembly",children:G.jsx("div",{className:lr("rf-overflow-auto",Ee?"rf-h-[calc(100vh-60px)]":"rf-h-full rf-min-h-[620px]"),children:G.jsx(M5,{fallback:G.jsx("div",{children:"Error loading Assembly"}),children:i?G.jsx(qVn,{circuitJson:i,containerStyle:{height:"100%"},editingEnabled:!0,debugGrid:!0}):G.jsx(J9,{onRunClicked:n})})})}),(!H||H.includes("pinout"))&&G.jsx(a1,{value:"pinout",children:G.jsx("div",{className:lr("rf-overflow-auto",Ee?"rf-h-[calc(100vh-60px)]":"rf-h-full rf-min-h-[620px]"),children:G.jsx(M5,{fallback:G.jsx("div",{children:"Error loading Pinout Viewer"}),children:i?G.jsx(JVn,{circuitJson:i,containerStyle:{height:"100%"}}):G.jsx(J9,{onRunClicked:n})})})}),(!H||H.includes("schematic"))&&G.jsx(a1,{value:"schematic",children:G.jsx("div",{className:lr("rf-overflow-auto rf-bg-white",Ee?"rf-h-[calc(100vh-60px)]":"rf-h-full rf-min-h-[620px]"),children:G.jsx(M5,{fallbackRender:({error:Dt})=>G.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:G.jsxs("div",{className:"rf-p-4",children:[G.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Schematic"}),G.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:Dt?.message||"An unknown error occurred"})]})}),children:i?G.jsx(GVn,{spiceSimulationEnabled:!0,circuitJson:i,containerStyle:{height:"100%"},editingEnabled:!0,onEditEvent:Dt=>{w?.(Dt)},debugGrid:at,showSchematicPorts:lt}):G.jsx(J9,{onRunClicked:n})})})}),(!H||H.includes("cad"))&&G.jsx(a1,{value:"cad",children:G.jsx("div",{className:lr("rf-overflow-auto",Ee?"rf-h-[calc(100vh-60px)]":"rf-h-full rf-min-h-[620px]"),children:G.jsx(M5,{fallbackRender:({error:Dt,resetErrorBoundary:Wt})=>G.jsx(mDn,{error:Dt,resetErrorBoundary:Wt}),children:i?G.jsx(rDn,{ref:Ot,circuitJson:i,autoRotateDisabled:O},`cad-${Ee}`):G.jsx(J9,{onRunClicked:n})})})}),(!H||H.includes("analog_simulation"))&&G.jsx(a1,{value:"analog_simulation",children:G.jsx("div",{className:lr("rf-overflow-auto",Ee?"rf-h-[calc(100vh-60px)]":"rf-h-full rf-min-h-[620px]"),children:G.jsx(M5,{fallback:G.jsx("div",{children:"Error loading Analog Simulation"}),children:i?G.jsx(YVn,{circuitJson:i,containerStyle:{height:"100%"}}):G.jsx(J9,{onRunClicked:n})})})}),(!H||H.includes("bom"))&&G.jsx(a1,{value:"bom",children:G.jsx("div",{className:lr("rf-overflow-auto",Ee?"rf-h-[calc(100vh-60px)]":"rf-h-full rf-min-h-[620px]"),children:G.jsx(M5,{fallbackRender:({error:Dt})=>G.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:G.jsxs("div",{className:"rf-p-4",children:[G.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Bill of Materials"}),G.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:Dt?.message||"An unknown error occurred"})]})}),children:i?G.jsx(t$n,{circuitJson:i}):G.jsx(J9,{onRunClicked:n})})})}),(!H||H.includes("circuit_json"))&&G.jsx(a1,{value:"circuit_json",children:G.jsx("div",{className:lr("rf-overflow-auto",Ee?"rf-h-[calc(100vh-60px)]":"rf-h-full rf-min-h-[620px]"),children:G.jsx(M5,{fallback:G.jsx("div",{children:"Error loading JSON viewer"}),children:i?G.jsx(ZVn,{elements:i}):G.jsx(J9,{onRunClicked:n})})})}),(!H||H.includes("errors"))&&G.jsx(a1,{value:"errors",className:"rf-h-full",children:G.jsx("div",{className:lr("rf-overflow-hidden",Ee?"rf-h-[calc(100vh-60px)]":"rf-h-full rf-min-h-[620px]"),children:o||Xe&&Xe.length>0||i?G.jsx(BNn,{code:t,fsMap:e,circuitJsonErrors:Xe,circuitJsonWarnings:Je,errorMessage:o,errorStack:r,circuitJson:i,evalVersion:pe,autoroutingLog:b,onReportAutoroutingLog:v}):G.jsx(J9,{onRunClicked:n})})}),_&&(!H||H.includes("render_log"))&&G.jsx(a1,{value:"render_log",children:G.jsx(WYn,{renderLog:m,onRerunWithDebug:de})}),(!H||H.includes("solvers"))&&G.jsx(a1,{value:"solvers",children:G.jsx("div",{className:lr("rf-overflow-hidden",Ee?"rf-h-[calc(100vh-60px)]":"rf-h-full rf-min-h-[620px]"),children:G.jsx(M5,{fallback:G.jsx("div",{children:"Error loading Solvers view"}),children:G.jsx(CJn,{solverEvents:be})})})})]})})})};const zmt=Symbol("Comlink.proxy"),oto=Symbol("Comlink.endpoint"),Vmt=Symbol("Comlink.releaseProxy"),T5e=Symbol("Comlink.finalizer"),JY=Symbol("Comlink.thrown"),$mt=t=>typeof t=="object"&&t!==null||typeof t=="function",rto={canHandle:t=>$mt(t)&&t[zmt],serialize(t){const{port1:e,port2:n}=new MessageChannel;return Umt(t,e),[n,[n]]},deserialize(t){return t.start(),jmt(t)}},ito={canHandle:t=>$mt(t)&&JY in t,serialize({value:t}){let e;return t instanceof Error?e={isError:!0,value:{message:t.message,name:t.name,stack:t.stack}}:e={isError:!1,value:t},[e,[]]},deserialize(t){throw t.isError?Object.assign(new Error(t.value.message),t.value):t.value}},Wmt=new Map([["proxy",rto],["throw",ito]]);function sto(t,e){for(const n of t)if(e===n||n==="*"||n instanceof RegExp&&n.test(e))return!0;return!1}function Umt(t,e=globalThis,n=["*"]){e.addEventListener("message",function o(r){if(!r||!r.data)return;if(!sto(n,r.origin)){console.warn(`Invalid origin '${r.origin}' for comlink proxy`);return}const{id:i,type:s,path:a}=Object.assign({path:[]},r.data),c=(r.data.argumentList||[]).map(lC);let l;try{const u=a.slice(0,-1).reduce((d,m)=>d[m],t),_=a.reduce((d,m)=>d[m],t);switch(s){case"GET":l=_;break;case"SET":u[a.slice(-1)[0]]=lC(r.data.value),l=!0;break;case"APPLY":l=_.apply(u,c);break;case"CONSTRUCT":{const d=new _(...c);l=E5e(d)}break;case"ENDPOINT":{const{port1:d,port2:m}=new MessageChannel;Umt(t,m),l=_to(d,[d])}break;case"RELEASE":l=void 0;break;default:return}}catch(u){l={value:u,[JY]:0}}Promise.resolve(l).catch(u=>({value:u,[JY]:0})).then(u=>{const[_,d]=eq(u);e.postMessage(Object.assign(Object.assign({},_),{id:i}),d),s==="RELEASE"&&(e.removeEventListener("message",o),Xmt(e),T5e in t&&typeof t[T5e]=="function"&&t[T5e]())}).catch(u=>{const[_,d]=eq({value:new TypeError("Unserializable return value"),[JY]:0});e.postMessage(Object.assign(Object.assign({},_),{id:i}),d)})}),e.start&&e.start()}function ato(t){return t.constructor.name==="MessagePort"}function Xmt(t){ato(t)&&t.close()}function jmt(t,e){const n=new Map;return t.addEventListener("message",function(r){const{data:i}=r;if(!i||!i.id)return;const s=n.get(i.id);if(s)try{s(i)}finally{n.delete(i.id)}}),w5e(t,n,[],e)}function KY(t){if(t)throw new Error("Proxy has been released and is not useable")}function Gmt(t){return nD(t,new Map,{type:"RELEASE"}).then(()=>{Xmt(t)})}const QY=new WeakMap,ZY="FinalizationRegistry"in globalThis&&new FinalizationRegistry(t=>{const e=(QY.get(t)||0)-1;QY.set(t,e),e===0&&Gmt(t)});function cto(t,e){const n=(QY.get(e)||0)+1;QY.set(e,n),ZY&&ZY.register(t,e,t)}function lto(t){ZY&&ZY.unregister(t)}function w5e(t,e,n=[],o=function(){}){let r=!1;const i=new Proxy(o,{get(s,a){if(KY(r),a===Vmt)return()=>{lto(i),Gmt(t),e.clear(),r=!0};if(a==="then"){if(n.length===0)return{then:()=>i};const c=nD(t,e,{type:"GET",path:n.map(l=>l.toString())}).then(lC);return c.then.bind(c)}return w5e(t,e,[...n,a])},set(s,a,c){KY(r);const[l,u]=eq(c);return nD(t,e,{type:"SET",path:[...n,a].map(_=>_.toString()),value:l},u).then(lC)},apply(s,a,c){KY(r);const l=n[n.length-1];if(l===oto)return nD(t,e,{type:"ENDPOINT"}).then(lC);if(l==="bind")return w5e(t,e,n.slice(0,-1));const[u,_]=Ymt(c);return nD(t,e,{type:"APPLY",path:n.map(d=>d.toString()),argumentList:u},_).then(lC)},construct(s,a){KY(r);const[c,l]=Ymt(a);return nD(t,e,{type:"CONSTRUCT",path:n.map(u=>u.toString()),argumentList:c},l).then(lC)}});return cto(i,t),i}function uto(t){return Array.prototype.concat.apply([],t)}function Ymt(t){const e=t.map(eq);return[e.map(n=>n[0]),uto(e.map(n=>n[1]))]}const qmt=new WeakMap;function _to(t,e){return qmt.set(t,e),t}function E5e(t){return Object.assign(t,{[zmt]:!0})}function eq(t){for(const[e,n]of Wmt)if(n.canHandle(t)){const[o,r]=n.serialize(t);return[{type:"HANDLER",name:e,value:o},r]}return[{type:"RAW",value:t},qmt.get(t)||[]]}function lC(t){switch(t.type){case"HANDLER":return Wmt.get(t.name).deserialize(t.value);case"RAW":return t.value}}function nD(t,e,n,o){return new Promise(r=>{const i=dto();e.set(i,r),t.start&&t.start(),t.postMessage(Object.assign({id:i},n),o)})}function dto(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}function D5e(t,e=""){const n=[];for(const o in t){if(!Object.prototype.hasOwnProperty.call(t,o))continue;const r=t[o],i=e?`${e}.${o}`:o;if(r!==null&&typeof r=="object"&&!Array.isArray(r)){const s=D5e(r,i);n.push(...s)}else n.push(i)}return n}function Jmt(t,e){const n=e.split(".");let o=t;for(const r of n)o=o[r];return o}var Kmt=async t=>{const e=globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER;if(e&&typeof e.kill=="function"){t.verbose&&console.log("[Worker] Killing previous global worker instance...");try{await e.kill()}catch(d){t.verbose&&console.warn("[Worker] Error killing previous global worker instance:",d),globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER===e&&(globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER=void 0)}}t.verbose&&console.log("[Worker] Creating circuit web worker with config:",t);let n=t.webWorkerBlobUrl??t.webWorkerUrl;if(!n){const d=`https://cdn.jsdelivr.net/npm/@tscircuit/eval@${t.evalVersion??"latest"}/dist/webworker/entrypoint.js`,m=await globalThis.fetch(d).then(h=>h.blob());n=URL.createObjectURL(m)}const o=new Worker(n,{type:"module"});let r;o.addEventListener("error",d=>{console.error("[Worker] Error in worker",d),r=d}),o.addEventListener("unhandledrejection",d=>{console.error("[Worker] Unhandled rejection in worker",d)}),o.addEventListener("messageerror",d=>{console.error("[Worker] Message error in worker",d)});const i=d=>{console.log("[Worker] Message in worker",d)};if(o.addEventListener("message",i),o.addEventListener("message",async d=>{const m=d.data;if(m?.type==="worker_fetch")try{const h=await globalThis.fetch(m.input,m.init),p=await h.text();o.postMessage({type:"worker_fetch_result",requestId:m.requestId,success:!0,response:{body:p,status:h.status,statusText:h.statusText,headers:(()=>{const x={};return h.headers.forEach((f,g)=>{x[g]=f}),x})()}})}catch(h){o.postMessage({type:"worker_fetch_result",requestId:m.requestId,success:!1,error:{name:h.name,message:h.message,stack:h.stack}})}}),r)throw r;const s=jmt(o);o.removeEventListener("message",i);function a(d){return!d||typeof d!="object"?d:d.type&&d.props!==void 0?{__isSerializedReactElement:!0,type:d.type,props:c(d.props),key:d.key}:d}function c(d){if(!d||typeof d!="object")return d;const m={};for(const[h,p]of Object.entries(d))h==="children"?Array.isArray(p)?m.children=p.map(a):m.children=a(p):m[h]=p;return m}t.enableFetchProxy&&o.postMessage({type:"override_global_fetch"}),t.disableCdnLoading&&await s.setDisableCdnLoading(!0),t.snippetsApiBaseUrl&&await s.setSnippetsApiBaseUrl(t.snippetsApiBaseUrl),t.tscircuitSessionToken&&await s.setTscircuitSessionToken(t.tscircuitSessionToken);const l=d=>typeof d=="function"?E5e(d):d;if(t.platform)for(const d of D5e(t.platform))await s.setPlatformConfigProperty(d,l(Jmt(t.platform,d))).catch(m=>{throw new Error(`Error setting platform config property ${d}: ${m instanceof Error?m.message:String(m)}`)});if(t.projectConfig)for(const d of D5e(t.projectConfig))await s.setProjectConfigProperty(d,l(Jmt(t.projectConfig,d))).catch(m=>{throw new Error(`Error setting project config property ${d}: ${m instanceof Error?m.message:String(m)}`)});let u=!1;const _={clearEventListeners:s.clearEventListeners.bind(s),enableDebug:async(...d)=>{if(u)throw new Error("CircuitWebWorker was terminated, can't enableDebug");return s.enableDebug.bind(s)(...d)},version:s.version.bind(s),execute:async(...d)=>{if(u)throw new Error("CircuitWebWorker was terminated, can't execute");return s.execute.bind(s)(...d)},executeComponent:async d=>{if(u)throw new Error("CircuitWebWorker was terminated, can't executeComponent");if(typeof d=="function")return s.executeComponent.bind(s)(d);if(d&&typeof d=="object"&&d.type){const m=a(d);return s.executeComponent.bind(s)(m)}return s.executeComponent.bind(s)(d)},executeWithFsMap:async(...d)=>{if(u)throw new Error("CircuitWebWorker was terminated, can't executeWithFsMap");return s.executeWithFsMap.bind(s)(...d)},renderUntilSettled:s.renderUntilSettled.bind(s),getCircuitJson:s.getCircuitJson.bind(s),on:(d,m)=>{const h=E5e(m);s.on(d,h)},kill:async()=>{s[Vmt](),o.terminate(),u=!0,globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER===_&&(globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER=void 0)}};return _.__rawWorker=o,globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER=_,_};const hto=({error:t,resetErrorBoundary:e})=>G.jsx("section",{className:"rf-h-full rf-w-full rf-grid rf-place-items-center",children:G.jsx("div",{className:"rf-min-h-full rf-flex rf-items-center rf-justify-center rf-px-4",children:G.jsxs("div",{className:"rf-max-w-lg rf-w-full rf-text-center",children:[G.jsxs("div",{className:"rf-mb-8",children:[G.jsx("div",{className:"rf-inline-flex rf-items-center rf-justify-center rf-w-20 rf-h-20 rf-bg-red-100 rf-rounded-full rf-mb-6",children:G.jsx(GDn,{className:"rf-w-10 rf-h-10 rf-text-red-600"})}),G.jsx("h1",{className:"rf-text-2xl rf-font-bold rf-text-gray-900 rf-mb-3",children:"Oops! Something went wrong"}),G.jsx("p",{className:"rf-text-gray-600 rf-mb-4",children:"RunFrame encountered an unexpected error."}),G.jsx("pre",{className:"rf-text-xs no-scrollbar rf-font-mono rf-text-left rf-whitespace-pre-wrap rf-text-red-600 rf-bg-red-50 rf-border rf-border-red-200 rf-p-3 rf-rounded-lg rf-mb-4 rf-overflow-auto rf-max-h-[120px]",children:t.message}),t.stack&&G.jsxs("details",{className:"rf-text-center rf-mb-6",children:[G.jsx("summary",{className:"rf-text-xs rf-text-gray-500 rf-cursor-pointer hover:rf-text-gray-700",children:"View stack trace"}),G.jsx("pre",{className:"rf-text-xs rf-font-mono no-scrollbar rf-whitespace-pre-wrap rf-text-gray-500 rf-bg-gray-100 rf-p-3 rf-rounded-lg rf-mt-2 rf-overflow-auto rf-text-left rf-max-h-[150px]",children:t.stack})]})]}),G.jsxs("div",{className:"rf-flex rf-flex-col rf-gap-2 rf-justify-center",children:[G.jsx(dc,{variant:"destructive",size:"lg",onClick:()=>window.location.reload(),children:"Refresh Dev Server"}),G.jsx(dc,{variant:"outline",size:"lg",onClick:e,children:"Try Again"})]})]})})}),Qmt=t=>{const e={};if(!t)return e;for(const o of Og)e[o]=0;const n=new Map;for(const o of t){const[,,r,i]=o.type.split(":");if(i==="start"){n.set(`${r}:${o.renderId}`,o);continue}if(i==="end"){const s=n.get(`${r}:${o.renderId}`);if(s){const a=o.createdAt-s.createdAt;e[r]=(e[r]||0)+a}}}return e},mto=(t,e)=>{const n={};for(const[o,r]of t.entries()){const i=e.get(o);i!==r&&(n[o]={old:r,new:i})}for(const[o,r]of e.entries())t.has(o)||(n[o]={old:void 0,new:r});return n};function pto(){const t=Y.useRef(Promise.resolve()),e=Y.useRef(!1),n=Y.useRef(null),o=Y.useCallback(async s=>{await t.current;const a={cancelled:!1};n.current=a;let c;const l=new Promise(u=>{c=u});try{return t.current=l,e.current=!0,await s()}catch(u){if(!a.cancelled)throw u}finally{e.current=!1,n.current=null,c()}},[]),r=Y.useCallback(()=>{n.current&&(n.current.cancelled=!0),t.current=Promise.resolve(),e.current=!1},[]),i=Y.useCallback(()=>e.current,[]);return{runWithMutex:o,isLocked:i,cancel:r}}const fto=({message:t="Loading files..."})=>G.jsxs("div",{className:"rf-flex rf-flex-col rf-w-full rf-h-full",children:[G.jsxs("div",{className:"rf-flex rf-items-center rf-gap-4 rf-p-2 rf-border-b",children:[G.jsx("div",{className:"rf-w-20 rf-h-9 rf-bg-gray-200 dark:rf-bg-gray-700 rf-rounded-md rf-animate-pulse"}),G.jsx("div",{className:"rf-flex rf-gap-6 rf-ml-auto",children:["PCB","Schematic","3D"].map((e,n)=>G.jsx("div",{className:"rf-h-6 rf-w-20 rf-bg-gray-200 dark:rf-bg-gray-700 rf-rounded rf-animate-pulse"},n))})]}),G.jsx("div",{className:"rf-flex-1 rf-p-4",children:G.jsx("div",{className:"rf-w-full rf-h-full rf-rounded-lg rf-bg-gray-100 dark:rf-bg-gray-800 rf-animate-pulse rf-flex rf-items-center rf-justify-center",children:G.jsx("div",{className:"rf-flex rf-flex-col rf-items-center rf-gap-4",children:G.jsx("div",{className:"rf-text-sm rf-text-gray-400 dark:rf-text-gray-500",children:t})})})})]}),tq=t=>{const e=t.toLowerCase(),n=e.split("/").pop();return e.endsWith(".circuit.json")||n==="circuit.json"},xto=t=>t.endsWith(".tsx")||tq(t)||t.endsWith(".jsx"),gto=({mainComponentPath:t,fsMap:e})=>Y.useMemo(()=>{if(!(t!=null&&tq(t)))return{isStaticCircuitJson:!1,circuitJson:null,error:null};const o=e.get(t);if(!o)return{isStaticCircuitJson:!0,circuitJson:null,error:`Circuit JSON file not found: ${t}`};try{return{isStaticCircuitJson:!0,circuitJson:JSON.parse(o),error:null}}catch(r){return{isStaticCircuitJson:!0,circuitJson:null,error:`Failed to parse circuit.json: ${r instanceof Error?r.message:String(r)}`}}},[t,e]),yto=t=>!t||typeof t!="object"?!1:!!("error_type"in t||typeof t.type=="string"&&t.type.includes("error")),bto=t=>t instanceof Error?{name:t.name,message:t.message,stack:t.stack}:typeof t=="string"?{message:t}:t&&typeof t=="object"?t:{message:String(t)},Pto=t=>Array.isArray(t)?t.filter(yto):[],A5e=({circuitJson:t,executionError:e})=>{const n=[];e&&n.push(bto(e));const o=Pto(t);return n.push(...o),{hasExecutionError:!!e,...n.length>0?{errors:n}:{}}};var vto=Symbol("radix.slottable");function Sto(t){const e=({children:n})=>G.jsx(G.Fragment,{children:n});return e.displayName=`${t}.Slottable`,e.__radixId=vto,e}var Cto=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Mto="VisuallyHidden",Zmt=Y.forwardRef((t,e)=>G.jsx(Cc.span,{...t,ref:e,style:{...Cto,...t.style}}));Zmt.displayName=Mto;var Tto=Zmt,[nq]=d4("Tooltip",[vE]),oq=vE(),ept="TooltipProvider",wto=700,R5e="tooltip.open",[Eto,k5e]=nq(ept),tpt=t=>{const{__scopeTooltip:e,delayDuration:n=wto,skipDelayDuration:o=300,disableHoverableContent:r=!1,children:i}=t,s=Y.useRef(!0),a=Y.useRef(!1),c=Y.useRef(0);return Y.useEffect(()=>{const l=c.current;return()=>window.clearTimeout(l)},[]),G.jsx(Eto,{scope:e,isOpenDelayedRef:s,delayDuration:n,onOpen:Y.useCallback(()=>{window.clearTimeout(c.current),s.current=!1},[]),onClose:Y.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.current=!0,o)},[o]),isPointerInTransitRef:a,onPointerInTransitChange:Y.useCallback(l=>{a.current=l},[]),disableHoverableContent:r,children:i})};tpt.displayName=ept;var PI="Tooltip",[Dto,rq]=nq(PI),npt=t=>{const{__scopeTooltip:e,children:n,open:o,defaultOpen:r,onOpenChange:i,disableHoverableContent:s,delayDuration:a}=t,c=k5e(PI,t.__scopeTooltip),l=oq(e),[u,_]=Y.useState(null),d=Jp(),m=Y.useRef(0),h=s??c.disableHoverableContent,p=a??c.delayDuration,x=Y.useRef(!1),[f,g]=DP({prop:o,defaultProp:r??!1,onChange:M=>{M?(c.onOpen(),document.dispatchEvent(new CustomEvent(R5e))):c.onClose(),i?.(M)},caller:PI}),y=Y.useMemo(()=>f?x.current?"delayed-open":"instant-open":"closed",[f]),b=Y.useCallback(()=>{window.clearTimeout(m.current),m.current=0,x.current=!1,g(!0)},[g]),v=Y.useCallback(()=>{window.clearTimeout(m.current),m.current=0,g(!1)},[g]),S=Y.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{x.current=!0,g(!0),m.current=0},p)},[p,g]);return Y.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),G.jsx(Hj,{...l,children:G.jsx(Dto,{scope:e,contentId:d,open:f,stateAttribute:y,trigger:u,onTriggerChange:_,onTriggerEnter:Y.useCallback(()=>{c.isOpenDelayedRef.current?S():b()},[c.isOpenDelayedRef,S,b]),onTriggerLeave:Y.useCallback(()=>{h?v():(window.clearTimeout(m.current),m.current=0)},[v,h]),onOpen:b,onClose:v,disableHoverableContent:h,children:n})})};npt.displayName=PI;var N5e="TooltipTrigger",opt=Y.forwardRef((t,e)=>{const{__scopeTooltip:n,...o}=t,r=rq(N5e,n),i=k5e(N5e,n),s=oq(n),a=Y.useRef(null),c=tu(e,a,r.onTriggerChange),l=Y.useRef(!1),u=Y.useRef(!1),_=Y.useCallback(()=>l.current=!1,[]);return Y.useEffect(()=>()=>document.removeEventListener("pointerup",_),[_]),G.jsx(Ij,{asChild:!0,...s,children:G.jsx(Cc.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...o,ref:c,onPointerMove:Vr(t.onPointerMove,d=>{d.pointerType!=="touch"&&!u.current&&!i.isPointerInTransitRef.current&&(r.onTriggerEnter(),u.current=!0)}),onPointerLeave:Vr(t.onPointerLeave,()=>{r.onTriggerLeave(),u.current=!1}),onPointerDown:Vr(t.onPointerDown,()=>{r.open&&r.onClose(),l.current=!0,document.addEventListener("pointerup",_,{once:!0})}),onFocus:Vr(t.onFocus,()=>{l.current||r.onOpen()}),onBlur:Vr(t.onBlur,r.onClose),onClick:Vr(t.onClick,r.onClose)})})});opt.displayName=N5e;var Ato="TooltipPortal",[wao,Rto]=nq(Ato,{forceMount:void 0}),oD="TooltipContent",rpt=Y.forwardRef((t,e)=>{const n=Rto(oD,t.__scopeTooltip),{forceMount:o=n.forceMount,side:r="top",...i}=t,s=rq(oD,t.__scopeTooltip);return G.jsx(Fg,{present:o||s.open,children:s.disableHoverableContent?G.jsx(ipt,{side:r,...i,ref:e}):G.jsx(kto,{side:r,...i,ref:e})})}),kto=Y.forwardRef((t,e)=>{const n=rq(oD,t.__scopeTooltip),o=k5e(oD,t.__scopeTooltip),r=Y.useRef(null),i=tu(e,r),[s,a]=Y.useState(null),{trigger:c,onClose:l}=n,u=r.current,{onPointerInTransitChange:_}=o,d=Y.useCallback(()=>{a(null),_(!1)},[_]),m=Y.useCallback((h,p)=>{const x=h.currentTarget,f={x:h.clientX,y:h.clientY},g=Oto(f,x.getBoundingClientRect()),y=Fto(f,g),b=Bto(p.getBoundingClientRect()),v=Vto([...y,...b]);a(v),_(!0)},[_]);return Y.useEffect(()=>()=>d(),[d]),Y.useEffect(()=>{if(c&&u){const h=x=>m(x,u),p=x=>m(x,c);return c.addEventListener("pointerleave",h),u.addEventListener("pointerleave",p),()=>{c.removeEventListener("pointerleave",h),u.removeEventListener("pointerleave",p)}}},[c,u,m,d]),Y.useEffect(()=>{if(s){const h=p=>{const x=p.target,f={x:p.clientX,y:p.clientY},g=c?.contains(x)||u?.contains(x),y=!zto(f,s);g?d():y&&(d(),l())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[c,u,s,l,d]),G.jsx(ipt,{...t,ref:i})}),[Nto,Hto]=nq(PI,{isInside:!1}),Ito=Sto("TooltipContent"),ipt=Y.forwardRef((t,e)=>{const{__scopeTooltip:n,children:o,"aria-label":r,onEscapeKeyDown:i,onPointerDownOutside:s,...a}=t,c=rq(oD,n),l=oq(n),{onClose:u}=c;return Y.useEffect(()=>(document.addEventListener(R5e,u),()=>document.removeEventListener(R5e,u)),[u]),Y.useEffect(()=>{if(c.trigger){const _=d=>{d.target?.contains(c.trigger)&&u()};return window.addEventListener("scroll",_,{capture:!0}),()=>window.removeEventListener("scroll",_,{capture:!0})}},[c.trigger,u]),G.jsx(ZN,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:_=>_.preventDefault(),onDismiss:u,children:G.jsxs(X2e,{"data-state":c.stateAttribute,...l,...a,ref:e,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[G.jsx(Ito,{children:o}),G.jsx(Nto,{scope:n,isInside:!0,children:G.jsx(Tto,{id:c.contentId,role:"tooltip",children:r||o})})]})})});rpt.displayName=oD;var spt="TooltipArrow",Lto=Y.forwardRef((t,e)=>{const{__scopeTooltip:n,...o}=t,r=oq(n);return Hto(spt,n).isInside?null:G.jsx(j2e,{...r,...o,ref:e})});Lto.displayName=spt;function Oto(t,e){const n=Math.abs(e.top-t.y),o=Math.abs(e.bottom-t.y),r=Math.abs(e.right-t.x),i=Math.abs(e.left-t.x);switch(Math.min(n,o,r,i)){case i:return"left";case r:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function Fto(t,e,n=5){const o=[];switch(e){case"top":o.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":o.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":o.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":o.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return o}function Bto(t){const{top:e,right:n,bottom:o,left:r}=t;return[{x:r,y:e},{x:n,y:e},{x:n,y:o},{x:r,y:o}]}function zto(t,e){const{x:n,y:o}=t;let r=!1;for(let i=0,s=e.length-1;i<e.length;s=i++){const a=e[i],c=e[s],l=a.x,u=a.y,_=c.x,d=c.y;u>o!=d>o&&n<(_-l)*(o-u)/(d-u)+l&&(r=!r)}return r}function Vto(t){const e=t.slice();return e.sort((n,o)=>n.x<o.x?-1:n.x>o.x?1:n.y<o.y?-1:n.y>o.y?1:0),$to(e)}function $to(t){if(t.length<=1)return t.slice();const e=[];for(let o=0;o<t.length;o++){const r=t[o];for(;e.length>=2;){const i=e[e.length-1],s=e[e.length-2];if((i.x-s.x)*(r.y-s.y)>=(i.y-s.y)*(r.x-s.x))e.pop();else break}e.push(r)}e.pop();const n=[];for(let o=t.length-1;o>=0;o--){const r=t[o];for(;n.length>=2;){const i=n[n.length-1],s=n[n.length-2];if((i.x-s.x)*(r.y-s.y)>=(i.y-s.y)*(r.x-s.x))n.pop();else break}n.push(r)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}var Wto=tpt,Uto=npt,Xto=opt,apt=rpt;const cpt=Wto,lpt=Uto,upt=Xto,H5e=Y.forwardRef(({className:t,sideOffset:e=4,...n},o)=>G.jsx(apt,{ref:o,sideOffset:e,className:lr("z-50 overflow-hidden rounded-md bg-slate-900 px-3 py-1.5 text-xs text-slate-50 animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:bg-slate-50 dark:text-slate-900",t),...n}));H5e.displayName=apt.displayName;const jto=26,Ux=Za("run-frame:RunFrame"),Gto=async()=>{try{const t=await fetch("https://data.jsdelivr.com/v1/package/npm/@tscircuit/eval");if(t.ok)return(await t.json()).tags?.latest}catch(t){console.error("Failed to fetch latest eval version",t)}},_pt=async(t,e)=>{if(t)return t;if(e||!window.TSCIRCUIT_LATEST_EVAL_VERSION){const n=await Gto();if(n)return window.TSCIRCUIT_LATEST_EVAL_VERSION=n,n}return window.TSCIRCUIT_LATEST_EVAL_VERSION?window.TSCIRCUIT_LATEST_EVAL_VERSION:"latest"},dpt=t=>{fY();const e=eu(pe=>pe.circuitJson),n=eu(pe=>pe.setCircuitJson),[o,r]=Y.useState(null),i=Y.useRef(null),[s,a]=Y.useState(null),[c,l]=Y.useReducer((pe,Me)=>pe+1,0),u=yY(pe=>pe.setLastRunEvalVersion),_=Y.useRef(0),d=pto(),[m,h]=Y.useState(!1),[p,x]=Y.useState(!1),[f,g]=Y.useState({}),[y,b]=Y.useState(""),[v,S]=Y.useState(!1),[M,w]=Y.useState(!1),D=Object.values(f).sort((pe,Me)=>pe.startTime-Me.startTime)[0]?.effectName,A=pe=>{t.onRunCompleted?.(pe)};Y.useEffect(()=>{const pe=Me=>{(Me.ctrlKey||Me.metaKey)&&Me.key==="Enter"&&!m&&l(1)};return window.addEventListener("keydown",pe),()=>window.removeEventListener("keydown",pe)},[m]),Y.useEffect(()=>{let pe=!1;return(async()=>{try{if(!globalThis.runFrameWorker){const xe=await _pt(t.evalVersion,t.forceLatestEvalVersion),We=await Kmt({evalVersion:xe,webWorkerBlobUrl:t.evalWebWorkerBlobUrl,projectConfig:{projectBaseUrl:t.projectBaseUrl||`${Ax}/files/static`},...t.platformConfig&&{platformConfig:t.platformConfig},verbose:!0,...t.enableFetchProxy&&{enableFetchProxy:t.enableFetchProxy},...window.TSCIRCUIT_USE_RUNFRAME_FOR_CLI&&{disableCdnLoading:!0},...t.tscircuitSessionToken&&{tscircuitSessionToken:t.tscircuitSessionToken}});if(pe)return;globalThis.runFrameWorker=We,u(xe)}pe||x(!0)}catch(xe){console.error("Failed to preload eval worker",xe)}})(),()=>{pe=!0}},[t.evalVersion,t.evalWebWorkerBlobUrl,t.forceLatestEvalVersion,t.tscircuitSessionToken]);const[I,H]=Y.useState(null),[O,z]=Y.useState({}),[V,j]=Y.useState([]),[q,K]=Y.useState(t.defaultActiveTab??t.defaultTab??"pcb");Y.useEffect(()=>{t.debug&&Za.enable("run-frame*")},[t.debug]);const ne=t.fsMap instanceof Map?t.fsMap:Object.entries(t.fsMap??{}).reduce((pe,[Me,xe])=>pe.set(Me,xe),new Map),ce=Y.useRef(null),ee=Y.useRef(null),{isStaticCircuitJson:oe,circuitJson:ie,error:ae}=gto({mainComponentPath:t.mainComponentPath,fsMap:ne});Y.useEffect(()=>{oe&&(ie?(n(ie),r(null)):ae&&r({error:ae,stack:""}))},[oe,ie,ae]),Y.useEffect(()=>{if(t.isLoadingFiles||oe)return;const pe=ne instanceof Map?Object.fromEntries(ne.entries()):ne;if(!pe||Object.keys(pe).length===0){r({error:"No files provided. Please provide at least one file with code to execute.",stack:""}),h(!1);return}const Me=c!==_.current;if(ce.current&&e){const We=mto(ce.current,ne);if(Object.keys(We).length>0)Ux("code changes detected");else if(ee.current!==t.entrypoint)Ux("render triggered by entrypoint change");else if(!Me){Ux("render triggered without changes to fsMap, skipping");return}}if(t.showRunButton&&c===_.current)return;ce.current=ne,ee.current=t.entrypoint??null,_.current=c,h(!0);const xe=async()=>{Ux("running render worker"),r(null),H(null),g({}),j([]);const We={progress:0,debugOutputs:[]};let Xe=!1;i.current=()=>{Xe=!0};const Je=await _pt(t.evalVersion,!globalThis.runFrameWorker&&t.forceLatestEvalVersion);Ux("resolvedEvalVersion",Je);const fe=globalThis.runFrameWorker??await Kmt({evalVersion:Je,webWorkerBlobUrl:t.evalWebWorkerBlobUrl,verbose:!0,projectConfig:{projectBaseUrl:t.projectBaseUrl||`${Ax}/files/static`},...t.platformConfig&&{platformConfig:t.platformConfig},...t.enableFetchProxy&&{enableFetchProxy:t.enableFetchProxy},...window.TSCIRCUIT_USE_RUNFRAME_FOR_CLI&&{disableCdnLoading:!0},...t.tscircuitSessionToken&&{tscircuitSessionToken:t.tscircuitSessionToken}});globalThis.runFrameWorker=fe,u(Je),y?.trim()&&fe.enableDebug(y.replace("DEBUG=","")),Ux("Starting render..."),t.onRenderStarted?.();const Ye=ne instanceof Map?Object.fromEntries(ne.entries()):ne;let Oe=Date.now();fe.on("asyncEffect:start",Pe=>{const Ee=`${Pe.phase}|${Pe.componentDisplayName??""}|${Pe.effectName}`;g(we=>({...we,[Ee]:{...Pe,startTime:Date.now()}}))}),fe.on("asyncEffect:end",Pe=>{const Ee=`${Pe.phase}|${Pe.componentDisplayName??""}|${Pe.effectName}`;g(we=>{const{[Ee]:ze,...Ue}=we;return Ue})}),fe.on("autorouting:start",Pe=>{z({...O,[Pe.componentDisplayName]:{simpleRouteJson:Pe.simpleRouteJson,createdAt:Date.now()}})}),fe.on("solver:started",Pe=>{Ux("solver:started",Pe),j(Ee=>{const we=`${Pe.componentName}-${Pe.solverName}`;return Ee.some(Ue=>`${Ue.componentName}-${Ue.solverName}`===we)?Ee:[...Ee,Pe]})}),fe.on("board:renderPhaseStarted",Pe=>{We.lastRenderEvent=Pe,We.eventsProcessed=(We.eventsProcessed??0)+1;const Ee=Og.indexOf(Pe.phase)/jto*.75+We.eventsProcessed/1e3*.25,we=1-Math.exp(-Ee*3);We.progress=we,Xe||H({...We})}),q==="render_log"&&fe.on("renderable:renderLifecycle:anyEvent",Pe=>{We.renderEvents=We.renderEvents??[],Pe.createdAt=Date.now(),We.renderEvents.push(Pe),Date.now()-Oe>500&&(We.phaseTimings=Qmt(We.renderEvents??[]),Oe=Date.now()),Xe||H({...We})}),fe.on("autorouting:progress",Pe=>{a(Pe.debugGraphics)}),fe.on("debug:logOutput",Pe=>{We.debugOutputs=We.debugOutputs??[],We.debugOutputs.push({type:"debug",name:Pe.name,content:Pe.content}),Xe||H({...We})}),Ux("Executing fsMap...");const Ne=await fe.executeWithFsMap({entrypoint:t.entrypoint,fsMap:Ye,...t.mainComponentPath?{mainComponentPath:t.mainComponentPath}:{}}).then(()=>({success:!0})).catch(Pe=>{const Ee=Pe.message.replace("Error: ","");return Ux(`eval error: ${Ee}`),t.onError?.(Pe),A(A5e({executionError:Pe})),r({error:Ee,stack:Pe.stack}),H(null),console.error(Pe),{success:!1}});if(Ux("worker call started"),!Ne.success){h(!1),g({});return}const Ve=fe.renderUntilSettled();Ux("waiting for initial circuit json...");let Re=await fe.getCircuitJson().catch(Pe=>(Ux("error getting initial circuit json",Pe),t.onError?.(Pe),A(A5e({executionError:Pe})),r({error:Pe.message,stack:Pe.stack}),H(null),h(!1),g({}),null));Re&&(Ux("got initial circuit json"),n(Re),t.onCircuitJsonChange?.(Re),t.onInitialRender?.({circuitJson:Re}),await Ve,Ux("getting final circuit json"),Re=await fe.getCircuitJson(),t.onCircuitJsonChange?.(Re),n(Re),A(A5e({circuitJson:Re})),t.onRenderFinished?.({circuitJson:Re}),a({}),q==="render_log"&&(We.phaseTimings=Qmt(We.renderEvents??[])),We.progress=1,Xe||H({...We}),h(!1),g({}),b(""),i.current=null)};d.runWithMutex(xe)},[t.fsMap,t.entrypoint,c,t.evalVersion,t.mainComponentPath,t.isLoadingFiles,y,oe]);const de=Y.useRef(null),be=Y.useRef(null),Ce=pe=>{if(!pe||pe===null){console.warn("[RunFrame] handleEditEvent received null or undefined event.");return}pe.in_progress?(de.current=pe,be.current&&(clearTimeout(be.current),be.current=null)):(be.current&&clearTimeout(be.current),be.current=setTimeout(()=>{const Me=pe||de.current;t.onEditEvent?.(Me),de.current=null,be.current=null},100))},De=async(pe,Me)=>{let xe="";const We=Array.isArray(e)&&e.find(fe=>fe.type==="software_project_metadata"),Xe=t.projectUrl??We?.project_url;if(Xe)try{xe=new URL(Xe).pathname}catch{xe=Xe}const Je=xe?`${xe} - ${pe}`:pe;await hI.post("autorouting/bug_reports/create",{json:{title:Je,simple_route_json:Me.simpleRouteJson}}).json().then(({autorouting_bug_report:fe})=>{window.open(`https://api.tscircuit.com/autorouting/bug_reports/view?autorouting_bug_report_id=${fe.autorouting_bug_report_id}`,"_blank")}).catch(fe=>{if(console.error("Failed to report autorouting bug",fe),fe instanceof Uv&&fe.response?.status===401){t.onLoginRequired?t.onLoginRequired():alert("You must be logged in to report autorouting bugs");return}const Oe=fe instanceof Error?fe.message:"Failed to report autorouting bug";alert(`Failed to report autorouting bug: ${Oe}`)})};return t.isLoadingFiles?G.jsx(fto,{}):G.jsx(M5,{FallbackComponent:hto,children:G.jsx(Bmt,{code:ne.get(t.entrypoint??t.mainComponentPath),fsMap:ne,defaultActiveTab:t.defaultActiveTab??t.defaultTab,defaultTab:t.defaultTab,availableTabs:t.availableTabs,showToggleFullScreen:t.showToggleFullScreen,autoroutingGraphics:s,autoroutingLog:O,onReportAutoroutingLog:t.onReportAutoroutingLog||De,leftHeaderContent:G.jsxs(G.Fragment,{children:[t.showRunButton&&G.jsx(cpt,{children:G.jsxs(lpt,{children:[G.jsx(upt,{asChild:!0,children:G.jsxs("div",{className:"rf-relative rf-inline-flex",children:[G.jsxs("button",{type:"button",onClick:()=>{l(1)},className:"rf-flex rf-items-center rf-gap-2 rf-px-4 rf-py-2 rf-bg-blue-600 hover:rf-bg-blue-700 rf-text-white rf-rounded-md disabled:rf-opacity-50 transition-colors duration-200",disabled:m||!p,children:["Run"," ",m||!p?G.jsx($9,{className:"rf-w-3 rf-h-3 rf-animate-spin"}):G.jsx(aot,{className:"rf-w-3 rf-h-3"})]}),m&&G.jsx("div",{className:"rf-flex rf-items-center rf-ml-1",children:G.jsx(dc,{onClick:pe=>{pe.stopPropagation(),h(!1),H(null),r(null),i.current&&(i.current(),i.current=null),d.cancel(),g({}),globalThis.runFrameWorker&&(globalThis.runFrameWorker.kill(),globalThis.runFrameWorker=null)},variant:"ghost",size:"icon",className:"rf-text-red-300 hover:rf-text-red-400 hover:!rf-bg-transparent [&>svg]:rf-text-red-300 [&>svg]:hover:rf-text-red-400 rf-flex rf-items-center rf-justify-center",children:G.jsx(jDn,{className:"!rf-h-2.5 !rf-w-2.5",fill:"currentColor",stroke:"currentColor"})})})]})}),G.jsx(H5e,{sideOffset:8,className:"rf-p-0 rf-bg-transparent rf-border-none rf-shadow-none rf-pointer-events-none",children:G.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2 rf-px-2.5 rf-py-1.5 rf-bg-slate-900 rf-rounded-md rf-shadow-xl rf-border rf-border-slate-800/60",children:[G.jsx("kbd",{className:"rf-bg-slate-800 rf-px-1.5 rf-py-0.5 rf-rounded rf-text-[10px] rf-font-sans rf-font-medium rf-border rf-border-slate-700 rf-text-slate-200 rf-leading-none",children:"Ctrl"}),G.jsx("span",{className:"rf-text-slate-500 rf-text-[11px] rf-font-medium rf-leading-none",children:"+"}),G.jsx("kbd",{className:"rf-bg-slate-800 rf-px-1.5 rf-py-0.5 rf-rounded rf-text-[10px] rf-font-sans rf-font-medium rf-border rf-border-slate-700 rf-text-slate-200 rf-leading-none",children:"Enter"})]})})]})}),t.showFileMenu!==!1&&G.jsx(bI,{isWebEmbedded:t.isWebEmbedded,onLoginRequired:t.onLoginRequired,showSchematicDebugGrid:v,onChangeShowSchematicDebugGrid:S,showSchematicPorts:M,onChangeShowSchematicPorts:w,autoroutingLog:O,onReportAutoroutingLog:t.onReportAutoroutingLog||De}),t.leftHeaderContent]}),onActiveTabChange:K,circuitJson:e,renderLog:I,activeEffectName:D,isRunningCode:m,errorMessage:o?.error,errorStack:o?.stack,onEditEvent:Ce,editEvents:t.editEvents,defaultToFullScreen:t.defaultToFullScreen,onRerunWithDebug:pe=>{b(pe||""),l(1)},solverEvents:V,showSchematicDebugGrid:v,showSchematicPorts:M,onChangeShowSchematicDebugGrid:S,onChangeShowSchematicPorts:w})})},Yto=t=>new Promise(e=>setTimeout(e,t)),qto=({isOpen:t,onClose:e,onLoginSuccess:n})=>{const[o,r]=Y.useState("idle"),[i,s]=Y.useState(null),[a,c]=Y.useState(null),l=eu(p=>p.pushEvent),u=Y.useRef(null);Y.useEffect(()=>()=>{u.current&&u.current.abort()},[]);const _=Y.useCallback(async()=>{r("creating"),c(null),u.current=new AbortController;try{const p=Xv(),{login_page:x}=await p.post("sessions/login_page/create",{json:{},signal:u.current?.signal}).json();s(x.url),r("waiting");const f=new URL(x.url);for(f.searchParams.set("autoclose","true"),window.open(f.toString(),"_blank");!u.current?.signal.aborted;){const{login_page:y}=await p.post("sessions/login_page/get",{json:{login_page_id:x.login_page_id},headers:{Authorization:`Bearer ${x.login_page_auth_token}`},signal:u.current?.signal}).json();if(y.was_login_successful){r("exchanging");break}if(y.is_expired)throw new Error("Login page expired. Please try again.");await Yto(1e3)}if(u.current?.signal.aborted){r("idle");return}const{session:g}=await p.post("sessions/login_page/exchange_for_cli_session",{json:{login_page_id:x.login_page_id},headers:{Authorization:`Bearer ${x.login_page_auth_token}`},signal:u.current?.signal}).json();typeof window<"u"&&(window.TSCIRCUIT_REGISTRY_TOKEN=g.token),await l({event_type:"TOKEN_UPDATED",registry_token:g.token}),r("success"),ds.success("Successfully logged in!"),n?.(),setTimeout(()=>{e(),r("idle"),s(null)},1e3)}catch(p){if(p instanceof DOMException&&p.name==="AbortError"){r("idle");return}console.error("Login error:",p);const x=p instanceof Error?p.message:"Failed to complete login";c(x),r("error"),ds.error(x)}},[l,n,e]),d=Y.useCallback(()=>{u.current&&u.current.abort(),r("idle"),s(null),c(null),e()},[e]),m=o==="creating"||o==="waiting"||o==="exchanging",h=()=>{switch(o){case"creating":return"Creating login page...";case"waiting":return"Waiting for you to complete login in the browser...";case"exchanging":return"Generating token...";case"success":return"Successfully logged in!";case"error":return a||"An error occurred";default:return null}};return G.jsx(QE,{open:t,onOpenChange:p=>!p&&!m&&d(),children:G.jsxs(eC,{className:"rf-max-w-md",children:[G.jsxs(tC,{children:[G.jsx(nC,{children:"Sign In Required"}),G.jsx(ZE,{children:o==="idle"||o==="error"?"Sign in to continue. A new browser window will open for authentication.":"Complete the login process in the opened browser window."})]}),G.jsxs("div",{className:"rf-flex rf-flex-col rf-items-center rf-gap-4 rf-py-4",children:[o==="idle"||o==="error"?G.jsx(dc,{onClick:_,className:"rf-w-full",children:"Sign In"}):G.jsxs("div",{className:"rf-flex rf-flex-col rf-items-center rf-gap-3 rf-w-full",children:[o!=="success"&&G.jsx("div",{className:"rf-animate-spin rf-w-6 rf-h-6 rf-border-2 rf-border-gray-300 rf-border-t-blue-600 rf-rounded-full"}),G.jsx("p",{className:"rf-text-sm rf-text-gray-600 rf-text-center",children:h()}),i&&o==="waiting"&&G.jsx("a",{href:i,target:"_blank",rel:"noreferrer",className:"rf-text-xs rf-text-blue-600 hover:rf-underline",children:"Click here if the window didn't open"})]}),a&&o==="error"&&G.jsx("p",{className:"rf-text-sm rf-text-red-600 rf-text-center",children:a}),m&&G.jsx(dc,{variant:"outline",onClick:d,className:"rf-w-full",children:"Cancel"})]})]})})},Jto=()=>{const[t,e]=Y.useState(!1),n=Y.useCallback(()=>{e(!0)},[]),o=Y.useCallback(()=>{e(!1)},[]),r=Y.useCallback(()=>{e(!1)},[]);return{LoginDialog:G.jsx(qto,{isOpen:t,onClose:o,onLoginSuccess:r}),openLoginDialog:n}},Kto=t=>{const[e,n]=RT("load-latest-eval",!0),[o]=Y.useState(()=>typeof window>"u"?void 0:new URLSearchParams(window.location.hash.slice(1)).get("main_component")??void 0),r=Y.useCallback(a=>{if(typeof window>"u")return;const c=new URLSearchParams(window.location.hash.slice(1));if(c.get("main_component")===a)return;c.set("main_component",a);const l=c.toString(),u=`${window.location.pathname}${window.location.search}`+(l.length>0?`#${l}`:"");window.history.replaceState(null,"",u)},[]),{LoginDialog:i,openLoginDialog:s}=Jto();return G.jsxs(G.Fragment,{children:[i,G.jsx(cft,{debug:t.debug,forceLatestEvalVersion:!t.workerBlobUrl&&e,defaultToFullScreen:!0,showToggleFullScreen:!1,workerBlobUrl:t.workerBlobUrl,showFilesSwitch:!0,showFileMenu:!1,enableFetchProxy:t.enableFetchProxy,initialMainComponentPath:o,onLoginRequired:s,onMainComponentPathChange:r,leftHeaderContent:G.jsxs("div",{className:"rf-flex rf-items-center rf-justify-between",children:[G.jsx(bI,{isWebEmbedded:!1,shouldLoadLatestEval:!t.workerBlobUrl&&e,onChangeShouldLoadLatestEval:a=>{n(a),globalThis.runFrameWorker=null},onLoginRequired:s}),t.scenarioSelectorContent]})})]})};Za("run-frame:ImportComponentDialog");var hpt=1,Qto=.9,Zto=.8,eno=.17,I5e=.1,L5e=.999,tno=.9999,nno=.99,ono=/[\\\/_+.#"@\[\(\{&]/,rno=/[\\\/_+.#"@\[\(\{&]/g,ino=/[\s-]/,mpt=/[\s-]/g;function O5e(t,e,n,o,r,i,s){if(i===e.length)return r===t.length?hpt:nno;var a=`${r},${i}`;if(s[a]!==void 0)return s[a];for(var c=o.charAt(i),l=n.indexOf(c,r),u=0,_,d,m,h;l>=0;)_=O5e(t,e,n,o,l+1,i+1,s),_>u&&(l===r?_*=hpt:ono.test(t.charAt(l-1))?(_*=Zto,m=t.slice(r,l-1).match(rno),m&&r>0&&(_*=Math.pow(L5e,m.length))):ino.test(t.charAt(l-1))?(_*=Qto,h=t.slice(r,l-1).match(mpt),h&&r>0&&(_*=Math.pow(L5e,h.length))):(_*=eno,r>0&&(_*=Math.pow(L5e,l-r))),t.charAt(l)!==e.charAt(i)&&(_*=tno)),(_<I5e&&n.charAt(l-1)===o.charAt(i+1)||o.charAt(i+1)===o.charAt(i)&&n.charAt(l-1)!==o.charAt(i))&&(d=O5e(t,e,n,o,l+1,i+2,s),d*I5e>_&&(_=d*I5e)),_>u&&(u=_),l=n.indexOf(c,l+1);return s[a]=u,u}function ppt(t){return t.toLowerCase().replace(mpt," ")}function sno(t,e,n){return t=n&&n.length>0?`${t+" "+n.join(" ")}`:t,O5e(t,e,ppt(t),ppt(e),0,0,{})}var ano=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Gv=ano.reduce((t,e)=>{const n=tot(`Primitive.${e}`),o=Y.forwardRef((r,i)=>{const{asChild:s,...a}=r,c=s?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),G.jsx(c,{...a,ref:i})});return o.displayName=`Primitive.${e}`,{...t,[e]:o}},{}),vI='[cmdk-group=""]',F5e='[cmdk-group-items=""]',cno='[cmdk-group-heading=""]',fpt='[cmdk-item=""]',xpt=`${fpt}:not([aria-disabled="true"])`,B5e="cmdk-item-select",rD="data-value",lno=(t,e,n)=>sno(t,e,n),gpt=Y.createContext(void 0),SI=()=>Y.useContext(gpt),ypt=Y.createContext(void 0),z5e=()=>Y.useContext(ypt),bpt=Y.createContext(void 0),Ppt=Y.forwardRef((t,e)=>{let n=iD(()=>{var oe,ie;return{search:"",value:(ie=(oe=t.value)!=null?oe:t.defaultValue)!=null?ie:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),o=iD(()=>new Set),r=iD(()=>new Map),i=iD(()=>new Map),s=iD(()=>new Set),a=vpt(t),{label:c,children:l,value:u,onValueChange:_,filter:d,shouldFilter:m,loop:h,disablePointerSelection:p=!1,vimBindings:x=!0,...f}=t,g=Jp(),y=Jp(),b=Jp(),v=Y.useRef(null),S=bno();uC(()=>{if(u!==void 0){let oe=u.trim();n.current.value=oe,M.emit()}},[u]),uC(()=>{S(6,O)},[]);let M=Y.useMemo(()=>({subscribe:oe=>(s.current.add(oe),()=>s.current.delete(oe)),snapshot:()=>n.current,setState:(oe,ie,ae)=>{var de,be,Ce,De;if(!Object.is(n.current[oe],ie)){if(n.current[oe]=ie,oe==="search")H(),A(),S(1,I);else if(oe==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let pe=document.getElementById(b);pe?pe.focus():(de=document.getElementById(g))==null||de.focus()}if(S(7,()=>{var pe;n.current.selectedItemId=(pe=z())==null?void 0:pe.id,M.emit()}),ae||S(5,O),((be=a.current)==null?void 0:be.value)!==void 0){let pe=ie??"";(De=(Ce=a.current).onValueChange)==null||De.call(Ce,pe);return}}M.emit()}},emit:()=>{s.current.forEach(oe=>oe())}}),[]),w=Y.useMemo(()=>({value:(oe,ie,ae)=>{var de;ie!==((de=i.current.get(oe))==null?void 0:de.value)&&(i.current.set(oe,{value:ie,keywords:ae}),n.current.filtered.items.set(oe,D(ie,ae)),S(2,()=>{A(),M.emit()}))},item:(oe,ie)=>(o.current.add(oe),ie&&(r.current.has(ie)?r.current.get(ie).add(oe):r.current.set(ie,new Set([oe]))),S(3,()=>{H(),A(),n.current.value||I(),M.emit()}),()=>{i.current.delete(oe),o.current.delete(oe),n.current.filtered.items.delete(oe);let ae=z();S(4,()=>{H(),ae?.getAttribute("id")===oe&&I(),M.emit()})}),group:oe=>(r.current.has(oe)||r.current.set(oe,new Set),()=>{i.current.delete(oe),r.current.delete(oe)}),filter:()=>a.current.shouldFilter,label:c||t["aria-label"],getDisablePointerSelection:()=>a.current.disablePointerSelection,listId:g,inputId:b,labelId:y,listInnerRef:v}),[]);function D(oe,ie){var ae,de;let be=(de=(ae=a.current)==null?void 0:ae.filter)!=null?de:lno;return oe?be(oe,n.current.search,ie):0}function A(){if(!n.current.search||a.current.shouldFilter===!1)return;let oe=n.current.filtered.items,ie=[];n.current.filtered.groups.forEach(de=>{let be=r.current.get(de),Ce=0;be.forEach(De=>{let pe=oe.get(De);Ce=Math.max(pe,Ce)}),ie.push([de,Ce])});let ae=v.current;V().sort((de,be)=>{var Ce,De;let pe=de.getAttribute("id"),Me=be.getAttribute("id");return((Ce=oe.get(Me))!=null?Ce:0)-((De=oe.get(pe))!=null?De:0)}).forEach(de=>{let be=de.closest(F5e);be?be.appendChild(de.parentElement===be?de:de.closest(`${F5e} > *`)):ae.appendChild(de.parentElement===ae?de:de.closest(`${F5e} > *`))}),ie.sort((de,be)=>be[1]-de[1]).forEach(de=>{var be;let Ce=(be=v.current)==null?void 0:be.querySelector(`${vI}[${rD}="${encodeURIComponent(de[0])}"]`);Ce?.parentElement.appendChild(Ce)})}function I(){let oe=V().find(ae=>ae.getAttribute("aria-disabled")!=="true"),ie=oe?.getAttribute(rD);M.setState("value",ie||void 0)}function H(){var oe,ie,ae,de;if(!n.current.search||a.current.shouldFilter===!1){n.current.filtered.count=o.current.size;return}n.current.filtered.groups=new Set;let be=0;for(let Ce of o.current){let De=(ie=(oe=i.current.get(Ce))==null?void 0:oe.value)!=null?ie:"",pe=(de=(ae=i.current.get(Ce))==null?void 0:ae.keywords)!=null?de:[],Me=D(De,pe);n.current.filtered.items.set(Ce,Me),Me>0&&be++}for(let[Ce,De]of r.current)for(let pe of De)if(n.current.filtered.items.get(pe)>0){n.current.filtered.groups.add(Ce);break}n.current.filtered.count=be}function O(){var oe,ie,ae;let de=z();de&&(((oe=de.parentElement)==null?void 0:oe.firstChild)===de&&((ae=(ie=de.closest(vI))==null?void 0:ie.querySelector(cno))==null||ae.scrollIntoView({block:"nearest"})),de.scrollIntoView({block:"nearest"}))}function z(){var oe;return(oe=v.current)==null?void 0:oe.querySelector(`${fpt}[aria-selected="true"]`)}function V(){var oe;return Array.from(((oe=v.current)==null?void 0:oe.querySelectorAll(xpt))||[])}function j(oe){let ie=V()[oe];ie&&M.setState("value",ie.getAttribute(rD))}function q(oe){var ie;let ae=z(),de=V(),be=de.findIndex(De=>De===ae),Ce=de[be+oe];(ie=a.current)!=null&&ie.loop&&(Ce=be+oe<0?de[de.length-1]:be+oe===de.length?de[0]:de[be+oe]),Ce&&M.setState("value",Ce.getAttribute(rD))}function K(oe){let ie=z(),ae=ie?.closest(vI),de;for(;ae&&!de;)ae=oe>0?gno(ae,vI):yno(ae,vI),de=ae?.querySelector(xpt);de?M.setState("value",de.getAttribute(rD)):q(oe)}let ne=()=>j(V().length-1),ce=oe=>{oe.preventDefault(),oe.metaKey?ne():oe.altKey?K(1):q(1)},ee=oe=>{oe.preventDefault(),oe.metaKey?j(0):oe.altKey?K(-1):q(-1)};return Y.createElement(Gv.div,{ref:e,tabIndex:-1,...f,"cmdk-root":"",onKeyDown:oe=>{var ie;(ie=f.onKeyDown)==null||ie.call(f,oe);let ae=oe.nativeEvent.isComposing||oe.keyCode===229;if(!(oe.defaultPrevented||ae))switch(oe.key){case"n":case"j":{x&&oe.ctrlKey&&ce(oe);break}case"ArrowDown":{ce(oe);break}case"p":case"k":{x&&oe.ctrlKey&&ee(oe);break}case"ArrowUp":{ee(oe);break}case"Home":{oe.preventDefault(),j(0);break}case"End":{oe.preventDefault(),ne();break}case"Enter":{oe.preventDefault();let de=z();if(de){let be=new Event(B5e);de.dispatchEvent(be)}}}}},Y.createElement("label",{"cmdk-label":"",htmlFor:w.inputId,id:w.labelId,style:vno},c),iq(t,oe=>Y.createElement(ypt.Provider,{value:M},Y.createElement(gpt.Provider,{value:w},oe))))}),uno=Y.forwardRef((t,e)=>{var n,o;let r=Jp(),i=Y.useRef(null),s=Y.useContext(bpt),a=SI(),c=vpt(t),l=(o=(n=c.current)==null?void 0:n.forceMount)!=null?o:s?.forceMount;uC(()=>{if(!l)return a.item(r,s?.id)},[l]);let u=Spt(r,i,[t.value,t.children,i],t.keywords),_=z5e(),d=Yv(S=>S.value&&S.value===u.current),m=Yv(S=>l||a.filter()===!1?!0:S.search?S.filtered.items.get(r)>0:!0);Y.useEffect(()=>{let S=i.current;if(!(!S||t.disabled))return S.addEventListener(B5e,h),()=>S.removeEventListener(B5e,h)},[m,t.onSelect,t.disabled]);function h(){var S,M;p(),(M=(S=c.current).onSelect)==null||M.call(S,u.current)}function p(){_.setState("value",u.current,!0)}if(!m)return null;let{disabled:x,value:f,onSelect:g,forceMount:y,keywords:b,...v}=t;return Y.createElement(Gv.div,{ref:Rx(i,e),...v,id:r,"cmdk-item":"",role:"option","aria-disabled":!!x,"aria-selected":!!d,"data-disabled":!!x,"data-selected":!!d,onPointerMove:x||a.getDisablePointerSelection()?void 0:p,onClick:x?void 0:h},t.children)}),_no=Y.forwardRef((t,e)=>{let{heading:n,children:o,forceMount:r,...i}=t,s=Jp(),a=Y.useRef(null),c=Y.useRef(null),l=Jp(),u=SI(),_=Yv(m=>r||u.filter()===!1?!0:m.search?m.filtered.groups.has(s):!0);uC(()=>u.group(s),[]),Spt(s,a,[t.value,t.heading,c]);let d=Y.useMemo(()=>({id:s,forceMount:r}),[r]);return Y.createElement(Gv.div,{ref:Rx(a,e),...i,"cmdk-group":"",role:"presentation",hidden:_?void 0:!0},n&&Y.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:l},n),iq(t,m=>Y.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?l:void 0},Y.createElement(bpt.Provider,{value:d},m))))}),dno=Y.forwardRef((t,e)=>{let{alwaysRender:n,...o}=t,r=Y.useRef(null),i=Yv(s=>!s.search);return!n&&!i?null:Y.createElement(Gv.div,{ref:Rx(r,e),...o,"cmdk-separator":"",role:"separator"})}),hno=Y.forwardRef((t,e)=>{let{onValueChange:n,...o}=t,r=t.value!=null,i=z5e(),s=Yv(l=>l.search),a=Yv(l=>l.selectedItemId),c=SI();return Y.useEffect(()=>{t.value!=null&&i.setState("search",t.value)},[t.value]),Y.createElement(Gv.input,{ref:e,...o,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":a,id:c.inputId,type:"text",value:r?t.value:s,onChange:l=>{r||i.setState("search",l.target.value),n?.(l.target.value)}})}),mno=Y.forwardRef((t,e)=>{let{children:n,label:o="Suggestions",...r}=t,i=Y.useRef(null),s=Y.useRef(null),a=Yv(l=>l.selectedItemId),c=SI();return Y.useEffect(()=>{if(s.current&&i.current){let l=s.current,u=i.current,_,d=new ResizeObserver(()=>{_=requestAnimationFrame(()=>{let m=l.offsetHeight;u.style.setProperty("--cmdk-list-height",m.toFixed(1)+"px")})});return d.observe(l),()=>{cancelAnimationFrame(_),d.unobserve(l)}}},[]),Y.createElement(Gv.div,{ref:Rx(i,e),...r,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":a,"aria-label":o,id:c.listId},iq(t,l=>Y.createElement("div",{ref:Rx(s,c.listInnerRef),"cmdk-list-sizer":""},l)))}),pno=Y.forwardRef((t,e)=>{let{open:n,onOpenChange:o,overlayClassName:r,contentClassName:i,container:s,...a}=t;return Y.createElement(Nye,{open:n,onOpenChange:o},Y.createElement(Hye,{container:s},Y.createElement(vY,{"cmdk-overlay":"",className:r}),Y.createElement(SY,{"aria-label":t.label,"cmdk-dialog":"",className:i},Y.createElement(Ppt,{ref:e,...a}))))}),fno=Y.forwardRef((t,e)=>Yv(n=>n.filtered.count===0)?Y.createElement(Gv.div,{ref:e,...t,"cmdk-empty":"",role:"presentation"}):null),xno=Y.forwardRef((t,e)=>{let{progress:n,children:o,label:r="Loading...",...i}=t;return Y.createElement(Gv.div,{ref:e,...i,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":r},iq(t,s=>Y.createElement("div",{"aria-hidden":!0},s)))}),Xx=Object.assign(Ppt,{List:mno,Item:uno,Input:hno,Group:_no,Separator:dno,Dialog:pno,Empty:fno,Loading:xno});function gno(t,e){let n=t.nextElementSibling;for(;n;){if(n.matches(e))return n;n=n.nextElementSibling}}function yno(t,e){let n=t.previousElementSibling;for(;n;){if(n.matches(e))return n;n=n.previousElementSibling}}function vpt(t){let e=Y.useRef(t);return uC(()=>{e.current=t}),e}var uC=typeof window>"u"?Y.useEffect:Y.useLayoutEffect;function iD(t){let e=Y.useRef();return e.current===void 0&&(e.current=t()),e}function Yv(t){let e=z5e(),n=()=>t(e.snapshot());return Y.useSyncExternalStore(e.subscribe,n,n)}function Spt(t,e,n,o=[]){let r=Y.useRef(),i=SI();return uC(()=>{var s;let a=(()=>{var l;for(let u of n){if(typeof u=="string")return u.trim();if(typeof u=="object"&&"current"in u)return u.current?(l=u.current.textContent)==null?void 0:l.trim():r.current}})(),c=o.map(l=>l.trim());i.value(t,a,c),(s=e.current)==null||s.setAttribute(rD,a),r.current=a}),r}var bno=()=>{let[t,e]=Y.useState(),n=iD(()=>new Map);return uC(()=>{n.current.forEach(o=>o()),n.current=new Map},[t]),(o,r)=>{n.current.set(o,r),e({})}};function Pno(t){let e=t.type;return typeof e=="function"?e(t.props):"render"in e?e.render(t.props):t}function iq({asChild:t,children:e},n){return t&&Y.isValidElement(e)?Y.cloneElement(Pno(e),{ref:e.ref},n(e.props.children)):n(e)}var vno={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const Cpt=Y.forwardRef(({className:t,...e},n)=>G.jsx(Xx,{ref:n,className:lr("rf-flex rf-h-full rf-w-full rf-flex-col rf-overflow-hidden rf-rounded-md rf-bg-white rf-text-zinc-950 dark:rf-bg-zinc-950 dark:rf-text-zinc-50",t),...e}));Cpt.displayName=Xx.displayName;const Mpt=Y.forwardRef(({className:t,...e},n)=>G.jsxs("div",{className:"rf-flex rf-items-center rf-border-b rf-px-3","cmdk-input-wrapper":"",children:[G.jsx(T2e,{className:"rf-mr-2 rf-h-4 rf-w-4 rf-shrink-0 rf-opacity-50"}),G.jsx(Xx.Input,{ref:n,className:lr("rf-flex rf-h-10 rf-w-full rf-rounded-md rf-bg-transparent rf-py-3 rf-text-sm rf-outline-none placeholder:rf-text-zinc-500 disabled:rf-cursor-not-allowed disabled:rf-opacity-50 dark:placeholder:rf-text-zinc-400",t),...e})]}));Mpt.displayName=Xx.Input.displayName;const Tpt=Y.forwardRef(({className:t,...e},n)=>G.jsx(Xx.List,{ref:n,className:lr("rf-max-h-[300px] rf-overflow-y-auto rf-overflow-x-hidden rf-py-1",t),...e}));Tpt.displayName=Xx.List.displayName;const V5e=Y.forwardRef((t,e)=>G.jsx(Xx.Empty,{ref:e,className:"rf-py-6 rf-text-center rf-text-sm",...t}));V5e.displayName=Xx.Empty.displayName;const CI=Y.forwardRef(({className:t,...e},n)=>G.jsx(Xx.Group,{ref:n,className:lr("rf-overflow-hidden rf-px-1 rf-py-0 rf-text-zinc-950 [&_[cmdk-group-heading]]:rf-px-2 [&_[cmdk-group-heading]]:rf-py-1.5 [&_[cmdk-group-heading]]:rf-text-xs [&_[cmdk-group-heading]]:rf-font-medium [&_[cmdk-group-heading]]:rf-text-zinc-500 dark:rf-text-zinc-50 dark:[&_[cmdk-group-heading]]:rf-text-zinc-400",t),...e}));CI.displayName=Xx.Group.displayName;const Sno=Y.forwardRef(({className:t,...e},n)=>G.jsx(Xx.Separator,{ref:n,className:lr("rf--mx-1 rf-h-px rf-bg-zinc-200 dark:rf-bg-zinc-800",t),...e}));Sno.displayName=Xx.Separator.displayName;const MI=Y.forwardRef(({className:t,...e},n)=>G.jsx(Xx.Item,{ref:n,className:lr("rf-relative rf-flex rf-cursor-default rf-gap-2 rf-select-none rf-items-center rf-rounded-sm rf-px-2 rf-py-1.5 rf-text-sm rf-outline-none data-[disabled=true]:rf-pointer-events-none data-[selected=true]:rf-bg-zinc-100 data-[selected=true]:rf-text-zinc-900 data-[disabled=true]:rf-opacity-50 [&_svg]:rf-pointer-events-none [&_svg]:rf-size-4 [&_svg]:rf-shrink-0 dark:data-[selected=true]:rf-bg-zinc-800 dark:data-[selected=true]:rf-text-zinc-50",t),...e}));MI.displayName=Xx.Item.displayName;function Cno(t){const e=Mno(t),n=Y.forwardRef((o,r)=>{const{children:i,...s}=o,a=Y.Children.toArray(i),c=a.find(wno);if(c){const l=c.props.children,u=a.map(_=>_===c?Y.Children.count(l)>1?Y.Children.only(null):Y.isValidElement(l)?l.props.children:null:_);return G.jsx(e,{...s,ref:r,children:Y.isValidElement(l)?Y.cloneElement(l,void 0,u):null})}return G.jsx(e,{...s,ref:r,children:i})});return n.displayName=`${t}.Slot`,n}function Mno(t){const e=Y.forwardRef((n,o)=>{const{children:r,...i}=n;if(Y.isValidElement(r)){const s=Dno(r),a=Eno(i,r.props);return r.type!==Y.Fragment&&(a.ref=o?Rx(o,s):s),Y.cloneElement(r,a)}return Y.Children.count(r)>1?Y.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var Tno=Symbol("radix.slottable");function wno(t){return Y.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Tno}function Eno(t,e){const n={...e};for(const o in e){const r=t[o],i=e[o];/^on[A-Z]/.test(o)?r&&i?n[o]=(...a)=>{const c=i(...a);return r(...a),c}:r&&(n[o]=r):o==="style"?n[o]={...r,...i}:o==="className"&&(n[o]=[r,i].filter(Boolean).join(" "))}return{...t,...n}}function Dno(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var sq="Popover",[wpt]=d4(sq,[vE]),TI=vE(),[Ano,qv]=wpt(sq),Ept=t=>{const{__scopePopover:e,children:n,open:o,defaultOpen:r,onOpenChange:i,modal:s=!1}=t,a=TI(e),c=Y.useRef(null),[l,u]=Y.useState(!1),[_,d]=DP({prop:o,defaultProp:r??!1,onChange:i,caller:sq});return G.jsx(Hj,{...a,children:G.jsx(Ano,{scope:e,contentId:Jp(),triggerRef:c,open:_,onOpenChange:d,onOpenToggle:Y.useCallback(()=>d(m=>!m),[d]),hasCustomAnchor:l,onCustomAnchorAdd:Y.useCallback(()=>u(!0),[]),onCustomAnchorRemove:Y.useCallback(()=>u(!1),[]),modal:s,children:n})})};Ept.displayName=sq;var Dpt="PopoverAnchor",Rno=Y.forwardRef((t,e)=>{const{__scopePopover:n,...o}=t,r=qv(Dpt,n),i=TI(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:a}=r;return Y.useEffect(()=>(s(),()=>a()),[s,a]),G.jsx(Ij,{...i,...o,ref:e})});Rno.displayName=Dpt;var Apt="PopoverTrigger",Rpt=Y.forwardRef((t,e)=>{const{__scopePopover:n,...o}=t,r=qv(Apt,n),i=TI(n),s=tu(e,r.triggerRef),a=G.jsx(Cc.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":Lpt(r.open),...o,ref:s,onClick:Vr(t.onClick,r.onOpenToggle)});return r.hasCustomAnchor?a:G.jsx(Ij,{asChild:!0,...i,children:a})});Rpt.displayName=Apt;var $5e="PopoverPortal",[kno,Nno]=wpt($5e,{forceMount:void 0}),kpt=t=>{const{__scopePopover:e,forceMount:n,children:o,container:r}=t,i=qv($5e,e);return G.jsx(kno,{scope:e,forceMount:n,children:G.jsx(Fg,{present:n||i.open,children:G.jsx(Lj,{asChild:!0,container:r,children:o})})})};kpt.displayName=$5e;var sD="PopoverContent",Npt=Y.forwardRef((t,e)=>{const n=Nno(sD,t.__scopePopover),{forceMount:o=n.forceMount,...r}=t,i=qv(sD,t.__scopePopover);return G.jsx(Fg,{present:o||i.open,children:i.modal?G.jsx(Ino,{...r,ref:e}):G.jsx(Lno,{...r,ref:e})})});Npt.displayName=sD;var Hno=Cno("PopoverContent.RemoveScroll"),Ino=Y.forwardRef((t,e)=>{const n=qv(sD,t.__scopePopover),o=Y.useRef(null),r=tu(e,o),i=Y.useRef(!1);return Y.useEffect(()=>{const s=o.current;if(s)return Y2e(s)},[]),G.jsx(Uj,{as:Hno,allowPinchZoom:!0,children:G.jsx(Hpt,{...t,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Vr(t.onCloseAutoFocus,s=>{s.preventDefault(),i.current||n.triggerRef.current?.focus()}),onPointerDownOutside:Vr(t.onPointerDownOutside,s=>{const a=s.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0,l=a.button===2||c;i.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:Vr(t.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),Lno=Y.forwardRef((t,e)=>{const n=qv(sD,t.__scopePopover),o=Y.useRef(!1),r=Y.useRef(!1);return G.jsx(Hpt,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{t.onCloseAutoFocus?.(i),i.defaultPrevented||(o.current||n.triggerRef.current?.focus(),i.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:i=>{t.onInteractOutside?.(i),i.defaultPrevented||(o.current=!0,i.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const s=i.target;n.triggerRef.current?.contains(s)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&r.current&&i.preventDefault()}})}),Hpt=Y.forwardRef((t,e)=>{const{__scopePopover:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:i,disableOutsidePointerEvents:s,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,..._}=t,d=qv(sD,n),m=TI(n);return D2e(),G.jsx(Sj,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:i,children:G.jsx(ZN,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:u,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>d.onOpenChange(!1),children:G.jsx(X2e,{"data-state":Lpt(d.open),role:"dialog",id:d.contentId,...m,..._,ref:e,style:{..._.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Ipt="PopoverClose",Ono=Y.forwardRef((t,e)=>{const{__scopePopover:n,...o}=t,r=qv(Ipt,n);return G.jsx(Cc.button,{type:"button",...o,ref:e,onClick:Vr(t.onClick,()=>r.onOpenChange(!1))})});Ono.displayName=Ipt;var Fno="PopoverArrow",Bno=Y.forwardRef((t,e)=>{const{__scopePopover:n,...o}=t,r=TI(n);return G.jsx(j2e,{...r,...o,ref:e})});Bno.displayName=Fno;function Lpt(t){return t?"open":"closed"}var zno=Ept,Vno=Rpt,$no=kpt,Opt=Npt;const Wno=zno,Uno=Vno,Fpt=Y.forwardRef(({className:t,align:e="center",sideOffset:n=4,...o},r)=>G.jsx($no,{children:G.jsx(Opt,{ref:r,align:e,sideOffset:n,className:lr("rf-z-50 rf-w-72 rf-rounded-md rf-border rf-border-zinc-200 rf-bg-white rf-p-4 rf-text-zinc-950 rf-shadow-md rf-outline-none 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 rf-origin-[--radix-popover-content-transform-origin] dark:rf-border-zinc-800 dark:rf-bg-zinc-950 dark:rf-text-zinc-50",t),...o})}));Fpt.displayName=Opt.displayName;function Bpt(t,e){const n=t.lastIndexOf("."),o=e.lastIndexOf("."),r=n>0?t.substring(0,n):t,i=o>0?e.substring(0,o):e;if(r!==i&&t.substring(n)===e.substring(o)){if(r.startsWith(i))return 1;if(i.startsWith(r))return-1}return t.localeCompare(e,void 0,{numeric:!0,sensitivity:"base"})}function Xno(t){const e=[],n=new Map;n.set("",{name:"",path:"",type:"folder",children:e});for(const o of t){const r=o.split("/");let i="";for(let s=0;s<r.length;s++){const a=r[s],c=i;if(i=i?`${i}/${a}`:a,!n.has(i)){const l=s===r.length-1,u={name:a,path:i,type:l?"file":"folder",children:l?void 0:[]};n.set(i,u);const _=n.get(c);_&&_.children&&_.children.push(u)}}}return e}function zpt(t,e){for(const n of t){if(n.path===e)return n;if(n.children){const o=zpt(n.children,e);if(o)return o}}return null}function jno(t,e){let n;if(e?n=zpt(t,e):n={name:"",path:"",type:"folder",children:t},!n||!n.children)return{files:[],folders:[]};const o=n.children.filter(i=>i.type==="file"),r=n.children.filter(i=>i.type==="folder");return o.sort((i,s)=>Bpt(i.name,s.name)),r.sort((i,s)=>Bpt(i.name,s.name)),{files:o,folders:r}}function W5e(t){const e=t.lastIndexOf("/");return e===-1?"/":t.substring(0,e)}function Gno({currentFile:t,files:e}){const[n,o]=Y.useState(!1),[r,i]=Y.useState(()=>{if(typeof window<"u"){const c=new URLSearchParams(window.location.search),l=new URLSearchParams(window.location.hash.slice(1)),u=c.get("file")??l.get("file");if(u&&e.includes(u)){const _=W5e(u);return _==="/"?null:_}}if(t&&e.includes(t)){const c=W5e(t);return c==="/"?null:c}return null});return Y.useEffect(()=>{if(t&&!n&&e.includes(t)){const c=W5e(t);i(c==="/"?null:c)}},[t,n,e]),{currentFolder:r,navigateToFolder:c=>{i(c),o(!0)},resetManualNavigation:()=>{o(!1)}}}const U5e=t=>t.endsWith(".tsx")||t.endsWith(".jsx")?G.jsx(RDn,{className:"rf-h-4 rf-w-4 rf-text-blue-500"}):t.endsWith(".md")||t.endsWith(".txt")?G.jsx(IDn,{className:"rf-h-4 rf-w-4 rf-text-gray-600"}):G.jsx(LDn,{className:"rf-h-4 rf-w-4 rf-text-gray-500"}),Yno=t=>t.endsWith(".tsx")||tq(t)||t.endsWith(".jsx"),qno=t=>t.split("/").pop()||"",Vpt=t=>t.substring(0,t.lastIndexOf("/"))||"/",$pt=({files:t,onFileChange:e,currentFile:n,fileFilter:o=Yno,getDisplayName:r=qno,placeholder:i="Select file",searchPlaceholder:s="Search for file",emptyMessage:a="No files found in this directory.",pinnedFiles:c=[],onToggleFavorite:l,recentlySavedFiles:u=[]})=>{const[_,d]=Y.useState(!1),[m,h]=Y.useState(n),{currentFolder:p,navigateToFolder:x,resetManualNavigation:f}=Gno({currentFile:m,files:t}),[g,y]=Y.useState(0),[b,v]=Y.useState(""),[S,M]=RT("runframe:recentlyViewed",[]),[w,D]=RT("runframe:showRecents",!1);Y.useEffect(()=>{const ae=de=>{(de.metaKey||de.ctrlKey)&&de.key==="k"&&(de.preventDefault(),d(be=>!be))};return window.addEventListener("keydown",ae),()=>window.removeEventListener("keydown",ae)},[]);const A=t.filter(o),I=Y.useRef(null);Y.useEffect(()=>{const ae=()=>{I.current&&(clearTimeout(I.current),I.current=null)};return h(n),n&&A.includes(n)&&(ae(),I.current=setTimeout(()=>{M(de=>{if(de[0]===n)return de;const be=de.filter(Ce=>Ce!==n);return[n,...be].slice(0,10)})},500)),ae},[n,A,M]);const H=Xno(A),{files:O,folders:z}=jno(H,p||""),j=(()=>{if(!b.trim())return{currentDirResults:[],globalResults:[]};const ae=b.toLowerCase(),be=A.map(pe=>{const Me=pe.split("/").pop()||"";return{path:pe,fileName:Me}}).filter(pe=>pe.fileName.toLowerCase().includes(ae)||pe.path.toLowerCase().includes(ae)),Ce=be.filter(pe=>p?pe.path.substring(0,pe.path.lastIndexOf("/"))===p:!pe.path.includes("/")),De=be.filter(pe=>p?pe.path.substring(0,pe.path.lastIndexOf("/"))!==p:pe.path.includes("/"));return{currentDirResults:Ce,globalResults:De}})(),q=b.trim().length>0,K=ae=>{x(ae),y(0)},ne=Y.useCallback(()=>{if(!p)return;const ae=p.lastIndexOf("/"),de=ae===-1?null:p.substring(0,ae);K(de)},[p,K]);Y.useEffect(()=>{if(!_)return;const ae=de=>{(de.metaKey||de.ctrlKey)&&de.key==="ArrowUp"&&(de.preventDefault(),ne())};return window.addEventListener("keydown",ae),()=>window.removeEventListener("keydown",ae)},[_,ne]);const ce=Y.useCallback((ae,de,be=!1)=>{if(h(ae),y(de),d(!1),e(ae),be){const Ce=ae.lastIndexOf("/"),De=Ce===-1?null:ae.substring(0,Ce);K(De)}},[e,K]);Y.useEffect(()=>{const ae=de=>{if((de.metaKey||de.ctrlKey)&&(de.key==="ArrowLeft"||de.key==="ArrowRight")){if(de.preventDefault(),!n||O.length===0)return;const be=O.findIndex(pe=>pe.path===n);if(be===-1)return;let Ce;de.key==="ArrowLeft"?Ce=be===0?O.length-1:be-1:Ce=be===O.length-1?0:be+1;const De=O[Ce];De&&ce(De.path,Ce)}};return window.addEventListener("keydown",ae),()=>window.removeEventListener("keydown",ae)},[n,O,ce]),Y.useEffect(()=>{if(O.length>0){const ae=O.findIndex(de=>de.path===n);ae>=0&&y(ae)}},[O,n]);const ee=Y.useMemo(()=>{const ae=u.filter(Ce=>A.includes(Ce)),de=S.filter(Ce=>A.includes(Ce)),be=[];ae.length>0&&be.push({path:ae[0],type:"saved"});for(const Ce of de){if(be.length>=3)break;be.some(De=>De.path===Ce)||be.push({path:Ce,type:"viewed"})}return be},[u,S,A]),oe=p??"/";oe.length>25&&""+oe.slice(-22);const ie=()=>`rf-w-full rf-min-w-[600px] ${q?"rf-max-w-[600px]":"rf-max-w-[1000px]"}`;return G.jsx("div",{className:"rf-flex rf-items-center rf-gap-1",children:G.jsxs(Wno,{open:_,onOpenChange:ae=>{d(ae),ae||(v(""),f())},children:[G.jsx(Uno,{asChild:!0,children:G.jsxs(dc,{variant:"outline",role:"combobox","aria-expanded":_,className:"rf-w-fit rf-min-w-32 rf-max-w-100 rf-justify-center rf-items-center rf-gap-1 !rf-font-normal",children:[G.jsx("span",{className:"rf-truncate rf-text-left",children:m?r(m):i}),G.jsx(MDn,{className:"rf-opacity-50 rf-flex-shrink-0"})]})}),G.jsx(Fpt,{className:lr("!rf-p-0 !rf-overflow-y-auto !rf-max-h-[80vh] !rf-z-[200]",ie()),children:G.jsxs(Cpt,{shouldFilter:!1,children:[G.jsx(Mpt,{placeholder:s,className:"rf-h-9 rf-w-full",value:b,onValueChange:v}),ee.length>0&&G.jsxs("div",{className:"rf-border-b rf-border-gray-200",children:[G.jsxs("button",{onClick:()=>D(!w),className:"rf-w-full rf-px-3 rf-py-2 rf-flex rf-items-center rf-justify-between rf-text-xs rf-text-slate-600 hover:rf-bg-slate-50 rf-bg-transparent rf-border-none rf-cursor-pointer",children:[G.jsx("span",{className:"rf-font-medium",children:"Recent Files"}),G.jsx(M2e,{className:lr("rf-h-4 rf-w-4 rf-transition-transform",!w&&"-rf-rotate-90")})]}),w&&G.jsx("div",{className:"rf-pb-1",children:ee.map((ae,de)=>G.jsxs("div",{onClick:()=>ce(ae.path,de,!0),className:lr("rf-flex rf-items-center rf-px-3 rf-py-1.5 rf-cursor-pointer hover:rf-bg-slate-100",ae.path===n&&"rf-font-medium"),children:[ae.type==="saved"?G.jsx("span",{title:"Recently saved",children:G.jsx(XDn,{className:"rf-mr-2 rf-h-4 rf-w-4 rf-text-green-500"})}):G.jsx("span",{title:"Recently viewed",children:G.jsx(ADn,{className:"rf-mr-2 rf-h-4 rf-w-4 rf-text-blue-500"})}),G.jsx("span",{className:"rf-text-sm",children:r(ae.path.split("/").pop()||"")}),G.jsx("span",{className:"rf-text-xs rf-text-muted-foreground rf-ml-2 rf-truncate rf-max-w-[40%]",children:Vpt(ae.path)}),G.jsx(T8,{className:lr("rf-ml-auto rf-h-4 rf-w-4",ae.path===n?"rf-opacity-100":"rf-opacity-0")})]},ae.path))})]}),G.jsxs("div",{className:"rf-px-3 rf-py-2 rf-bg-slate-50 rf-flex rf-items-center rf-justify-between rf-gap-2",children:[G.jsx("div",{className:"rf-flex rf-items-center rf-text-xs rf-text-slate-600 rf-min-w-0 rf-flex-1",children:G.jsxs("div",{className:"rf-flex rf-items-center rf-min-w-0",children:[G.jsx("button",{onClick:()=>K(null),className:"rf-text-blue-600 hover:rf-text-blue-800 rf-underline rf-cursor-pointer rf-bg-transparent rf-border-none rf-p-0 rf-flex-shrink-0",children:"root"}),p?.split("/").filter(Boolean).map((ae,de,be)=>{const Ce=be.slice(0,de+1).join("/");return G.jsxs("span",{className:"rf-flex rf-items-center rf-min-w-0",children:[G.jsx("span",{className:"rf-mx-1 rf-flex-shrink-0",children:"/"}),de===be.length-1?G.jsx("span",{className:"rf-text-slate-800 rf-truncate rf-max-w-[200px]",title:ae,children:ae}):G.jsx("button",{onClick:()=>K(Ce),className:"rf-text-blue-600 hover:rf-text-blue-800 rf-underline rf-cursor-pointer rf-bg-transparent rf-border-none rf-p-0 rf-truncate rf-max-w-[150px]",title:ae,children:ae})]},Ce)})]})}),G.jsx("div",{className:"rf-flex rf-items-center rf-gap-2 rf-flex-shrink-0",children:p&&G.jsxs("button",{onClick:ne,className:"rf-flex rf-items-center rf-gap-1 rf-text-slate-600 hover:rf-text-slate-800 rf-bg-transparent rf-border-none rf-p-1 rf-rounded hover:rf-bg-slate-200 rf-transition-colors",title:"Go up one level",children:[G.jsx(SDn,{className:"rf-h-3 rf-w-3"}),G.jsx("span",{className:"rf-text-xs rf-font-medium",children:"Up"})]})})]}),G.jsx(Tpt,{className:"rf-overflow-visible rf-max-h-none",children:q?G.jsx(G.Fragment,{children:j.currentDirResults.length===0&&j.globalResults.length===0?G.jsxs(V5e,{children:['No files found matching "',b,'".']}):G.jsxs(G.Fragment,{children:[j.currentDirResults.length>0&&G.jsx(CI,{children:j.currentDirResults.map((ae,de)=>G.jsxs(MI,{value:`search-current:${ae.path}`,onSelect:()=>{h(ae.path),d(!1),e(ae.path)},className:lr(ae.path===n&&"rf-font-medium","rf-group"),children:[G.jsx("span",{className:"rf-mr-2",children:U5e(ae.fileName)}),G.jsxs("div",{className:"rf-flex rf-items-center rf-w-full rf-min-w-0",children:[G.jsx("span",{className:"rf-truncate rf-flex-1",children:r(ae.fileName)}),G.jsx("span",{className:"rf-text-xs rf-text-muted-foreground rf-ml-2 rf-truncate rf-max-w-[40%]",children:p||"/"}),ae.path===n&&G.jsx(T8,{className:"rf-ml-2 rf-h-4 rf-w-4 rf-flex-shrink-0"})]})]},ae.path))}),j.globalResults.length>0&&G.jsx(CI,{children:j.globalResults.map(ae=>G.jsxs(MI,{value:`search-global:${ae.path}`,onSelect:()=>{h(ae.path),d(!1),e(ae.path)},className:lr(ae.path===n&&"rf-font-medium","rf-group"),children:[G.jsx("span",{className:"rf-mr-2",children:U5e(ae.fileName)}),G.jsxs("div",{className:"rf-flex rf-items-center rf-w-full rf-min-w-0",children:[G.jsx("span",{className:"rf-truncate rf-flex-1",children:r(ae.fileName)}),G.jsx("span",{className:"rf-text-xs rf-text-muted-foreground rf-ml-2 rf-truncate rf-max-w-[40%]",children:Vpt(ae.path)}),ae.path===n&&G.jsx(T8,{className:"rf-ml-2 rf-h-4 rf-w-4 rf-flex-shrink-0"})]})]},ae.path))})]})}):G.jsxs(G.Fragment,{children:[G.jsx(V5e,{children:a}),O.length>0&&G.jsx(CI,{children:O.map((ae,de)=>G.jsxs(MI,{value:`current:${ae.path}`,onSelect:()=>ce(ae.path,de),className:lr(ae.path===n&&"rf-font-medium","rf-group"),children:[G.jsx("span",{className:"rf-mr-2",children:U5e(ae.name)}),r(ae.name),G.jsx("div",{className:"rf-ml-auto rf-flex rf-items-center rf-gap-1",children:G.jsx(T8,{className:lr("rf-h-4 rf-w-4",ae.path===n?"rf-opacity-100":"rf-opacity-0")})})]},ae.path))}),z.length>0&&G.jsx(CI,{children:z.map(ae=>G.jsxs(MI,{value:`folder-${ae.path}`,onSelect:()=>K(ae.path),className:"rf-text-slate-600 hover:rf-text-slate-900",children:[G.jsx(ODn,{className:"rf-mr-2 rf-h-4 rf-w-4 rf-text-blue-600"}),ae.name,G.jsx(xE,{className:"rf-ml-auto rf-h-4 rf-w-4"})]},ae.path))}),O.length===0&&z.length===0&&G.jsx("div",{className:"rf-p-4 rf-text-center rf-text-slate-500 rf-text-sm",children:"No files or folders in this directory"})]})})]})})]})})},Wpt=({files:t,onFileChange:e,currentFile:n})=>G.jsx($pt,{files:t,onFileChange:e,currentFile:n,fileFilter:()=>!0,placeholder:"Select circuit",searchPlaceholder:"Search for circuit file",emptyMessage:"No circuit files found in this directory."}),Jno=t=>{fY();const[e,n]=Y.useState(()=>t.initialCircuitPath??""),[o,r]=Y.useState(null),[i,s]=Y.useState(!1),[a,c]=Y.useState({}),[l,u]=Y.useState(new Set),[_,d]=Y.useState(new Set),m=t.files,h=m.map(b=>b.filePath),p=Y.useCallback(async b=>{if(!b.fileStaticAssetUrl)throw new Error(`No fileStaticAssetUrl provided for ${b.filePath}`);const v=await fetch(b.fileStaticAssetUrl);if(!v.ok)throw new Error(`Failed to fetch ${b.filePath}: ${v.statusText}`);return await v.json()},[]),x=Y.useCallback(async b=>{if(a[b]){r(a[b]),t.onCircuitJsonPathChange?.(b);return}if(_.has(b)){console.warn(`Skipping failed file: ${b}`),r(null);return}if(!l.has(b)){u(v=>new Set(v).add(b)),s(!0),r(null);try{const v=m.find(w=>w.filePath===b);if(!v)throw new Error(`File reference not found for ${b}`);const M=await(t.onFetchFile||p)(v);c(w=>({...w,[b]:M})),r(M),t.onCircuitJsonPathChange?.(b),d(w=>{const D=new Set(w);return D.delete(b),D})}catch(v){console.error(`Failed to load circuit JSON file ${b}:`,v),d(S=>new Set(S).add(b)),r(null)}finally{u(v=>{const S=new Set(v);return S.delete(b),S}),s(!1)}}},[m,a,l,_,t.onFetchFile,t.onCircuitJsonPathChange,p]);Y.useEffect(()=>{if(h.length===0)return;let b=e;(!b||!h.includes(b))&&(b=aft(h)??h[0],n(b)),b&&h.includes(b)&&x(b)},[e]);const f=Y.useCallback(b=>{n(b)},[]),g=Y.useCallback(b=>{d(v=>{const S=new Set(v);return S.delete(b),S}),x(b)},[x]);if(h.length===0)return G.jsx("div",{className:"rf-flex rf-flex-col rf-w-full rf-h-full rf-items-center rf-justify-center",children:G.jsxs("div",{className:"rf-text-center rf-p-8",children:[G.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-gray-800 rf-mb-2",children:"No Circuit JSON Files Found"}),G.jsx("p",{className:"rf-text-sm rf-text-gray-600",children:"Please provide circuit JSON files to view."})]})});const y=_.has(e);return G.jsx(M5,{fallbackRender:({error:b})=>G.jsx("div",{className:"rf-mt-4 rf-mx-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:G.jsxs("div",{className:"rf-p-4",children:[G.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Circuit JSON Preview"}),G.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:b.message})]})}),children:y?G.jsxs("div",{className:"rf-w-full rf-h-full rf-flex rf-flex-col",children:[G.jsxs("div",{className:"rf-flex rf-items-center rf-justify-between rf-w-full rf-p-4 rf-border-b rf-border-gray-200",children:[(t.showFileMenu??!0)&&G.jsx(bI,{isWebEmbedded:!0,circuitJson:null,projectName:t.projectName}),h.length>1&&G.jsx("div",{className:"rf-absolute rf-left-1/2 rf-transform rf--translate-x-1/2 rf-flex rf-items-center rf-gap-2",children:G.jsx(Wpt,{currentFile:e,files:h,onFileChange:f})})]}),G.jsx("div",{className:"rf-flex-1 rf-flex rf-items-center rf-justify-center",children:G.jsxs("div",{className:"rf-text-center rf-p-8",children:[G.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-600 rf-mb-2",children:"Failed to Load Circuit File"}),G.jsxs("p",{className:"rf-text-sm rf-text-gray-600 rf-mb-4",children:["Could not load: ",e]}),G.jsxs("div",{className:"rf-flex rf-flex-col rf-items-center rf-gap-2",children:[G.jsx("button",{onClick:()=>g(e),className:"rf-px-4 rf-py-2 rf-bg-blue-500 rf-text-white rf-rounded rf-hover:bg-blue-600",children:"Retry"}),h.length>1&&G.jsx("p",{className:"rf-text-xs rf-text-gray-500",children:"Or select a different file from the dropdown above"})]})]})})]}):G.jsx(Bmt,{circuitJson:o,defaultToFullScreen:t.defaultToFullScreen,showToggleFullScreen:t.showToggleFullScreen,showFileMenu:!1,isWebEmbedded:!1,projectName:t.projectName,defaultActiveTab:t.tabSelected,leftHeaderContent:G.jsxs("div",{className:"rf-flex rf-items-center rf-justify-between rf-w-full",children:[(t.showFileMenu??!0)&&G.jsx(bI,{isWebEmbedded:!0,circuitJson:o,projectName:t.projectName}),h.length>1&&G.jsx("div",{className:`rf-absolute rf-left-1/2 rf-transform rf--translate-x-1/2 rf-flex rf-items-center rf-gap-2 ${i?"rf-opacity-50":""}`,children:G.jsx(Wpt,{currentFile:e,files:h,onFileChange:f})})]})})})},Kno=()=>{const t=eu(e=>e.fsMap);Y.useEffect(()=>{if(!document||!t)return;const e=Array.from(t.keys()),n=aft(e),o=t.get("package.json");try{if(o){const r=JSON.parse(o);if(r?.name){document.title=r.name;return}}}catch{}n&&(document.title=n)},[t])},Upt=(t,e,n)=>{const o=t instanceof RegExp?Xpt(t,n):t,r=e instanceof RegExp?Xpt(e,n):e,i=o!==null&&r!=null&&Qno(o,r,n);return i&&{start:i[0],end:i[1],pre:n.slice(0,i[0]),body:n.slice(i[0]+o.length,i[1]),post:n.slice(i[1]+r.length)}},Xpt=(t,e)=>{const n=e.match(t);return n?n[0]:null},Qno=(t,e,n)=>{let o,r,i,s,a,c=n.indexOf(t),l=n.indexOf(e,c+1),u=c;if(c>=0&&l>0){if(t===e)return[c,l];for(o=[],i=n.length;u>=0&&!a;){if(u===c)o.push(u),c=n.indexOf(t,u+1);else if(o.length===1){const _=o.pop();_!==void 0&&(a=[_,l])}else r=o.pop(),r!==void 0&&r<i&&(i=r,s=l),l=n.indexOf(e,u+1);u=c<l&&c>=0?c:l}o.length&&s!==void 0&&(a=[i,s])}return a},jpt="\0SLASH"+Math.random()+"\0",Gpt="\0OPEN"+Math.random()+"\0",X5e="\0CLOSE"+Math.random()+"\0",Ypt="\0COMMA"+Math.random()+"\0",qpt="\0PERIOD"+Math.random()+"\0",Zno=new RegExp(jpt,"g"),eoo=new RegExp(Gpt,"g"),too=new RegExp(X5e,"g"),noo=new RegExp(Ypt,"g"),ooo=new RegExp(qpt,"g"),roo=/\\\\/g,ioo=/\\{/g,soo=/\\}/g,aoo=/\\,/g,coo=/\\./g;function j5e(t){return isNaN(t)?t.charCodeAt(0):parseInt(t,10)}function loo(t){return t.replace(roo,jpt).replace(ioo,Gpt).replace(soo,X5e).replace(aoo,Ypt).replace(coo,qpt)}function uoo(t){return t.replace(Zno,"\\").replace(eoo,"{").replace(too,"}").replace(noo,",").replace(ooo,".")}function Jpt(t){if(!t)return[""];const e=[],n=Upt("{","}",t);if(!n)return t.split(",");const{pre:o,body:r,post:i}=n,s=o.split(",");s[s.length-1]+="{"+r+"}";const a=Jpt(i);return i.length&&(s[s.length-1]+=a.shift(),s.push.apply(s,a)),e.push.apply(e,s),e}function _oo(t){return t?(t.slice(0,2)==="{}"&&(t="\\{\\}"+t.slice(2)),wI(loo(t),!0).map(uoo)):[]}function doo(t){return"{"+t+"}"}function hoo(t){return/^-?0\d/.test(t)}function moo(t,e){return t<=e}function poo(t,e){return t>=e}function wI(t,e){const n=[],o=Upt("{","}",t);if(!o)return[t];const r=o.pre,i=o.post.length?wI(o.post,!1):[""];if(/\$$/.test(o.pre))for(let s=0;s<i.length;s++){const a=r+"{"+o.body+"}"+i[s];n.push(a)}else{const s=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(o.body),a=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(o.body),c=s||a,l=o.body.indexOf(",")>=0;if(!c&&!l)return o.post.match(/,(?!,).*\}/)?(t=o.pre+"{"+o.body+X5e+o.post,wI(t)):[t];let u;if(c)u=o.body.split(/\.\./);else if(u=Jpt(o.body),u.length===1&&u[0]!==void 0&&(u=wI(u[0],!1).map(doo),u.length===1))return i.map(d=>o.pre+u[0]+d);let _;if(c&&u[0]!==void 0&&u[1]!==void 0){const d=j5e(u[0]),m=j5e(u[1]),h=Math.max(u[0].length,u[1].length);let p=u.length===3&&u[2]!==void 0?Math.abs(j5e(u[2])):1,x=moo;m<d&&(p*=-1,x=poo);const g=u.some(hoo);_=[];for(let y=d;x(y,m);y+=p){let b;if(a)b=String.fromCharCode(y),b==="\\"&&(b="");else if(b=String(y),g){const v=h-b.length;if(v>0){const S=new Array(v+1).join("0");y<0?b="-"+S+b.slice(1):b=S+b}}_.push(b)}}else{_=[];for(let d=0;d<u.length;d++)_.push.apply(_,wI(u[d],!1))}for(let d=0;d<_.length;d++)for(let m=0;m<i.length;m++){const h=r+_[d]+i[m];(!e||c||h)&&n.push(h)}}return n}const foo=1024*64,aq=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>foo)throw new TypeError("pattern is too long")},xoo={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},EI=t=>t.replace(/[[\]\\-]/g,"\\$&"),goo=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Kpt=t=>t.join(""),yoo=(t,e)=>{const n=e;if(t.charAt(n)!=="[")throw new Error("not in a brace expression");const o=[],r=[];let i=n+1,s=!1,a=!1,c=!1,l=!1,u=n,_="";e:for(;i<t.length;){const p=t.charAt(i);if((p==="!"||p==="^")&&i===n+1){l=!0,i++;continue}if(p==="]"&&s&&!c){u=i+1;break}if(s=!0,p==="\\"&&!c){c=!0,i++;continue}if(p==="["&&!c){for(const[x,[f,g,y]]of Object.entries(xoo))if(t.startsWith(x,i)){if(_)return["$.",!1,t.length-n,!0];i+=x.length,y?r.push(f):o.push(f),a=a||g;continue e}}if(c=!1,_){p>_?o.push(EI(_)+"-"+EI(p)):p===_&&o.push(EI(p)),_="",i++;continue}if(t.startsWith("-]",i+1)){o.push(EI(p+"-")),i+=2;continue}if(t.startsWith("-",i+1)){_=p,i+=2;continue}o.push(EI(p)),i++}if(u<i)return["",!1,0,!1];if(!o.length&&!r.length)return["$.",!1,t.length-n,!0];if(r.length===0&&o.length===1&&/^\\?.$/.test(o[0])&&!l){const p=o[0].length===2?o[0].slice(-1):o[0];return[goo(p),!1,u-n,!1]}const d="["+(l?"^":"")+Kpt(o)+"]",m="["+(l?"":"^")+Kpt(r)+"]";return[o.length&&r.length?"("+d+"|"+m+")":o.length?d:m,a,u-n,!0]},DI=(t,{windowsPathsNoEscape:e=!1,magicalBraces:n=!0}={})=>n?e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"):e?t.replace(/\[([^\/\\{}])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\{}])\]/g,"$1$2").replace(/\\([^\/{}])/g,"$1"),boo=new Set(["!","?","+","*","@"]),Qpt=t=>boo.has(t),Poo="(?!(?:^|/)\\.\\.?(?:$|/))",cq="(?!\\.)",voo=new Set(["[","."]),Soo=new Set(["..","."]),Coo=new Set("().*{}+?[]^$\\!"),Moo=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),G5e="[^/]",Zpt=G5e+"*?",eft=G5e+"+?";class x2{type;#o;#n;#r=!1;#t=[];#e;#s;#i;#l=!1;#a;#u;#_=!1;constructor(e,n,o={}){this.type=e,e&&(this.#n=!0),this.#e=n,this.#o=this.#e?this.#e.#o:this,this.#a=this.#o===this?o:this.#o.#a,this.#i=this.#o===this?[]:this.#o.#i,e==="!"&&!this.#o.#l&&this.#i.push(this),this.#s=this.#e?this.#e.#t.length:0}get hasMagic(){if(this.#n!==void 0)return this.#n;for(const e of this.#t)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#n=!0;return this.#n}toString(){return this.#u!==void 0?this.#u:this.type?this.#u=this.type+"("+this.#t.map(e=>String(e)).join("|")+")":this.#u=this.#t.map(e=>String(e)).join("")}#d(){if(this!==this.#o)throw new Error("should only call on root");if(this.#l)return this;this.toString(),this.#l=!0;let e;for(;e=this.#i.pop();){if(e.type!=="!")continue;let n=e,o=n.#e;for(;o;){for(let r=n.#s+1;!o.type&&r<o.#t.length;r++)for(const i of e.#t){if(typeof i=="string")throw new Error("string part in extglob AST??");i.copyIn(o.#t[r])}n=o,o=n.#e}}return this}push(...e){for(const n of e)if(n!==""){if(typeof n!="string"&&!(n instanceof x2&&n.#e===this))throw new Error("invalid part: "+n);this.#t.push(n)}}toJSON(){const e=this.type===null?this.#t.slice().map(n=>typeof n=="string"?n:n.toJSON()):[this.type,...this.#t.map(n=>n.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#o||this.#o.#l&&this.#e?.type==="!")&&e.push({}),e}isStart(){if(this.#o===this)return!0;if(!this.#e?.isStart())return!1;if(this.#s===0)return!0;const e=this.#e;for(let n=0;n<this.#s;n++){const o=e.#t[n];if(!(o instanceof x2&&o.type==="!"))return!1}return!0}isEnd(){if(this.#o===this||this.#e?.type==="!")return!0;if(!this.#e?.isEnd())return!1;if(!this.type)return this.#e?.isEnd();const e=this.#e?this.#e.#t.length:0;return this.#s===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){const n=new x2(this.type,e);for(const o of this.#t)n.copyIn(o);return n}static#c(e,n,o,r){let i=!1,s=!1,a=-1,c=!1;if(n.type===null){let m=o,h="";for(;m<e.length;){const p=e.charAt(m++);if(i||p==="\\"){i=!i,h+=p;continue}if(s){m===a+1?(p==="^"||p==="!")&&(c=!0):p==="]"&&!(m===a+2&&c)&&(s=!1),h+=p;continue}else if(p==="["){s=!0,a=m,c=!1,h+=p;continue}if(!r.noext&&Qpt(p)&&e.charAt(m)==="("){n.push(h),h="";const x=new x2(p,n);m=x2.#c(e,x,m,r),n.push(x);continue}h+=p}return n.push(h),m}let l=o+1,u=new x2(null,n);const _=[];let d="";for(;l<e.length;){const m=e.charAt(l++);if(i||m==="\\"){i=!i,d+=m;continue}if(s){l===a+1?(m==="^"||m==="!")&&(c=!0):m==="]"&&!(l===a+2&&c)&&(s=!1),d+=m;continue}else if(m==="["){s=!0,a=l,c=!1,d+=m;continue}if(Qpt(m)&&e.charAt(l)==="("){u.push(d),d="";const h=new x2(m,u);u.push(h),l=x2.#c(e,h,l,r);continue}if(m==="|"){u.push(d),d="",_.push(u),u=new x2(null,n);continue}if(m===")")return d===""&&n.#t.length===0&&(n.#_=!0),u.push(d),d="",n.push(..._,u),l;d+=m}return n.type=null,n.#n=void 0,n.#t=[e.substring(o-1)],l}static fromGlob(e,n={}){const o=new x2(null,void 0,n);return x2.#c(e,o,0,n),o}toMMPattern(){if(this!==this.#o)return this.#o.toMMPattern();const e=this.toString(),[n,o,r,i]=this.toRegExpSource();if(!(r||this.#n||this.#a.nocase&&!this.#a.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return o;const a=(this.#a.nocase?"i":"")+(i?"u":"");return Object.assign(new RegExp(`^${n}$`,a),{_src:n,_glob:e})}get options(){return this.#a}toRegExpSource(e){const n=e??!!this.#a.dot;if(this.#o===this&&this.#d(),!this.type){const c=this.isStart()&&this.isEnd()&&!this.#t.some(m=>typeof m!="string"),l=this.#t.map(m=>{const[h,p,x,f]=typeof m=="string"?x2.#p(m,this.#n,c):m.toRegExpSource(e);return this.#n=this.#n||x,this.#r=this.#r||f,h}).join("");let u="";if(this.isStart()&&typeof this.#t[0]=="string"&&!(this.#t.length===1&&Soo.has(this.#t[0]))){const h=voo,p=n&&h.has(l.charAt(0))||l.startsWith("\\.")&&h.has(l.charAt(2))||l.startsWith("\\.\\.")&&h.has(l.charAt(4)),x=!n&&!e&&h.has(l.charAt(0));u=p?Poo:x?cq:""}let _="";return this.isEnd()&&this.#o.#l&&this.#e?.type==="!"&&(_="(?:$|\\/)"),[u+l+_,DI(l),this.#n=!!this.#n,this.#r]}const o=this.type==="*"||this.type==="+",r=this.type==="!"?"(?:(?!(?:":"(?:";let i=this.#h(n);if(this.isStart()&&this.isEnd()&&!i&&this.type!=="!"){const c=this.toString();return this.#t=[c],this.type=null,this.#n=void 0,[c,DI(this.toString()),!1,!1]}let s=!o||e||n||!cq?"":this.#h(!0);s===i&&(s=""),s&&(i=`(?:${i})(?:${s})*?`);let a="";if(this.type==="!"&&this.#_)a=(this.isStart()&&!n?cq:"")+eft;else{const c=this.type==="!"?"))"+(this.isStart()&&!n&&!e?cq:"")+Zpt+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&s?")":this.type==="*"&&s?")?":`)${this.type}`;a=r+i+c}return[a,DI(i),this.#n=!!this.#n,this.#r]}#h(e){return this.#t.map(n=>{if(typeof n=="string")throw new Error("string type in extglob ast??");const[o,r,i,s]=n.toRegExpSource(e);return this.#r=this.#r||s,o}).filter(n=>!(this.isStart()&&this.isEnd())||!!n).join("|")}static#p(e,n,o=!1){let r=!1,i="",s=!1;for(let a=0;a<e.length;a++){const c=e.charAt(a);if(r){r=!1,i+=(Coo.has(c)?"\\":"")+c;continue}if(c==="\\"){a===e.length-1?i+="\\\\":r=!0;continue}if(c==="["){const[l,u,_,d]=yoo(e,a);if(_){i+=l,s=s||u,a+=_-1,n=n||d;continue}}if(c==="*"){i+=o&&e==="*"?eft:Zpt,n=!0;continue}if(c==="?"){i+=G5e,n=!0;continue}i+=Moo(c)}return[i,DI(e),!!n,s]}}const Too=(t,{windowsPathsNoEscape:e=!1,magicalBraces:n=!1}={})=>n?e?t.replace(/[?*()[\]{}]/g,"[$&]"):t.replace(/[?*()[\]\\{}]/g,"\\$&"):e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&");var aD={env:{}};const g2=(t,e,n={})=>(aq(e),!n.nocomment&&e.charAt(0)==="#"?!1:new AI(e,n).match(t)),woo=/^\*+([^+@!?\*\[\(]*)$/,Eoo=t=>e=>!e.startsWith(".")&&e.endsWith(t),Doo=t=>e=>e.endsWith(t),Aoo=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),Roo=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),koo=/^\*+\.\*+$/,Noo=t=>!t.startsWith(".")&&t.includes("."),Hoo=t=>t!=="."&&t!==".."&&t.includes("."),Ioo=/^\.\*+$/,Loo=t=>t!=="."&&t!==".."&&t.startsWith("."),Ooo=/^\*+$/,Foo=t=>t.length!==0&&!t.startsWith("."),Boo=t=>t.length!==0&&t!=="."&&t!=="..",zoo=/^\?+([^+@!?\*\[\(]*)?$/,Voo=([t,e=""])=>{const n=tft([t]);return e?(e=e.toLowerCase(),o=>n(o)&&o.toLowerCase().endsWith(e)):n},$oo=([t,e=""])=>{const n=nft([t]);return e?(e=e.toLowerCase(),o=>n(o)&&o.toLowerCase().endsWith(e)):n},Woo=([t,e=""])=>{const n=nft([t]);return e?o=>n(o)&&o.endsWith(e):n},Uoo=([t,e=""])=>{const n=tft([t]);return e?o=>n(o)&&o.endsWith(e):n},tft=([t])=>{const e=t.length;return n=>n.length===e&&!n.startsWith(".")},nft=([t])=>{const e=t.length;return n=>n.length===e&&n!=="."&&n!==".."},oft=typeof aD=="object"&&aD?typeof aD.env=="object"&&aD.env&&aD.env.__MINIMATCH_TESTING_PLATFORM__||aD.platform:"posix",rft={win32:{sep:"\\"},posix:{sep:"/"}},Xoo=oft==="win32"?rft.win32.sep:rft.posix.sep;g2.sep=Xoo;const O5=Symbol("globstar **");g2.GLOBSTAR=O5;const joo="[^/]"+"*?",Goo="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Yoo="(?:(?!(?:\\/|^)\\.).)*?",qoo=(t,e={})=>n=>g2(n,t,e);g2.filter=qoo;const F5=(t,e={})=>Object.assign({},t,e),Joo=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return g2;const e=g2;return Object.assign((o,r,i={})=>e(o,r,F5(t,i)),{Minimatch:class extends e.Minimatch{constructor(r,i={}){super(r,F5(t,i))}static defaults(r){return e.defaults(F5(t,r)).Minimatch}},AST:class extends e.AST{constructor(r,i,s={}){super(r,i,F5(t,s))}static fromGlob(r,i={}){return e.AST.fromGlob(r,F5(t,i))}},unescape:(o,r={})=>e.unescape(o,F5(t,r)),escape:(o,r={})=>e.escape(o,F5(t,r)),filter:(o,r={})=>e.filter(o,F5(t,r)),defaults:o=>e.defaults(F5(t,o)),makeRe:(o,r={})=>e.makeRe(o,F5(t,r)),braceExpand:(o,r={})=>e.braceExpand(o,F5(t,r)),match:(o,r,i={})=>e.match(o,r,F5(t,i)),sep:e.sep,GLOBSTAR:O5})};g2.defaults=Joo;const ift=(t,e={})=>(aq(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:_oo(t));g2.braceExpand=ift;const Koo=(t,e={})=>new AI(t,e).makeRe();g2.makeRe=Koo;const Qoo=(t,e,n={})=>{const o=new AI(e,n);return t=t.filter(r=>o.match(r)),o.options.nonull&&!t.length&&t.push(e),t};g2.match=Qoo;const sft=/[?*]|[+@!]\(.*?\)|\[|\]/,Zoo=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");class AI{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,n={}){aq(e),n=n||{},this.options=n,this.pattern=e,this.platform=n.platform||oft,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!n.windowsPathsNoEscape||n.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!n.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!n.nonegate,this.comment=!1,this.empty=!1,this.partial=!!n.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=n.windowsNoMagicRoot!==void 0?n.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const e of this.set)for(const n of e)if(typeof n!="string")return!0;return!1}debug(...e){}make(){const e=this.pattern,n=this.options;if(!n.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],n.debug&&(this.debug=(...i)=>console.error(...i)),this.debug(this.pattern,this.globSet);const o=this.globSet.map(i=>this.slashSplit(i));this.globParts=this.preprocess(o),this.debug(this.pattern,this.globParts);let r=this.globParts.map((i,s,a)=>{if(this.isWindows&&this.windowsNoMagicRoot){const c=i[0]===""&&i[1]===""&&(i[2]==="?"||!sft.test(i[2]))&&!sft.test(i[3]),l=/^[a-z]:/i.test(i[0]);if(c)return[...i.slice(0,4),...i.slice(4).map(u=>this.parse(u))];if(l)return[i[0],...i.slice(1).map(u=>this.parse(u))]}return i.map(c=>this.parse(c))});if(this.debug(this.pattern,r),this.set=r.filter(i=>i.indexOf(!1)===-1),this.isWindows)for(let i=0;i<this.set.length;i++){const s=this.set[i];s[0]===""&&s[1]===""&&this.globParts[i][2]==="?"&&typeof s[3]=="string"&&/^[a-z]:$/i.test(s[3])&&(s[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let o=0;o<e.length;o++)for(let r=0;r<e[o].length;r++)e[o][r]==="**"&&(e[o][r]="*");const{optimizationLevel:n=1}=this.options;return n>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):n>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(n=>{let o=-1;for(;(o=n.indexOf("**",o+1))!==-1;){let r=o;for(;n[r+1]==="**";)r++;r!==o&&n.splice(o,r-o)}return n})}levelOneOptimize(e){return e.map(n=>(n=n.reduce((o,r)=>{const i=o[o.length-1];return r==="**"&&i==="**"?o:r===".."&&i&&i!==".."&&i!=="."&&i!=="**"?(o.pop(),o):(o.push(r),o)},[]),n.length===0?[""]:n))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let n=!1;do{if(n=!1,!this.preserveMultipleSlashes){for(let r=1;r<e.length-1;r++){const i=e[r];r===1&&i===""&&e[0]===""||(i==="."||i==="")&&(n=!0,e.splice(r,1),r--)}e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")&&(n=!0,e.pop())}let o=0;for(;(o=e.indexOf("..",o+1))!==-1;){const r=e[o-1];r&&r!=="."&&r!==".."&&r!=="**"&&(n=!0,e.splice(o-1,2),o-=2)}}while(n);return e.length===0?[""]:e}firstPhasePreProcess(e){let n=!1;do{n=!1;for(let o of e){let r=-1;for(;(r=o.indexOf("**",r+1))!==-1;){let s=r;for(;o[s+1]==="**";)s++;s>r&&o.splice(r+1,s-r);let a=o[r+1];const c=o[r+2],l=o[r+3];if(a!==".."||!c||c==="."||c===".."||!l||l==="."||l==="..")continue;n=!0,o.splice(r,1);const u=o.slice(0);u[r]="**",e.push(u),r--}if(!this.preserveMultipleSlashes){for(let s=1;s<o.length-1;s++){const a=o[s];s===1&&a===""&&o[0]===""||(a==="."||a==="")&&(n=!0,o.splice(s,1),s--)}o[0]==="."&&o.length===2&&(o[1]==="."||o[1]==="")&&(n=!0,o.pop())}let i=0;for(;(i=o.indexOf("..",i+1))!==-1;){const s=o[i-1];if(s&&s!=="."&&s!==".."&&s!=="**"){n=!0;const c=i===1&&o[i+1]==="**"?["."]:[];o.splice(i-1,2,...c),o.length===0&&o.push(""),i-=2}}}}while(n);return e}secondPhasePreProcess(e){for(let n=0;n<e.length-1;n++)for(let o=n+1;o<e.length;o++){const r=this.partsMatch(e[n],e[o],!this.preserveMultipleSlashes);if(r){e[n]=[],e[o]=r;break}}return e.filter(n=>n.length)}partsMatch(e,n,o=!1){let r=0,i=0,s=[],a="";for(;r<e.length&&i<n.length;)if(e[r]===n[i])s.push(a==="b"?n[i]:e[r]),r++,i++;else if(o&&e[r]==="**"&&n[i]===e[r+1])s.push(e[r]),r++;else if(o&&n[i]==="**"&&e[r]===n[i+1])s.push(n[i]),i++;else if(e[r]==="*"&&n[i]&&(this.options.dot||!n[i].startsWith("."))&&n[i]!=="**"){if(a==="b")return!1;a="a",s.push(e[r]),r++,i++}else if(n[i]==="*"&&e[r]&&(this.options.dot||!e[r].startsWith("."))&&e[r]!=="**"){if(a==="a")return!1;a="b",s.push(n[i]),r++,i++}else return!1;return e.length===n.length&&s}parseNegate(){if(this.nonegate)return;const e=this.pattern;let n=!1,o=0;for(let r=0;r<e.length&&e.charAt(r)==="!";r++)n=!n,o++;o&&(this.pattern=e.slice(o)),this.negate=n}matchOne(e,n,o=!1){const r=this.options;if(this.isWindows){const p=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),x=!p&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),f=typeof n[0]=="string"&&/^[a-z]:$/i.test(n[0]),g=!f&&n[0]===""&&n[1]===""&&n[2]==="?"&&typeof n[3]=="string"&&/^[a-z]:$/i.test(n[3]),y=x?3:p?0:void 0,b=g?3:f?0:void 0;if(typeof y=="number"&&typeof b=="number"){const[v,S]=[e[y],n[b]];v.toLowerCase()===S.toLowerCase()&&(n[b]=v,b>y?n=n.slice(b):y>b&&(e=e.slice(y)))}}const{optimizationLevel:i=1}=this.options;i>=2&&(e=this.levelTwoFileOptimize(e)),this.debug("matchOne",this,{file:e,pattern:n}),this.debug("matchOne",e.length,n.length);for(var s=0,a=0,c=e.length,l=n.length;s<c&&a<l;s++,a++){this.debug("matchOne loop");var u=n[a],_=e[s];if(this.debug(n,u,_),u===!1)return!1;if(u===O5){this.debug("GLOBSTAR",[n,u,_]);var d=s,m=a+1;if(m===l){for(this.debug("** at the end");s<c;s++)if(e[s]==="."||e[s]===".."||!r.dot&&e[s].charAt(0)===".")return!1;return!0}for(;d<c;){var h=e[d];if(this.debug(`
|
|
5785
|
+
${S}`)}},[e,d]),Y.useEffect(()=>{e&&!d&&Fmt().then(S=>{p(S.size)}).catch(S=>{console.error("Failed to fetch file count",S),p(0)})},[e,d]);const g=Y.useCallback(()=>{s(null),m(null),c(null),u([]),_.current&&(_.current.value=""),n(!0)},[]),y=Y.useCallback(()=>{n(!1)},[]),b=Y.useCallback(async()=>{r(!0),s(null),c(null),u([]);const S=Xv(),M=_.current?.value||"";try{const w=await Fmt();if(w.size===0){ds.error("No project files available to include in the bug report"),r(!1);return}const D=new Date(Date.now()+1440*60*1e3).toISOString(),I=(await S.post("bug_reports/create",{json:{text:M.trim()||void 0,is_auto_deleted:!0,delete_at:D}}).json()).bug_report.bug_report_id,H=Array.from(w.entries()),O=[];for(let V=0;V<H.length;V++){const[j,q]=H[V];c({current:V+1,total:H.length,currentFile:j});try{const K={bug_report_id:I,file_path:j};q.text_content&&(K.content_text=q.text_content),q.binary_content_b64&&(K.content_base64=q.binary_content_b64),await S.post("bug_reports/upload_file",{json:K})}catch(K){const ne=K instanceof Uv?`HTTP ${K.response.status}`:K instanceof Error?K.message:"Upload failed";O.push({filePath:j,message:ne}),u([...O])}}c(null);const z=qeo(I);m({bugReportUrl:z})}catch(w){if(console.error("Failed to submit bug report",w),w instanceof Uv)if(w.response.status===401)if(f){const D="Your session has expired. Please sign in again to continue.";s(D),ds.error(D),x&&(y(),x())}else{const D="You must be logged in to report a bug. Please sign in via cli and try again.";s(D),ds.error(D),setTimeout(()=>{x&&(y(),x())},1e3)}else{const D=`Failed to submit bug report (${w.response.status})`;s(D),ds.error(D)}else if(w instanceof Error)s(w.message),ds.error(w.message);else{const D="Failed to submit bug report";s(D),ds.error(D)}}finally{r(!1)}},[f,x]);return{BugReportDialog:Y.useMemo(()=>{const S=a?Math.round(a.current/a.total*100):0;return G.jsx(mht,{open:e,onOpenChange:M=>{M?(s(null),m(null),c(null),u([]),n(!0)):o||y()},children:G.jsxs(Oye,{children:[G.jsxs(Fye,{children:[G.jsx(zye,{children:d?"Bug Report Created":"Report Bug"}),G.jsx(Vye,{asChild:!0,children:d?G.jsxs("div",{className:"rf-text-left rf-space-y-3 rf-text-sm",children:[G.jsx("p",{children:"Bug report created successfully."}),l.length>0&&G.jsxs("div",{className:"rf-bg-red-50 rf-border rf-border-red-200 rf-rounded rf-p-2 rf-max-h-28 rf-overflow-y-auto rf-overflow-x-hidden",children:[G.jsxs("p",{className:"rf-text-red-700 rf-font-medium rf-text-xs rf-mb-1",children:[l.length," file(s) failed:"]}),l.map((M,w)=>G.jsxs("div",{className:"rf-text-red-600 rf-text-xs rf-mb-0.5",title:`${M.filePath}: ${M.message}`,children:[G.jsx("span",{className:"rf-font-medium rf-break-all",children:M.filePath.split("/").pop()}),G.jsx("span",{className:"rf-text-red-500 rf-block rf-truncate",children:M.message})]},w))]}),G.jsx("div",{children:G.jsx("a",{className:"rf-text-blue-600 hover:rf-underline",href:d.bugReportUrl,target:"_blank",rel:"noreferrer",children:"View bug report"})}),G.jsxs("p",{children:["Please share this link privately with tscircuit staff so we can help debug. Join the",G.jsx("a",{className:"rf-ml-1 rf-text-blue-600 hover:rf-underline",href:"https://tscircuit.com/join",target:"_blank",rel:"noreferrer",children:"tscircuit Discord"}),"."]})]}):G.jsx("div",{className:"rf-text-left rf-space-y-3 rf-text-sm",children:a?G.jsxs("div",{className:"rf-space-y-2 rf-overflow-hidden",children:[G.jsxs("div",{className:"rf-flex rf-justify-between rf-text-xs",children:[G.jsx("span",{children:"Uploading files..."}),G.jsxs("span",{children:[a.current,"/",a.total]})]}),G.jsx("div",{className:"rf-w-full rf-h-2 rf-bg-gray-200 rf-rounded-full rf-overflow-hidden",children:G.jsx("div",{className:"rf-h-full rf-bg-blue-500 rf-transition-all rf-duration-150",style:{width:`${S}%`}})}),G.jsx("p",{className:"rf-text-xs rf-text-gray-500 rf-break-all rf-truncate rf-w-full rf-max-w-full",children:`${a.currentFile.slice(0,60)}${a.currentFile.length>60?"...":""}`}),l.length>0&&G.jsx("div",{className:"rf-bg-red-50 rf-border rf-border-red-200 rf-rounded rf-p-2 rf-max-h-20 rf-overflow-y-auto rf-overflow-x-hidden",children:l.map((M,w)=>G.jsxs("div",{className:"rf-text-red-600 rf-text-xs rf-mb-0.5",title:`${M.filePath}: ${M.message}`,children:[G.jsx("span",{className:"rf-font-medium rf-break-all",children:M.filePath.split("/").pop()}),G.jsx("span",{className:"rf-text-red-500 rf-block rf-truncate",children:M.message})]},w))})]}):G.jsxs(G.Fragment,{children:[G.jsxs("p",{children:["Reporting a bug will upload your entire project",h>0?` (${h} file${h===1?"":"s"})`:""," ","to tscircuit support."]}),G.jsxs("div",{className:"rf-space-y-2",children:[G.jsx("label",{htmlFor:"bug-description",className:"rf-block rf-font-medium",children:"Description (optional)"}),G.jsx("textarea",{ref:_,id:"bug-description",className:"rf-w-full rf-min-h-[100px] rf-px-3 rf-py-2 rf-text-sm rf-border rf-border-gray-300 rf-rounded-md focus:rf-outline-none focus:rf-ring-2 focus:rf-ring-blue-500",placeholder:"Describe the issue you're experiencing...",disabled:o})]}),G.jsxs("p",{children:["Share the generated bug report link privately with tscircuit staff so we can help debug your issue. You can also reach out on our",G.jsx("a",{className:"rf-ml-1 rf-text-blue-600 hover:rf-underline",href:"https://tscircuit.com/join",target:"_blank",rel:"noreferrer",children:"Discord community"}),"."]}),!f&&G.jsx("p",{className:"rf-text-red-600",children:"You appear to be logged out. Please log in before reporting a bug or the upload will fail."}),i&&G.jsx("p",{className:"rf-text-red-600",children:i})]})})})]}),G.jsx(Bye,{children:d?G.jsx("button",{type:"button",className:fE(),onClick:()=>{y()},children:"Close"}):G.jsxs(G.Fragment,{children:[G.jsx($ye,{disabled:o,onClick:()=>{o||y()},children:"Cancel"}),!f&&x?G.jsx("button",{type:"button",className:fE(),onClick:M=>{M.preventDefault(),y(),x()},children:"Sign In"}):G.jsx("button",{type:"button",className:h4(fE(),o&&"rf-opacity-70 rf-cursor-not-allowed"),disabled:o,onClick:M=>{M.preventDefault(),b()},children:o?"Reporting...":"Upload & Report"})]})})]})},"bug-report-dialog")},[e,o,y,i,d,h,f,b,x,a,l]),openBugReportDialog:g}};function Keo({open:t,onOpenChange:e,onExport:n}){const[o,r]=Y.useState(!1),i=()=>{n({includeSilkscreen:o}),e(!1)},s=()=>{e(!1)};return G.jsx(QE,{open:t,onOpenChange:e,children:G.jsxs(eC,{children:[G.jsxs(tC,{children:[G.jsx(nC,{children:"LightBurn Export Options"}),G.jsx(ZE,{children:"Configure export settings for PCB laser ablation with LightBurn"})]}),G.jsx("div",{className:"rf-flex rf-flex-col rf-gap-4 rf-py-4",children:G.jsxs("div",{className:"rf-flex rf-items-center rf-space-x-2",children:[G.jsx(cI,{id:"includeSilkscreen",checked:o,onCheckedChange:a=>r(a===!0)}),G.jsx("label",{htmlFor:"includeSilkscreen",className:"rf-text-xs rf-font-medium rf-leading-none peer-disabled:rf-cursor-not-allowed peer-disabled:rf-opacity-70",children:"Include silkscreen layer"})]})}),G.jsxs(lI,{children:[G.jsx(dc,{variant:"outline",onClick:s,children:"Cancel"}),G.jsx(dc,{onClick:i,children:"Export"})]})]})})}const Qeo=/#(\d+)/,Zeo=t=>{const e=t.match(Qeo);if(!e)return null;const n=Number.parseInt(e[1],10);return Number.isFinite(n)?n:null},eto=t=>{if(typeof t=="number")return Number.isFinite(t)?t:null;if(typeof t=="string"){const e=new Date(t).getTime();return Number.isFinite(e)?e:null}return null},tto=t=>{if(!t)return null;let e=null,n=-1,o=-1;for(const[r,i]of Object.entries(t)){const s=Zeo(r),a=eto(i.createdAt);if(s!==null){s>n&&(n=s,e={key:r,value:i});continue}if(n===-1){if(a!==null&&a>o){o=a,e={key:r,value:i};continue}e||(e={key:r,value:i})}}return e},bI=t=>{const e=yY(De=>De.lastRunEvalVersion),n=eu(De=>De.currentMainComponentPath),[o,r]=Y.useState(null),[i,s]=Y.useState(!1),[a,c]=Y.useState(!0),[l,u]=Y.useState(!1),[_,d]=Y.useState(null),[m,h]=Y.useState(null),[p,x]=Y.useState(!1),[f,g]=Y.useState(null),[y,b]=Y.useState(null),[v,S]=Y.useState(!1),[M,w]=Y.useState(!1),[D,A]=Y.useState(!1),[I,H]=Y.useState(null),O=Geo(),z=eu(De=>De.pushEvent),V=eu(De=>De.recentEvents),j=Y.useMemo(()=>Date.now(),[]);EJn(De=>{if(!(new Date(De.created_at).valueOf()<j+500)){if(De.event_type==="FILE_UPDATED"){s(!0);return}if(De.event_type==="SNIPPET_SAVED"){s(!1),c(!1),g("Snippet saved successfully."),S(!1);return}De.event_type==="REQUEST_EXPORT"&&(w(!0),g("Export processing..."),S(!1)),De.event_type==="EXPORT_CREATED"&&(g(`Export created: ${De.exportFilePath}`),S(!1),w(!1))}}),Y.useEffect(()=>{if(!l||_===null)return;const De=V.filter(xe=>new Date(xe.created_at).valueOf()>_),pe=De.find(xe=>xe.event_type==="FAILED_TO_SAVE_SNIPPET"),Me=De.find(xe=>xe.event_type==="SNIPPET_SAVED");pe&&(u(!1),d(null),b(pe.message??"Failed to save snippet. See console for error."),console.error(pe.message),S(!0),pe.error_code==="SNIPPET_UNSET"&&pe.available_snippet_names&&(h(pe.available_snippet_names),x(!0))),Me&&(u(!1),d(null),g("Snippet saved successfully."),S(!1))},[V,l]);const q=async()=>{u(!0),d(Date.now()),g(null),S(!1),await z({event_type:"REQUEST_TO_SAVE_SNIPPET",snippet_name:o})},ne=eu(De=>De.circuitJson)??t.circuitJson,[ce,ee]=Y.useState(!1),[oe,ie]=Y.useState(!1),{BugReportDialog:ae,openBugReportDialog:de}=Jeo({onLoginRequired:t.onLoginRequired}),be=async De=>{I&&(await Ght({circuitJson:I.circuitJson,projectName:I.projectName,options:De}),H(null))},Ce=Y.useMemo(()=>tto(t.autoroutingLog),[t.autoroutingLog]);return G.jsxs(G.Fragment,{children:[G.jsxs("div",{className:"rf-flex rf-items-center rf-gap-1 rf-flex-shrink-0",children:[G.jsxs(qj,{children:[G.jsx(Jj,{asChild:!0,children:G.jsx("div",{className:"rf-whitespace-nowrap rf-text-xs font-medium rf-p-2 rf-mx-1 rf-cursor-pointer rf-relative",children:"File"})}),G.jsxs(uH,{className:"rf-z-[101]",children:[!t.isWebEmbedded&&G.jsxs(G.Fragment,{children:[G.jsx(Md,{className:"rf-text-xs",onSelect:q,disabled:l,children:l?"Saving...":"Push"}),parseInt(window.location.port)>5e3&&G.jsx(Md,{className:"rf-text-xs",onSelect:()=>{O.open()},children:"Order"}),G.jsx(Md,{className:"rf-text-xs",onSelect:()=>ee(!0),disabled:l,children:"Import"}),G.jsx(Md,{className:"rf-text-xs",onSelect:()=>{if(!NY()){ds.error("Requires tscircuit token");return}ie(!0)},children:"AI Review"})]}),!t.isWebEmbedded&&t.onLoginRequired&&G.jsx(Md,{className:"rf-text-xs",onSelect:()=>{t.onLoginRequired?.()},children:"Sign In"}),!t.isWebEmbedded&&G.jsxs(lH,{children:[G.jsx(wE,{className:"rf-text-xs",children:"Report Bug"}),G.jsx(cH,{children:G.jsxs(EE,{children:[G.jsx(Md,{className:"rf-text-xs",onSelect:()=>{de()},children:"Report Entire Circuit"}),G.jsx(Md,{className:"rf-text-xs",disabled:!Ce||!t.onReportAutoroutingLog,onSelect:()=>{!Ce||!t.onReportAutoroutingLog||t.onReportAutoroutingLog(Ce.key,{simpleRouteJson:Ce.value.simpleRouteJson})},children:"Report Autorouter Bug"})]})})]}),G.jsxs(lH,{children:[G.jsx(wE,{className:"rf-text-xs",disabled:M,children:M?"Exporting...":"Export"}),G.jsx(cH,{children:G.jsx(EE,{children:YQn.map((De,pe)=>G.jsx(Md,{onSelect:()=>{if(!ne){ds.error("No Circuit JSON to export");return}let Me="Untitled";if(n){const We=n.split("/").pop();We&&(Me=We.replace(/\.[^.]+$/,""))}const xe=t.projectName??o??Me;if(De.name==="LightBurn"){H({circuitJson:ne,projectName:xe}),A(!0);return}qQn({exportName:De.name,circuitJson:ne,projectName:xe?.replace(/\.(board|circuit)$/,"")})},disabled:M,children:G.jsx("span",{className:"rf-text-xs",children:De.name})},pe))})})]}),!t.isWebEmbedded&&G.jsxs(lH,{children:[G.jsx(wE,{className:"rf-text-xs",children:"Advanced"}),G.jsx(cH,{children:G.jsxs(EE,{children:[G.jsx(Md,{className:"rf-flex rf-items-center rf-gap-2",children:G.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[G.jsx(cI,{id:"load-latest-eval",checked:t.shouldLoadLatestEval,onCheckedChange:De=>{t.onChangeShouldLoadLatestEval?.(De===!0)}}),G.jsx("label",{htmlFor:"load-latest-eval",className:"rf-text-xs rf-cursor-pointer",children:"Force Latest @tscircuit/eval"})]})}),e&&G.jsx(Md,{className:"rf-flex rf-items-center rf-gap-2",children:G.jsx("div",{className:"rf-flex rf-items-center rf-gap-2",children:G.jsxs("span",{className:"rf-text-xs",children:["@tscircuit/eval@",e]})})}),G.jsx(Md,{className:"rf-flex rf-items-center rf-gap-2",children:G.jsx("div",{className:"rf-flex rf-items-center rf-gap-2",children:G.jsxs("span",{className:"rf-text-xs",children:["@tscircuit/runframe@",MJn.version]})})}),G.jsx(Md,{className:"rf-flex rf-items-center rf-gap-2",onClick:()=>{window.open("/api/admin","_blank")},children:G.jsx("div",{className:"rf-flex rf-items-center rf-gap-2",children:G.jsx("span",{className:"rf-text-xs",children:"CLI Admin Panel"})})})]})})]})]}),G.jsx(mht,{open:v,onOpenChange:S,children:G.jsxs(Oye,{children:[G.jsxs(Fye,{children:[G.jsx(zye,{children:"Error Saving Snippet"}),G.jsx(Vye,{children:y})]}),G.jsx(Bye,{children:G.jsx($ye,{onClick:()=>S(!1),children:"Dismiss"})})]})}),G.jsx(wJn,{snippetNames:m??[],onSelect:async De=>{u(!0),d(Date.now()),r(De),await z({event_type:"REQUEST_TO_SAVE_SNIPPET",snippet_name:De}),x(!1)},onCancel:()=>x(!1),isOpen:p})]}),G.jsxs(qj,{children:[G.jsx(Jj,{asChild:!0,children:G.jsx("div",{className:"rf-whitespace-nowrap rf-text-xs font-medium rf-p-2 rf-mx-1 rf-cursor-pointer rf-relative",children:"View"})}),G.jsx(uH,{className:"rf-z-[104]",children:G.jsxs(lH,{children:[G.jsx(wE,{className:"rf-text-xs",children:"Schematic"}),G.jsx(cH,{children:G.jsxs(EE,{children:[G.jsx(Md,{className:"rf-flex rf-items-center rf-gap-2",onSelect:De=>De.preventDefault(),children:G.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[G.jsx(cI,{id:"show-schematic-ports",checked:t.showSchematicPorts,onCheckedChange:De=>{t.onChangeShowSchematicPorts?.(De===!0)}}),G.jsx("label",{htmlFor:"show-schematic-ports",className:"rf-text-xs rf-cursor-pointer",children:"Show Schematic Ports"})]})}),G.jsx(Md,{className:"rf-flex rf-items-center rf-gap-2",onSelect:De=>De.preventDefault(),children:G.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[G.jsx(cI,{id:"show-schematic-grid",checked:t.showSchematicDebugGrid,onCheckedChange:De=>{t.onChangeShowSchematicDebugGrid?.(De===!0)}}),G.jsx("label",{htmlFor:"show-schematic-grid",className:"rf-text-xs rf-cursor-pointer",children:"Show Schematic Grid"})]})})]})})]})})]})]}),ae,G.jsx(Keo,{open:D,onOpenChange:A,onExport:be}),G.jsx(Bht,{isOpen:ce,onClose:()=>ee(!1)}),G.jsx(oeo,{isOpen:oe,onClose:()=>ie(!1),packageName:o}),G.jsx(QKe,{position:"top-center",reverseOrder:!1,containerStyle:{zIndex:1e5},toastOptions:{className:"rf-break-all",style:{zIndex:1e5}}}),G.jsx(O.OrderDialog,{isOpen:O.isOpen,onClose:O.close,stage:O.stage,setStage:O.setStage})]})},nto=["assembly","pinout","analog_simulation","bom","circuit_json","errors","render_log","solvers"],Bmt=({code:t,fsMap:e,onRunClicked:n=void 0,errorMessage:o,errorStack:r,circuitJson:i,autoroutingGraphics:s,showRightHeaderContent:a=!0,showCodeTab:c=!1,codeTabContent:l,showJsonTab:u=!0,showRenderLogTab:_=!0,onActiveTabChange:d,renderLog:m,showImportAndFormatButtons:h=!0,className:p,headerClassName:x,leftHeaderContent:f,readOnly:g,isStreaming:y,autoroutingLog:b,onReportAutoroutingLog:v,isRunningCode:S,hasCodeChangedSinceLastRun:M,onEditEvent:w,editEvents:D,defaultActiveTab:A,defaultTab:I,availableTabs:H,autoRotate3dViewerDisabled:O,showSchematicDebugGrid:z=!1,showSchematicPorts:V=!1,onChangeShowSchematicDebugGrid:j,onChangeShowSchematicPorts:q,showToggleFullScreen:K=!0,defaultToFullScreen:ne=!1,activeEffectName:ce,allowSelectingVersion:ee=!0,showFileMenu:oe=!1,isWebEmbedded:ie=!1,projectName:ae,onRerunWithDebug:de,solverEvents:be})=>{fY();const{versions:Ce,latestVersion:De,lastRunEvalVersion:pe,search:Me,setSearch:xe,selectVersion:We}=TJn(ee),Xe=Y.useMemo(()=>i?i.filter(Dt=>Dt&&"error_type"in Dt||Dt.type.includes("error")):null,[i]),Je=Y.useMemo(()=>i?i.filter(Dt=>Dt&&"warning_type"in Dt||Dt.type.includes("warning")):null,[i]),fe=Y.useMemo(()=>i?i.some(Dt=>Dt.type==="schematic_group"):!0,[i]),Ye=Y.useMemo(()=>i?.some(Dt=>Dt.type==="pcb_panel"),[i]);Adt({errorMessage:o,errorStack:r,circuitJsonErrors:Xe});const Oe=I??H?.[0]??"pcb",[Ne,Ve]=RT("runframe-active-tab",A??Oe,A),[Re,Pe]=Y.useState(null),[Ee,we]=Y.useState(ne),[ze,Ue]=Y.useState(z),[et,ot]=Y.useState(V),at=j?z:ze,lt=q?V:et,xt=j??Ue,Ct=q??ot;zYn(Ee);const Lt=Y.useCallback(Dt=>{Ve(Dt),d?.(Dt)},[d,Ve]),$t=()=>{we(!Ee)};Y.useEffect(()=>{o&&(Ne!=="errors"&&Pe(Ne),Lt("errors"))},[o]),Y.useEffect(()=>{(Ne==="code"||Ne==="errors")&&i&&!o&&Lt(Re??A??I??H?.[0]??"pcb")},[i]);const Ot=Y.useCallback(Dt=>{window.TSCIRCUIT_3D_OBJECT_REF=Dt===null?void 0:Dt},[]);return G.jsx("div",{className:lr("flex flex-col relative rf-overflow-x-hidden rf-h-full",p),children:G.jsx("div",{className:lr("rf-md:sticky rf-md:top-2 rf-h-full",Ee&&"rf-fixed rf-top-0 rf-left-0 rf-w-full rf-h-full rf-bg-white rf-overflow-hidden"),children:G.jsxs(gae,{value:Ne,onValueChange:Lt,className:"rf-flex-grow rf-flex rf-flex-col rf-h-full",children:[G.jsxs("div",{className:lr("rf-flex rf-items-center rf-gap-2 rf-p-2 rf-pb-0",x),children:[f,oe&&!f&&G.jsx(bI,{isWebEmbedded:ie,circuitJson:i,projectName:ae,showSchematicDebugGrid:at,onChangeShowSchematicDebugGrid:xt,showSchematicPorts:lt,onChangeShowSchematicPorts:Ct}),(f||oe)&&G.jsx("div",{className:"rf-flex-grow"}),!f&&!oe&&S&&G.jsx($9,{className:"rf-w-4 rf-h-4 rf-animate-spin"}),!f&&!oe&&G.jsx("div",{className:"rf-flex-grow"}),m&&m.progress!==1&&!o&&G.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2 rf-min-w-0 rf-max-w-xs",children:[ce?G.jsx("div",{className:"rf-text-xs rf-text-gray-500 rf-truncate rf-min-w-0",title:ce,children:ce}):m.lastRenderEvent&&G.jsx("div",{className:"rf-text-xs rf-text-gray-500 rf-truncate rf-min-w-0",title:m.lastRenderEvent?.phase??"",children:m.lastRenderEvent?.phase??""}),G.jsx("div",{className:"rf-w-4 rf-h-4 rf-bg-blue-500 rf-opacity-50 rf-rounded-full rf-text-white rf-flex-shrink-0",children:G.jsx($9,{className:"rf-w-4 rf-h-4 rf-animate-spin"})}),G.jsxs("div",{className:"rf-text-xs rf-font-bold rf-text-gray-700 rf-tabular-nums rf-flex-shrink-0",children:[((m.progress??0)*100).toFixed(1),"%"]})]}),a&&G.jsxs(AW,{children:[c&&G.jsx(z6,{value:"code",children:"Code"}),!H||H.includes("pcb")?G.jsxs(z6,{value:"pcb",className:"rf-whitespace-nowrap",children:[i&&G.jsx("span",{className:lr("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",M?"rf-bg-gray-500":"rf-bg-blue-500")}),"PCB"]}):null,!H||H.includes("schematic")?G.jsxs(z6,{value:"schematic",className:lr("rf-whitespace-nowrap",i&&!fe&&"rf-opacity-50"),disabled:i?!fe||Ye:!1,children:[i&&G.jsx("span",{className:lr("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",M?"rf-bg-gray-500":"rf-bg-blue-500")}),"Schematic"]}):null,!H||H.includes("cad")?G.jsxs(z6,{value:"cad",children:[i&&G.jsx("span",{className:lr("inline-flex items-center justify-center w-2 h-2 mr-1 text-xs font-bold text-white rounded-full",M?"rf-bg-gray-500":"rf-bg-blue-500")}),"3D"]}):null,!["pcb","cad","schematic"].includes(Ne)&&G.jsx(z6,{value:Ne,children:VFe(Ne)}),G.jsxs(qj,{children:[G.jsx(Jj,{asChild:!0,children:G.jsxs("div",{className:"rf-whitespace-nowrap rf-p-2 rf-mr-1 rf-cursor-pointer rf-relative",children:[G.jsx(NDn,{className:"rf-w-4 rf-h-4"}),(Xe&&Xe.length>0||o)&&G.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"})]})}),G.jsxs(uH,{className:"rf-*:text-xs rf-z-[101]",children:[nto.filter(Dt=>!H||H.includes(Dt)).map(Dt=>G.jsxs(Md,{onSelect:()=>Lt(Dt),children:[Ne!==Dt&&G.jsx(sot,{className:"rf-w-3 rf-h-3 rf-opacity-30"}),Ne===Dt&&G.jsx(T8,{className:"rf-w-3 rf-h-3"}),G.jsx("div",{className:"rf-pr-2",children:VFe(Dt)}),Dt==="errors"&&(Xe&&Xe.length>0||o)&&G.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:o?1:Xe?.length}),Dt==="solvers"&&be&&be.length>0&&G.jsx("span",{className:"rf-inline-flex rf-items-center rf-justify-center rf-min-w-[12px] rf-h-3 rf-px-1 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-blue-500 rf-rounded-full",children:be.length})]},Dt)),G.jsx(Md,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:G.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/runframe@",Rdt.split(".").map((Dt,Wt)=>Wt===2?parseInt(Dt)+1:Dt).join(".")]})}),ee?G.jsxs(lH,{onOpenChange:Dt=>!Dt&&xe(""),children:[G.jsx(wE,{className:"rf-text-xs rf-opacity-60",children:G.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/eval@",pe??De??"latest"]})}),G.jsx(cH,{children:G.jsxs(EE,{className:"rf-*:text-xs rf-w-40 rf-max-h-[200px] rf-overflow-y-auto",children:[G.jsx("div",{className:"rf-p-1",children:G.jsx(sge,{value:Me,onChange:Dt=>xe(Dt.target.value),placeholder:"Search...",className:"rf-h-7 rf-text-xs"})}),G.jsx(ait,{}),G.jsx(Md,{onSelect:()=>We(null),children:De?`${De} (latest)`:"latest"}),Ce.map(Dt=>G.jsx(Md,{onSelect:()=>We(Dt),children:Dt},Dt))]})})]}):pe&&G.jsx(Md,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:G.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/eval@",pe]})})]})]})]}),K&&G.jsx(dc,{onClick:$t,variant:"ghost",children:Ee?G.jsx($Dn,{size:16}):G.jsx(FDn,{size:16})})]}),c&&G.jsx(a1,{value:"code",className:"rf-flex-grow rf-overflow-hidden",children:G.jsx("div",{className:"rf-h-full",children:l})}),(!H||H.includes("pcb"))&&G.jsx(a1,{value:"pcb",children:G.jsx("div",{className:lr("rf-overflow-hidden",Ee?"rf-h-[calc(100vh-52px)]":"rf-h-full"),children:G.jsx(M5,{fallbackRender:({error:Dt})=>G.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:G.jsxs("div",{className:"rf-p-4",children:[G.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading PCB viewer"}),G.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:Dt?.message||"An unknown error occurred"})]})}),children:i?G.jsx(FYn,{focusOnHover:!1,circuitJson:i,debugGraphics:s,containerClassName:lr("rf-h-full rf-w-full",Ee?"rf-min-h-[calc(100vh-240px)]":"rf-min-h-[620px]"),onEditEventsChanged:Dt=>{if(w)for(const Wt of Dt)w(Wt)}}):G.jsx(J9,{onRunClicked:n})})})}),(!H||H.includes("assembly"))&&G.jsx(a1,{value:"assembly",children:G.jsx("div",{className:lr("rf-overflow-auto",Ee?"rf-h-[calc(100vh-60px)]":"rf-h-full rf-min-h-[620px]"),children:G.jsx(M5,{fallback:G.jsx("div",{children:"Error loading Assembly"}),children:i?G.jsx(qVn,{circuitJson:i,containerStyle:{height:"100%"},editingEnabled:!0,debugGrid:!0}):G.jsx(J9,{onRunClicked:n})})})}),(!H||H.includes("pinout"))&&G.jsx(a1,{value:"pinout",children:G.jsx("div",{className:lr("rf-overflow-auto",Ee?"rf-h-[calc(100vh-60px)]":"rf-h-full rf-min-h-[620px]"),children:G.jsx(M5,{fallback:G.jsx("div",{children:"Error loading Pinout Viewer"}),children:i?G.jsx(JVn,{circuitJson:i,containerStyle:{height:"100%"}}):G.jsx(J9,{onRunClicked:n})})})}),(!H||H.includes("schematic"))&&G.jsx(a1,{value:"schematic",children:G.jsx("div",{className:lr("rf-overflow-auto rf-bg-white",Ee?"rf-h-[calc(100vh-60px)]":"rf-h-full rf-min-h-[620px]"),children:G.jsx(M5,{fallbackRender:({error:Dt})=>G.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:G.jsxs("div",{className:"rf-p-4",children:[G.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Schematic"}),G.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:Dt?.message||"An unknown error occurred"})]})}),children:i?G.jsx(GVn,{spiceSimulationEnabled:!0,circuitJson:i,containerStyle:{height:"100%"},editingEnabled:!0,onEditEvent:Dt=>{w?.(Dt)},debugGrid:at,showSchematicPorts:lt}):G.jsx(J9,{onRunClicked:n})})})}),(!H||H.includes("cad"))&&G.jsx(a1,{value:"cad",children:G.jsx("div",{className:lr("rf-overflow-auto",Ee?"rf-h-[calc(100vh-60px)]":"rf-h-full rf-min-h-[620px]"),children:G.jsx(M5,{fallbackRender:({error:Dt,resetErrorBoundary:Wt})=>G.jsx(mDn,{error:Dt,resetErrorBoundary:Wt}),children:i?G.jsx(rDn,{ref:Ot,circuitJson:i,autoRotateDisabled:O},`cad-${Ee}`):G.jsx(J9,{onRunClicked:n})})})}),(!H||H.includes("analog_simulation"))&&G.jsx(a1,{value:"analog_simulation",children:G.jsx("div",{className:lr("rf-overflow-auto",Ee?"rf-h-[calc(100vh-60px)]":"rf-h-full rf-min-h-[620px]"),children:G.jsx(M5,{fallback:G.jsx("div",{children:"Error loading Analog Simulation"}),children:i?G.jsx(YVn,{circuitJson:i,containerStyle:{height:"100%"}}):G.jsx(J9,{onRunClicked:n})})})}),(!H||H.includes("bom"))&&G.jsx(a1,{value:"bom",children:G.jsx("div",{className:lr("rf-overflow-auto",Ee?"rf-h-[calc(100vh-60px)]":"rf-h-full rf-min-h-[620px]"),children:G.jsx(M5,{fallbackRender:({error:Dt})=>G.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:G.jsxs("div",{className:"rf-p-4",children:[G.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Bill of Materials"}),G.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:Dt?.message||"An unknown error occurred"})]})}),children:i?G.jsx(t$n,{circuitJson:i}):G.jsx(J9,{onRunClicked:n})})})}),(!H||H.includes("circuit_json"))&&G.jsx(a1,{value:"circuit_json",children:G.jsx("div",{className:lr("rf-overflow-auto",Ee?"rf-h-[calc(100vh-60px)]":"rf-h-full rf-min-h-[620px]"),children:G.jsx(M5,{fallback:G.jsx("div",{children:"Error loading JSON viewer"}),children:i?G.jsx(ZVn,{elements:i}):G.jsx(J9,{onRunClicked:n})})})}),(!H||H.includes("errors"))&&G.jsx(a1,{value:"errors",className:"rf-h-full",children:G.jsx("div",{className:lr("rf-overflow-hidden",Ee?"rf-h-[calc(100vh-60px)]":"rf-h-full rf-min-h-[620px]"),children:o||Xe&&Xe.length>0||i?G.jsx(BNn,{code:t,fsMap:e,circuitJsonErrors:Xe,circuitJsonWarnings:Je,errorMessage:o,errorStack:r,circuitJson:i,evalVersion:pe,autoroutingLog:b,onReportAutoroutingLog:v}):G.jsx(J9,{onRunClicked:n})})}),_&&(!H||H.includes("render_log"))&&G.jsx(a1,{value:"render_log",children:G.jsx(WYn,{renderLog:m,onRerunWithDebug:de})}),(!H||H.includes("solvers"))&&G.jsx(a1,{value:"solvers",children:G.jsx("div",{className:lr("rf-overflow-hidden",Ee?"rf-h-[calc(100vh-60px)]":"rf-h-full rf-min-h-[620px]"),children:G.jsx(M5,{fallback:G.jsx("div",{children:"Error loading Solvers view"}),children:G.jsx(CJn,{solverEvents:be})})})})]})})})};const zmt=Symbol("Comlink.proxy"),oto=Symbol("Comlink.endpoint"),Vmt=Symbol("Comlink.releaseProxy"),T5e=Symbol("Comlink.finalizer"),JY=Symbol("Comlink.thrown"),$mt=t=>typeof t=="object"&&t!==null||typeof t=="function",rto={canHandle:t=>$mt(t)&&t[zmt],serialize(t){const{port1:e,port2:n}=new MessageChannel;return Umt(t,e),[n,[n]]},deserialize(t){return t.start(),jmt(t)}},ito={canHandle:t=>$mt(t)&&JY in t,serialize({value:t}){let e;return t instanceof Error?e={isError:!0,value:{message:t.message,name:t.name,stack:t.stack}}:e={isError:!1,value:t},[e,[]]},deserialize(t){throw t.isError?Object.assign(new Error(t.value.message),t.value):t.value}},Wmt=new Map([["proxy",rto],["throw",ito]]);function sto(t,e){for(const n of t)if(e===n||n==="*"||n instanceof RegExp&&n.test(e))return!0;return!1}function Umt(t,e=globalThis,n=["*"]){e.addEventListener("message",function o(r){if(!r||!r.data)return;if(!sto(n,r.origin)){console.warn(`Invalid origin '${r.origin}' for comlink proxy`);return}const{id:i,type:s,path:a}=Object.assign({path:[]},r.data),c=(r.data.argumentList||[]).map(lC);let l;try{const u=a.slice(0,-1).reduce((d,m)=>d[m],t),_=a.reduce((d,m)=>d[m],t);switch(s){case"GET":l=_;break;case"SET":u[a.slice(-1)[0]]=lC(r.data.value),l=!0;break;case"APPLY":l=_.apply(u,c);break;case"CONSTRUCT":{const d=new _(...c);l=E5e(d)}break;case"ENDPOINT":{const{port1:d,port2:m}=new MessageChannel;Umt(t,m),l=_to(d,[d])}break;case"RELEASE":l=void 0;break;default:return}}catch(u){l={value:u,[JY]:0}}Promise.resolve(l).catch(u=>({value:u,[JY]:0})).then(u=>{const[_,d]=eq(u);e.postMessage(Object.assign(Object.assign({},_),{id:i}),d),s==="RELEASE"&&(e.removeEventListener("message",o),Xmt(e),T5e in t&&typeof t[T5e]=="function"&&t[T5e]())}).catch(u=>{const[_,d]=eq({value:new TypeError("Unserializable return value"),[JY]:0});e.postMessage(Object.assign(Object.assign({},_),{id:i}),d)})}),e.start&&e.start()}function ato(t){return t.constructor.name==="MessagePort"}function Xmt(t){ato(t)&&t.close()}function jmt(t,e){const n=new Map;return t.addEventListener("message",function(r){const{data:i}=r;if(!i||!i.id)return;const s=n.get(i.id);if(s)try{s(i)}finally{n.delete(i.id)}}),w5e(t,n,[],e)}function KY(t){if(t)throw new Error("Proxy has been released and is not useable")}function Gmt(t){return nD(t,new Map,{type:"RELEASE"}).then(()=>{Xmt(t)})}const QY=new WeakMap,ZY="FinalizationRegistry"in globalThis&&new FinalizationRegistry(t=>{const e=(QY.get(t)||0)-1;QY.set(t,e),e===0&&Gmt(t)});function cto(t,e){const n=(QY.get(e)||0)+1;QY.set(e,n),ZY&&ZY.register(t,e,t)}function lto(t){ZY&&ZY.unregister(t)}function w5e(t,e,n=[],o=function(){}){let r=!1;const i=new Proxy(o,{get(s,a){if(KY(r),a===Vmt)return()=>{lto(i),Gmt(t),e.clear(),r=!0};if(a==="then"){if(n.length===0)return{then:()=>i};const c=nD(t,e,{type:"GET",path:n.map(l=>l.toString())}).then(lC);return c.then.bind(c)}return w5e(t,e,[...n,a])},set(s,a,c){KY(r);const[l,u]=eq(c);return nD(t,e,{type:"SET",path:[...n,a].map(_=>_.toString()),value:l},u).then(lC)},apply(s,a,c){KY(r);const l=n[n.length-1];if(l===oto)return nD(t,e,{type:"ENDPOINT"}).then(lC);if(l==="bind")return w5e(t,e,n.slice(0,-1));const[u,_]=Ymt(c);return nD(t,e,{type:"APPLY",path:n.map(d=>d.toString()),argumentList:u},_).then(lC)},construct(s,a){KY(r);const[c,l]=Ymt(a);return nD(t,e,{type:"CONSTRUCT",path:n.map(u=>u.toString()),argumentList:c},l).then(lC)}});return cto(i,t),i}function uto(t){return Array.prototype.concat.apply([],t)}function Ymt(t){const e=t.map(eq);return[e.map(n=>n[0]),uto(e.map(n=>n[1]))]}const qmt=new WeakMap;function _to(t,e){return qmt.set(t,e),t}function E5e(t){return Object.assign(t,{[zmt]:!0})}function eq(t){for(const[e,n]of Wmt)if(n.canHandle(t)){const[o,r]=n.serialize(t);return[{type:"HANDLER",name:e,value:o},r]}return[{type:"RAW",value:t},qmt.get(t)||[]]}function lC(t){switch(t.type){case"HANDLER":return Wmt.get(t.name).deserialize(t.value);case"RAW":return t.value}}function nD(t,e,n,o){return new Promise(r=>{const i=dto();e.set(i,r),t.start&&t.start(),t.postMessage(Object.assign({id:i},n),o)})}function dto(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}function D5e(t,e=""){const n=[];for(const o in t){if(!Object.prototype.hasOwnProperty.call(t,o))continue;const r=t[o],i=e?`${e}.${o}`:o;if(r!==null&&typeof r=="object"&&!Array.isArray(r)){const s=D5e(r,i);n.push(...s)}else n.push(i)}return n}function Jmt(t,e){const n=e.split(".");let o=t;for(const r of n)o=o[r];return o}var Kmt=async t=>{const e=globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER;if(e&&typeof e.kill=="function"){t.verbose&&console.log("[Worker] Killing previous global worker instance...");try{await e.kill()}catch(d){t.verbose&&console.warn("[Worker] Error killing previous global worker instance:",d),globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER===e&&(globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER=void 0)}}t.verbose&&console.log("[Worker] Creating circuit web worker with config:",t);let n=t.webWorkerBlobUrl??t.webWorkerUrl;if(!n){const d=`https://cdn.jsdelivr.net/npm/@tscircuit/eval@${t.evalVersion??"latest"}/dist/webworker/entrypoint.js`,m=await globalThis.fetch(d).then(h=>h.blob());n=URL.createObjectURL(m)}const o=new Worker(n,{type:"module"});let r;o.addEventListener("error",d=>{console.error("[Worker] Error in worker",d),r=d}),o.addEventListener("unhandledrejection",d=>{console.error("[Worker] Unhandled rejection in worker",d)}),o.addEventListener("messageerror",d=>{console.error("[Worker] Message error in worker",d)});const i=d=>{console.log("[Worker] Message in worker",d)};if(o.addEventListener("message",i),o.addEventListener("message",async d=>{const m=d.data;if(m?.type==="worker_fetch")try{const h=await globalThis.fetch(m.input,m.init),p=await h.text();o.postMessage({type:"worker_fetch_result",requestId:m.requestId,success:!0,response:{body:p,status:h.status,statusText:h.statusText,headers:(()=>{const x={};return h.headers.forEach((f,g)=>{x[g]=f}),x})()}})}catch(h){o.postMessage({type:"worker_fetch_result",requestId:m.requestId,success:!1,error:{name:h.name,message:h.message,stack:h.stack}})}}),r)throw r;const s=jmt(o);o.removeEventListener("message",i);function a(d){return!d||typeof d!="object"?d:d.type&&d.props!==void 0?{__isSerializedReactElement:!0,type:d.type,props:c(d.props),key:d.key}:d}function c(d){if(!d||typeof d!="object")return d;const m={};for(const[h,p]of Object.entries(d))h==="children"?Array.isArray(p)?m.children=p.map(a):m.children=a(p):m[h]=p;return m}t.enableFetchProxy&&o.postMessage({type:"override_global_fetch"}),t.disableCdnLoading&&await s.setDisableCdnLoading(!0),t.snippetsApiBaseUrl&&await s.setSnippetsApiBaseUrl(t.snippetsApiBaseUrl),t.tscircuitSessionToken&&await s.setTscircuitSessionToken(t.tscircuitSessionToken);const l=d=>typeof d=="function"?E5e(d):d;if(t.platform)for(const d of D5e(t.platform))await s.setPlatformConfigProperty(d,l(Jmt(t.platform,d))).catch(m=>{throw new Error(`Error setting platform config property ${d}: ${m instanceof Error?m.message:String(m)}`)});if(t.projectConfig)for(const d of D5e(t.projectConfig))await s.setProjectConfigProperty(d,l(Jmt(t.projectConfig,d))).catch(m=>{throw new Error(`Error setting project config property ${d}: ${m instanceof Error?m.message:String(m)}`)});let u=!1;const _={clearEventListeners:s.clearEventListeners.bind(s),enableDebug:async(...d)=>{if(u)throw new Error("CircuitWebWorker was terminated, can't enableDebug");return s.enableDebug.bind(s)(...d)},version:s.version.bind(s),execute:async(...d)=>{if(u)throw new Error("CircuitWebWorker was terminated, can't execute");return s.execute.bind(s)(...d)},executeComponent:async d=>{if(u)throw new Error("CircuitWebWorker was terminated, can't executeComponent");if(typeof d=="function")return s.executeComponent.bind(s)(d);if(d&&typeof d=="object"&&d.type){const m=a(d);return s.executeComponent.bind(s)(m)}return s.executeComponent.bind(s)(d)},executeWithFsMap:async(...d)=>{if(u)throw new Error("CircuitWebWorker was terminated, can't executeWithFsMap");return s.executeWithFsMap.bind(s)(...d)},renderUntilSettled:s.renderUntilSettled.bind(s),getCircuitJson:s.getCircuitJson.bind(s),on:(d,m)=>{const h=E5e(m);s.on(d,h)},kill:async()=>{s[Vmt](),o.terminate(),u=!0,globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER===_&&(globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER=void 0)}};return _.__rawWorker=o,globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER=_,_};const hto=({error:t,resetErrorBoundary:e})=>G.jsx("section",{className:"rf-h-full rf-w-full rf-grid rf-place-items-center",children:G.jsx("div",{className:"rf-min-h-full rf-flex rf-items-center rf-justify-center rf-px-4",children:G.jsxs("div",{className:"rf-max-w-lg rf-w-full rf-text-center",children:[G.jsxs("div",{className:"rf-mb-8",children:[G.jsx("div",{className:"rf-inline-flex rf-items-center rf-justify-center rf-w-20 rf-h-20 rf-bg-red-100 rf-rounded-full rf-mb-6",children:G.jsx(GDn,{className:"rf-w-10 rf-h-10 rf-text-red-600"})}),G.jsx("h1",{className:"rf-text-2xl rf-font-bold rf-text-gray-900 rf-mb-3",children:"Oops! Something went wrong"}),G.jsx("p",{className:"rf-text-gray-600 rf-mb-4",children:"RunFrame encountered an unexpected error."}),G.jsx("pre",{className:"rf-text-xs no-scrollbar rf-font-mono rf-text-left rf-whitespace-pre-wrap rf-text-red-600 rf-bg-red-50 rf-border rf-border-red-200 rf-p-3 rf-rounded-lg rf-mb-4 rf-overflow-auto rf-max-h-[120px]",children:t.message}),t.stack&&G.jsxs("details",{className:"rf-text-center rf-mb-6",children:[G.jsx("summary",{className:"rf-text-xs rf-text-gray-500 rf-cursor-pointer hover:rf-text-gray-700",children:"View stack trace"}),G.jsx("pre",{className:"rf-text-xs rf-font-mono no-scrollbar rf-whitespace-pre-wrap rf-text-gray-500 rf-bg-gray-100 rf-p-3 rf-rounded-lg rf-mt-2 rf-overflow-auto rf-text-left rf-max-h-[150px]",children:t.stack})]})]}),G.jsxs("div",{className:"rf-flex rf-flex-col rf-gap-2 rf-justify-center",children:[G.jsx(dc,{variant:"destructive",size:"lg",onClick:()=>window.location.reload(),children:"Refresh Dev Server"}),G.jsx(dc,{variant:"outline",size:"lg",onClick:e,children:"Try Again"})]})]})})}),Qmt=t=>{const e={};if(!t)return e;for(const o of Og)e[o]=0;const n=new Map;for(const o of t){const[,,r,i]=o.type.split(":");if(i==="start"){n.set(`${r}:${o.renderId}`,o);continue}if(i==="end"){const s=n.get(`${r}:${o.renderId}`);if(s){const a=o.createdAt-s.createdAt;e[r]=(e[r]||0)+a}}}return e},mto=(t,e)=>{const n={};for(const[o,r]of t.entries()){const i=e.get(o);i!==r&&(n[o]={old:r,new:i})}for(const[o,r]of e.entries())t.has(o)||(n[o]={old:void 0,new:r});return n};function pto(){const t=Y.useRef(Promise.resolve()),e=Y.useRef(!1),n=Y.useRef(null),o=Y.useCallback(async s=>{await t.current;const a={cancelled:!1};n.current=a;let c;const l=new Promise(u=>{c=u});try{return t.current=l,e.current=!0,await s()}catch(u){if(!a.cancelled)throw u}finally{e.current=!1,n.current=null,c()}},[]),r=Y.useCallback(()=>{n.current&&(n.current.cancelled=!0),t.current=Promise.resolve(),e.current=!1},[]),i=Y.useCallback(()=>e.current,[]);return{runWithMutex:o,isLocked:i,cancel:r}}const fto=({message:t="Loading files..."})=>G.jsxs("div",{className:"rf-flex rf-flex-col rf-w-full rf-h-full",children:[G.jsxs("div",{className:"rf-flex rf-items-center rf-gap-4 rf-p-2 rf-border-b",children:[G.jsx("div",{className:"rf-w-20 rf-h-9 rf-bg-gray-200 dark:rf-bg-gray-700 rf-rounded-md rf-animate-pulse"}),G.jsx("div",{className:"rf-flex rf-gap-6 rf-ml-auto",children:["PCB","Schematic","3D"].map((e,n)=>G.jsx("div",{className:"rf-h-6 rf-w-20 rf-bg-gray-200 dark:rf-bg-gray-700 rf-rounded rf-animate-pulse"},n))})]}),G.jsx("div",{className:"rf-flex-1 rf-p-4",children:G.jsx("div",{className:"rf-w-full rf-h-full rf-rounded-lg rf-bg-gray-100 dark:rf-bg-gray-800 rf-animate-pulse rf-flex rf-items-center rf-justify-center",children:G.jsx("div",{className:"rf-flex rf-flex-col rf-items-center rf-gap-4",children:G.jsx("div",{className:"rf-text-sm rf-text-gray-400 dark:rf-text-gray-500",children:t})})})})]}),tq=t=>{const e=t.toLowerCase(),n=e.split("/").pop();return e.endsWith(".circuit.json")||n==="circuit.json"},xto=t=>t.endsWith(".tsx")||tq(t)||t.endsWith(".jsx"),gto=({mainComponentPath:t,fsMap:e})=>Y.useMemo(()=>{if(!(t!=null&&tq(t)))return{isStaticCircuitJson:!1,circuitJson:null,error:null};const o=e.get(t);if(!o)return{isStaticCircuitJson:!0,circuitJson:null,error:`Circuit JSON file not found: ${t}`};try{return{isStaticCircuitJson:!0,circuitJson:JSON.parse(o),error:null}}catch(r){return{isStaticCircuitJson:!0,circuitJson:null,error:`Failed to parse circuit.json: ${r instanceof Error?r.message:String(r)}`}}},[t,e]),yto=t=>!t||typeof t!="object"?!1:!!("error_type"in t||typeof t.type=="string"&&t.type.includes("error")),bto=t=>t instanceof Error?{name:t.name,message:t.message,stack:t.stack}:typeof t=="string"?{message:t}:t&&typeof t=="object"?t:{message:String(t)},Pto=t=>Array.isArray(t)?t.filter(yto):[],A5e=({circuitJson:t,executionError:e})=>{const n=[];e&&n.push(bto(e));const o=Pto(t);return n.push(...o),{hasExecutionError:!!e,...n.length>0?{errors:n}:{}}};var vto=Symbol("radix.slottable");function Sto(t){const e=({children:n})=>G.jsx(G.Fragment,{children:n});return e.displayName=`${t}.Slottable`,e.__radixId=vto,e}var Cto=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Mto="VisuallyHidden",Zmt=Y.forwardRef((t,e)=>G.jsx(Cc.span,{...t,ref:e,style:{...Cto,...t.style}}));Zmt.displayName=Mto;var Tto=Zmt,[nq]=d4("Tooltip",[vE]),oq=vE(),ept="TooltipProvider",wto=700,R5e="tooltip.open",[Eto,k5e]=nq(ept),tpt=t=>{const{__scopeTooltip:e,delayDuration:n=wto,skipDelayDuration:o=300,disableHoverableContent:r=!1,children:i}=t,s=Y.useRef(!0),a=Y.useRef(!1),c=Y.useRef(0);return Y.useEffect(()=>{const l=c.current;return()=>window.clearTimeout(l)},[]),G.jsx(Eto,{scope:e,isOpenDelayedRef:s,delayDuration:n,onOpen:Y.useCallback(()=>{window.clearTimeout(c.current),s.current=!1},[]),onClose:Y.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.current=!0,o)},[o]),isPointerInTransitRef:a,onPointerInTransitChange:Y.useCallback(l=>{a.current=l},[]),disableHoverableContent:r,children:i})};tpt.displayName=ept;var PI="Tooltip",[Dto,rq]=nq(PI),npt=t=>{const{__scopeTooltip:e,children:n,open:o,defaultOpen:r,onOpenChange:i,disableHoverableContent:s,delayDuration:a}=t,c=k5e(PI,t.__scopeTooltip),l=oq(e),[u,_]=Y.useState(null),d=Jp(),m=Y.useRef(0),h=s??c.disableHoverableContent,p=a??c.delayDuration,x=Y.useRef(!1),[f,g]=DP({prop:o,defaultProp:r??!1,onChange:M=>{M?(c.onOpen(),document.dispatchEvent(new CustomEvent(R5e))):c.onClose(),i?.(M)},caller:PI}),y=Y.useMemo(()=>f?x.current?"delayed-open":"instant-open":"closed",[f]),b=Y.useCallback(()=>{window.clearTimeout(m.current),m.current=0,x.current=!1,g(!0)},[g]),v=Y.useCallback(()=>{window.clearTimeout(m.current),m.current=0,g(!1)},[g]),S=Y.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{x.current=!0,g(!0),m.current=0},p)},[p,g]);return Y.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),G.jsx(Hj,{...l,children:G.jsx(Dto,{scope:e,contentId:d,open:f,stateAttribute:y,trigger:u,onTriggerChange:_,onTriggerEnter:Y.useCallback(()=>{c.isOpenDelayedRef.current?S():b()},[c.isOpenDelayedRef,S,b]),onTriggerLeave:Y.useCallback(()=>{h?v():(window.clearTimeout(m.current),m.current=0)},[v,h]),onOpen:b,onClose:v,disableHoverableContent:h,children:n})})};npt.displayName=PI;var N5e="TooltipTrigger",opt=Y.forwardRef((t,e)=>{const{__scopeTooltip:n,...o}=t,r=rq(N5e,n),i=k5e(N5e,n),s=oq(n),a=Y.useRef(null),c=tu(e,a,r.onTriggerChange),l=Y.useRef(!1),u=Y.useRef(!1),_=Y.useCallback(()=>l.current=!1,[]);return Y.useEffect(()=>()=>document.removeEventListener("pointerup",_),[_]),G.jsx(Ij,{asChild:!0,...s,children:G.jsx(Cc.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...o,ref:c,onPointerMove:Vr(t.onPointerMove,d=>{d.pointerType!=="touch"&&!u.current&&!i.isPointerInTransitRef.current&&(r.onTriggerEnter(),u.current=!0)}),onPointerLeave:Vr(t.onPointerLeave,()=>{r.onTriggerLeave(),u.current=!1}),onPointerDown:Vr(t.onPointerDown,()=>{r.open&&r.onClose(),l.current=!0,document.addEventListener("pointerup",_,{once:!0})}),onFocus:Vr(t.onFocus,()=>{l.current||r.onOpen()}),onBlur:Vr(t.onBlur,r.onClose),onClick:Vr(t.onClick,r.onClose)})})});opt.displayName=N5e;var Ato="TooltipPortal",[Eao,Rto]=nq(Ato,{forceMount:void 0}),oD="TooltipContent",rpt=Y.forwardRef((t,e)=>{const n=Rto(oD,t.__scopeTooltip),{forceMount:o=n.forceMount,side:r="top",...i}=t,s=rq(oD,t.__scopeTooltip);return G.jsx(Fg,{present:o||s.open,children:s.disableHoverableContent?G.jsx(ipt,{side:r,...i,ref:e}):G.jsx(kto,{side:r,...i,ref:e})})}),kto=Y.forwardRef((t,e)=>{const n=rq(oD,t.__scopeTooltip),o=k5e(oD,t.__scopeTooltip),r=Y.useRef(null),i=tu(e,r),[s,a]=Y.useState(null),{trigger:c,onClose:l}=n,u=r.current,{onPointerInTransitChange:_}=o,d=Y.useCallback(()=>{a(null),_(!1)},[_]),m=Y.useCallback((h,p)=>{const x=h.currentTarget,f={x:h.clientX,y:h.clientY},g=Oto(f,x.getBoundingClientRect()),y=Fto(f,g),b=Bto(p.getBoundingClientRect()),v=Vto([...y,...b]);a(v),_(!0)},[_]);return Y.useEffect(()=>()=>d(),[d]),Y.useEffect(()=>{if(c&&u){const h=x=>m(x,u),p=x=>m(x,c);return c.addEventListener("pointerleave",h),u.addEventListener("pointerleave",p),()=>{c.removeEventListener("pointerleave",h),u.removeEventListener("pointerleave",p)}}},[c,u,m,d]),Y.useEffect(()=>{if(s){const h=p=>{const x=p.target,f={x:p.clientX,y:p.clientY},g=c?.contains(x)||u?.contains(x),y=!zto(f,s);g?d():y&&(d(),l())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[c,u,s,l,d]),G.jsx(ipt,{...t,ref:i})}),[Nto,Hto]=nq(PI,{isInside:!1}),Ito=Sto("TooltipContent"),ipt=Y.forwardRef((t,e)=>{const{__scopeTooltip:n,children:o,"aria-label":r,onEscapeKeyDown:i,onPointerDownOutside:s,...a}=t,c=rq(oD,n),l=oq(n),{onClose:u}=c;return Y.useEffect(()=>(document.addEventListener(R5e,u),()=>document.removeEventListener(R5e,u)),[u]),Y.useEffect(()=>{if(c.trigger){const _=d=>{d.target?.contains(c.trigger)&&u()};return window.addEventListener("scroll",_,{capture:!0}),()=>window.removeEventListener("scroll",_,{capture:!0})}},[c.trigger,u]),G.jsx(ZN,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:_=>_.preventDefault(),onDismiss:u,children:G.jsxs(X2e,{"data-state":c.stateAttribute,...l,...a,ref:e,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[G.jsx(Ito,{children:o}),G.jsx(Nto,{scope:n,isInside:!0,children:G.jsx(Tto,{id:c.contentId,role:"tooltip",children:r||o})})]})})});rpt.displayName=oD;var spt="TooltipArrow",Lto=Y.forwardRef((t,e)=>{const{__scopeTooltip:n,...o}=t,r=oq(n);return Hto(spt,n).isInside?null:G.jsx(j2e,{...r,...o,ref:e})});Lto.displayName=spt;function Oto(t,e){const n=Math.abs(e.top-t.y),o=Math.abs(e.bottom-t.y),r=Math.abs(e.right-t.x),i=Math.abs(e.left-t.x);switch(Math.min(n,o,r,i)){case i:return"left";case r:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function Fto(t,e,n=5){const o=[];switch(e){case"top":o.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":o.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":o.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":o.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return o}function Bto(t){const{top:e,right:n,bottom:o,left:r}=t;return[{x:r,y:e},{x:n,y:e},{x:n,y:o},{x:r,y:o}]}function zto(t,e){const{x:n,y:o}=t;let r=!1;for(let i=0,s=e.length-1;i<e.length;s=i++){const a=e[i],c=e[s],l=a.x,u=a.y,_=c.x,d=c.y;u>o!=d>o&&n<(_-l)*(o-u)/(d-u)+l&&(r=!r)}return r}function Vto(t){const e=t.slice();return e.sort((n,o)=>n.x<o.x?-1:n.x>o.x?1:n.y<o.y?-1:n.y>o.y?1:0),$to(e)}function $to(t){if(t.length<=1)return t.slice();const e=[];for(let o=0;o<t.length;o++){const r=t[o];for(;e.length>=2;){const i=e[e.length-1],s=e[e.length-2];if((i.x-s.x)*(r.y-s.y)>=(i.y-s.y)*(r.x-s.x))e.pop();else break}e.push(r)}e.pop();const n=[];for(let o=t.length-1;o>=0;o--){const r=t[o];for(;n.length>=2;){const i=n[n.length-1],s=n[n.length-2];if((i.x-s.x)*(r.y-s.y)>=(i.y-s.y)*(r.x-s.x))n.pop();else break}n.push(r)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}var Wto=tpt,Uto=npt,Xto=opt,apt=rpt;const cpt=Wto,lpt=Uto,upt=Xto,H5e=Y.forwardRef(({className:t,sideOffset:e=4,...n},o)=>G.jsx(apt,{ref:o,sideOffset:e,className:lr("z-50 overflow-hidden rounded-md bg-slate-900 px-3 py-1.5 text-xs text-slate-50 animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:bg-slate-50 dark:text-slate-900",t),...n}));H5e.displayName=apt.displayName;const jto=26,Ux=Za("run-frame:RunFrame"),Gto=async()=>{try{const t=await fetch("https://data.jsdelivr.com/v1/package/npm/@tscircuit/eval");if(t.ok)return(await t.json()).tags?.latest}catch(t){console.error("Failed to fetch latest eval version",t)}},_pt=async(t,e)=>{if(t)return t;if(e||!window.TSCIRCUIT_LATEST_EVAL_VERSION){const n=await Gto();if(n)return window.TSCIRCUIT_LATEST_EVAL_VERSION=n,n}return window.TSCIRCUIT_LATEST_EVAL_VERSION?window.TSCIRCUIT_LATEST_EVAL_VERSION:"latest"},dpt=t=>{fY();const e=eu(pe=>pe.circuitJson),n=eu(pe=>pe.setCircuitJson),[o,r]=Y.useState(null),i=Y.useRef(null),[s,a]=Y.useState(null),[c,l]=Y.useReducer((pe,Me)=>pe+1,0),u=yY(pe=>pe.setLastRunEvalVersion),_=Y.useRef(0),d=pto(),[m,h]=Y.useState(!1),[p,x]=Y.useState(!1),[f,g]=Y.useState({}),[y,b]=Y.useState(""),[v,S]=Y.useState(!1),[M,w]=Y.useState(!1),D=Object.values(f).sort((pe,Me)=>pe.startTime-Me.startTime)[0]?.effectName,A=pe=>{t.onRunCompleted?.(pe)};Y.useEffect(()=>{const pe=Me=>{(Me.ctrlKey||Me.metaKey)&&Me.key==="Enter"&&!m&&l(1)};return window.addEventListener("keydown",pe),()=>window.removeEventListener("keydown",pe)},[m]),Y.useEffect(()=>{let pe=!1;return(async()=>{try{if(!globalThis.runFrameWorker){const xe=await _pt(t.evalVersion,t.forceLatestEvalVersion),We=await Kmt({evalVersion:xe,webWorkerBlobUrl:t.evalWebWorkerBlobUrl,projectConfig:{projectBaseUrl:t.projectBaseUrl||`${Ax}/files/static`},...t.platformConfig&&{platformConfig:t.platformConfig},verbose:!0,...t.enableFetchProxy&&{enableFetchProxy:t.enableFetchProxy},...window.TSCIRCUIT_USE_RUNFRAME_FOR_CLI&&{disableCdnLoading:!0},...t.tscircuitSessionToken&&{tscircuitSessionToken:t.tscircuitSessionToken}});if(pe)return;globalThis.runFrameWorker=We,u(xe)}pe||x(!0)}catch(xe){console.error("Failed to preload eval worker",xe)}})(),()=>{pe=!0}},[t.evalVersion,t.evalWebWorkerBlobUrl,t.forceLatestEvalVersion,t.tscircuitSessionToken]);const[I,H]=Y.useState(null),[O,z]=Y.useState({}),[V,j]=Y.useState([]),[q,K]=Y.useState(t.defaultActiveTab??t.defaultTab??"pcb");Y.useEffect(()=>{t.debug&&Za.enable("run-frame*")},[t.debug]);const ne=t.fsMap instanceof Map?t.fsMap:Object.entries(t.fsMap??{}).reduce((pe,[Me,xe])=>pe.set(Me,xe),new Map),ce=Y.useRef(null),ee=Y.useRef(null),{isStaticCircuitJson:oe,circuitJson:ie,error:ae}=gto({mainComponentPath:t.mainComponentPath,fsMap:ne});Y.useEffect(()=>{oe&&(ie?(n(ie),r(null)):ae&&r({error:ae,stack:""}))},[oe,ie,ae]),Y.useEffect(()=>{if(t.isLoadingFiles||oe)return;const pe=ne instanceof Map?Object.fromEntries(ne.entries()):ne;if(!pe||Object.keys(pe).length===0){r({error:"No files provided. Please provide at least one file with code to execute.",stack:""}),h(!1);return}const Me=c!==_.current;if(ce.current&&e){const We=mto(ce.current,ne);if(Object.keys(We).length>0)Ux("code changes detected");else if(ee.current!==t.entrypoint)Ux("render triggered by entrypoint change");else if(!Me){Ux("render triggered without changes to fsMap, skipping");return}}if(t.showRunButton&&c===_.current)return;ce.current=ne,ee.current=t.entrypoint??null,_.current=c,h(!0);const xe=async()=>{Ux("running render worker"),r(null),H(null),g({}),j([]);const We={progress:0,debugOutputs:[]};let Xe=!1;i.current=()=>{Xe=!0};const Je=await _pt(t.evalVersion,!globalThis.runFrameWorker&&t.forceLatestEvalVersion);Ux("resolvedEvalVersion",Je);const fe=globalThis.runFrameWorker??await Kmt({evalVersion:Je,webWorkerBlobUrl:t.evalWebWorkerBlobUrl,verbose:!0,projectConfig:{projectBaseUrl:t.projectBaseUrl||`${Ax}/files/static`},...t.platformConfig&&{platformConfig:t.platformConfig},...t.enableFetchProxy&&{enableFetchProxy:t.enableFetchProxy},...window.TSCIRCUIT_USE_RUNFRAME_FOR_CLI&&{disableCdnLoading:!0},...t.tscircuitSessionToken&&{tscircuitSessionToken:t.tscircuitSessionToken}});globalThis.runFrameWorker=fe,u(Je),y?.trim()&&fe.enableDebug(y.replace("DEBUG=","")),Ux("Starting render..."),t.onRenderStarted?.();const Ye=ne instanceof Map?Object.fromEntries(ne.entries()):ne;let Oe=Date.now();fe.on("asyncEffect:start",Pe=>{const Ee=`${Pe.phase}|${Pe.componentDisplayName??""}|${Pe.effectName}`;g(we=>({...we,[Ee]:{...Pe,startTime:Date.now()}}))}),fe.on("asyncEffect:end",Pe=>{const Ee=`${Pe.phase}|${Pe.componentDisplayName??""}|${Pe.effectName}`;g(we=>{const{[Ee]:ze,...Ue}=we;return Ue})}),fe.on("autorouting:start",Pe=>{z({...O,[Pe.componentDisplayName]:{simpleRouteJson:Pe.simpleRouteJson,createdAt:Date.now()}})}),fe.on("solver:started",Pe=>{Ux("solver:started",Pe),j(Ee=>{const we=`${Pe.componentName}-${Pe.solverName}`;return Ee.some(Ue=>`${Ue.componentName}-${Ue.solverName}`===we)?Ee:[...Ee,Pe]})}),fe.on("board:renderPhaseStarted",Pe=>{We.lastRenderEvent=Pe,We.eventsProcessed=(We.eventsProcessed??0)+1;const Ee=Og.indexOf(Pe.phase)/jto*.75+We.eventsProcessed/1e3*.25,we=1-Math.exp(-Ee*3);We.progress=we,Xe||H({...We})}),q==="render_log"&&fe.on("renderable:renderLifecycle:anyEvent",Pe=>{We.renderEvents=We.renderEvents??[],Pe.createdAt=Date.now(),We.renderEvents.push(Pe),Date.now()-Oe>500&&(We.phaseTimings=Qmt(We.renderEvents??[]),Oe=Date.now()),Xe||H({...We})}),fe.on("autorouting:progress",Pe=>{a(Pe.debugGraphics)}),fe.on("debug:logOutput",Pe=>{We.debugOutputs=We.debugOutputs??[],We.debugOutputs.push({type:"debug",name:Pe.name,content:Pe.content}),Xe||H({...We})}),Ux("Executing fsMap...");const Ne=await fe.executeWithFsMap({entrypoint:t.entrypoint,fsMap:Ye,...t.mainComponentPath?{mainComponentPath:t.mainComponentPath}:{}}).then(()=>({success:!0})).catch(Pe=>{const Ee=Pe.message.replace("Error: ","");return Ux(`eval error: ${Ee}`),t.onError?.(Pe),A(A5e({executionError:Pe})),r({error:Ee,stack:Pe.stack}),H(null),console.error(Pe),{success:!1}});if(Ux("worker call started"),!Ne.success){h(!1),g({});return}const Ve=fe.renderUntilSettled();Ux("waiting for initial circuit json...");let Re=await fe.getCircuitJson().catch(Pe=>(Ux("error getting initial circuit json",Pe),t.onError?.(Pe),A(A5e({executionError:Pe})),r({error:Pe.message,stack:Pe.stack}),H(null),h(!1),g({}),null));Re&&(Ux("got initial circuit json"),n(Re),t.onCircuitJsonChange?.(Re),t.onInitialRender?.({circuitJson:Re}),await Ve,Ux("getting final circuit json"),Re=await fe.getCircuitJson(),t.onCircuitJsonChange?.(Re),n(Re),A(A5e({circuitJson:Re})),t.onRenderFinished?.({circuitJson:Re}),a({}),q==="render_log"&&(We.phaseTimings=Qmt(We.renderEvents??[])),We.progress=1,Xe||H({...We}),h(!1),g({}),b(""),i.current=null)};d.runWithMutex(xe)},[t.fsMap,t.entrypoint,c,t.evalVersion,t.mainComponentPath,t.isLoadingFiles,y,oe]);const de=Y.useRef(null),be=Y.useRef(null),Ce=pe=>{if(!pe||pe===null){console.warn("[RunFrame] handleEditEvent received null or undefined event.");return}pe.in_progress?(de.current=pe,be.current&&(clearTimeout(be.current),be.current=null)):(be.current&&clearTimeout(be.current),be.current=setTimeout(()=>{const Me=pe||de.current;t.onEditEvent?.(Me),de.current=null,be.current=null},100))},De=async(pe,Me)=>{let xe="";const We=Array.isArray(e)&&e.find(fe=>fe.type==="software_project_metadata"),Xe=t.projectUrl??We?.project_url;if(Xe)try{xe=new URL(Xe).pathname}catch{xe=Xe}const Je=xe?`${xe} - ${pe}`:pe;await hI.post("autorouting/bug_reports/create",{json:{title:Je,simple_route_json:Me.simpleRouteJson}}).json().then(({autorouting_bug_report:fe})=>{window.open(`https://api.tscircuit.com/autorouting/bug_reports/view?autorouting_bug_report_id=${fe.autorouting_bug_report_id}`,"_blank")}).catch(fe=>{if(console.error("Failed to report autorouting bug",fe),fe instanceof Uv&&fe.response?.status===401){t.onLoginRequired?t.onLoginRequired():alert("You must be logged in to report autorouting bugs");return}const Oe=fe instanceof Error?fe.message:"Failed to report autorouting bug";alert(`Failed to report autorouting bug: ${Oe}`)})};return t.isLoadingFiles?G.jsx(fto,{}):G.jsx(M5,{FallbackComponent:hto,children:G.jsx(Bmt,{code:ne.get(t.entrypoint??t.mainComponentPath),fsMap:ne,defaultActiveTab:t.defaultActiveTab??t.defaultTab,defaultTab:t.defaultTab,availableTabs:t.availableTabs,showToggleFullScreen:t.showToggleFullScreen,autoroutingGraphics:s,autoroutingLog:O,onReportAutoroutingLog:t.onReportAutoroutingLog||De,leftHeaderContent:G.jsxs(G.Fragment,{children:[t.showRunButton&&G.jsx(cpt,{children:G.jsxs(lpt,{children:[G.jsx(upt,{asChild:!0,children:G.jsxs("div",{className:"rf-relative rf-inline-flex",children:[G.jsxs("button",{type:"button",onClick:()=>{l(1)},className:"rf-flex rf-items-center rf-gap-2 rf-px-4 rf-py-2 rf-bg-blue-600 hover:rf-bg-blue-700 rf-text-white rf-rounded-md disabled:rf-opacity-50 transition-colors duration-200",disabled:m||!p,children:["Run"," ",m||!p?G.jsx($9,{className:"rf-w-3 rf-h-3 rf-animate-spin"}):G.jsx(aot,{className:"rf-w-3 rf-h-3"})]}),m&&G.jsx("div",{className:"rf-flex rf-items-center rf-ml-1",children:G.jsx(dc,{onClick:pe=>{pe.stopPropagation(),h(!1),H(null),r(null),i.current&&(i.current(),i.current=null),d.cancel(),g({}),globalThis.runFrameWorker&&(globalThis.runFrameWorker.kill(),globalThis.runFrameWorker=null)},variant:"ghost",size:"icon",className:"rf-text-red-300 hover:rf-text-red-400 hover:!rf-bg-transparent [&>svg]:rf-text-red-300 [&>svg]:hover:rf-text-red-400 rf-flex rf-items-center rf-justify-center",children:G.jsx(jDn,{className:"!rf-h-2.5 !rf-w-2.5",fill:"currentColor",stroke:"currentColor"})})})]})}),G.jsx(H5e,{sideOffset:8,className:"rf-p-0 rf-bg-transparent rf-border-none rf-shadow-none rf-pointer-events-none",children:G.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2 rf-px-2.5 rf-py-1.5 rf-bg-slate-900 rf-rounded-md rf-shadow-xl rf-border rf-border-slate-800/60",children:[G.jsx("kbd",{className:"rf-bg-slate-800 rf-px-1.5 rf-py-0.5 rf-rounded rf-text-[10px] rf-font-sans rf-font-medium rf-border rf-border-slate-700 rf-text-slate-200 rf-leading-none",children:"Ctrl"}),G.jsx("span",{className:"rf-text-slate-500 rf-text-[11px] rf-font-medium rf-leading-none",children:"+"}),G.jsx("kbd",{className:"rf-bg-slate-800 rf-px-1.5 rf-py-0.5 rf-rounded rf-text-[10px] rf-font-sans rf-font-medium rf-border rf-border-slate-700 rf-text-slate-200 rf-leading-none",children:"Enter"})]})})]})}),t.showFileMenu!==!1&&G.jsx(bI,{isWebEmbedded:t.isWebEmbedded,onLoginRequired:t.onLoginRequired,showSchematicDebugGrid:v,onChangeShowSchematicDebugGrid:S,showSchematicPorts:M,onChangeShowSchematicPorts:w,autoroutingLog:O,onReportAutoroutingLog:t.onReportAutoroutingLog||De}),t.leftHeaderContent]}),onActiveTabChange:K,circuitJson:e,renderLog:I,activeEffectName:D,isRunningCode:m,errorMessage:o?.error,errorStack:o?.stack,onEditEvent:Ce,editEvents:t.editEvents,defaultToFullScreen:t.defaultToFullScreen,onRerunWithDebug:pe=>{b(pe||""),l(1)},solverEvents:V,showSchematicDebugGrid:v,showSchematicPorts:M,onChangeShowSchematicDebugGrid:S,onChangeShowSchematicPorts:w})})},Yto=t=>new Promise(e=>setTimeout(e,t)),qto=({isOpen:t,onClose:e,onLoginSuccess:n})=>{const[o,r]=Y.useState("idle"),[i,s]=Y.useState(null),[a,c]=Y.useState(null),l=eu(p=>p.pushEvent),u=Y.useRef(null);Y.useEffect(()=>()=>{u.current&&u.current.abort()},[]);const _=Y.useCallback(async()=>{r("creating"),c(null),u.current=new AbortController;try{const p=Xv(),{login_page:x}=await p.post("sessions/login_page/create",{json:{},signal:u.current?.signal}).json();s(x.url),r("waiting");const f=new URL(x.url);for(f.searchParams.set("autoclose","true"),window.open(f.toString(),"_blank");!u.current?.signal.aborted;){const{login_page:y}=await p.post("sessions/login_page/get",{json:{login_page_id:x.login_page_id},headers:{Authorization:`Bearer ${x.login_page_auth_token}`},signal:u.current?.signal}).json();if(y.was_login_successful){r("exchanging");break}if(y.is_expired)throw new Error("Login page expired. Please try again.");await Yto(1e3)}if(u.current?.signal.aborted){r("idle");return}const{session:g}=await p.post("sessions/login_page/exchange_for_cli_session",{json:{login_page_id:x.login_page_id},headers:{Authorization:`Bearer ${x.login_page_auth_token}`},signal:u.current?.signal}).json();typeof window<"u"&&(window.TSCIRCUIT_REGISTRY_TOKEN=g.token),await l({event_type:"TOKEN_UPDATED",registry_token:g.token}),r("success"),ds.success("Successfully logged in!"),n?.(),setTimeout(()=>{e(),r("idle"),s(null)},1e3)}catch(p){if(p instanceof DOMException&&p.name==="AbortError"){r("idle");return}console.error("Login error:",p);const x=p instanceof Error?p.message:"Failed to complete login";c(x),r("error"),ds.error(x)}},[l,n,e]),d=Y.useCallback(()=>{u.current&&u.current.abort(),r("idle"),s(null),c(null),e()},[e]),m=o==="creating"||o==="waiting"||o==="exchanging",h=()=>{switch(o){case"creating":return"Creating login page...";case"waiting":return"Waiting for you to complete login in the browser...";case"exchanging":return"Generating token...";case"success":return"Successfully logged in!";case"error":return a||"An error occurred";default:return null}};return G.jsx(QE,{open:t,onOpenChange:p=>!p&&!m&&d(),children:G.jsxs(eC,{className:"rf-max-w-md",children:[G.jsxs(tC,{children:[G.jsx(nC,{children:"Sign In Required"}),G.jsx(ZE,{children:o==="idle"||o==="error"?"Sign in to continue. A new browser window will open for authentication.":"Complete the login process in the opened browser window."})]}),G.jsxs("div",{className:"rf-flex rf-flex-col rf-items-center rf-gap-4 rf-py-4",children:[o==="idle"||o==="error"?G.jsx(dc,{onClick:_,className:"rf-w-full",children:"Sign In"}):G.jsxs("div",{className:"rf-flex rf-flex-col rf-items-center rf-gap-3 rf-w-full",children:[o!=="success"&&G.jsx("div",{className:"rf-animate-spin rf-w-6 rf-h-6 rf-border-2 rf-border-gray-300 rf-border-t-blue-600 rf-rounded-full"}),G.jsx("p",{className:"rf-text-sm rf-text-gray-600 rf-text-center",children:h()}),i&&o==="waiting"&&G.jsx("a",{href:i,target:"_blank",rel:"noreferrer",className:"rf-text-xs rf-text-blue-600 hover:rf-underline",children:"Click here if the window didn't open"})]}),a&&o==="error"&&G.jsx("p",{className:"rf-text-sm rf-text-red-600 rf-text-center",children:a}),m&&G.jsx(dc,{variant:"outline",onClick:d,className:"rf-w-full",children:"Cancel"})]})]})})},Jto=()=>{const[t,e]=Y.useState(!1),n=Y.useCallback(()=>{e(!0)},[]),o=Y.useCallback(()=>{e(!1)},[]),r=Y.useCallback(()=>{e(!1)},[]);return{LoginDialog:G.jsx(qto,{isOpen:t,onClose:o,onLoginSuccess:r}),openLoginDialog:n}},Kto=t=>{const[e,n]=RT("load-latest-eval",!0),[o]=Y.useState(()=>typeof window>"u"?void 0:new URLSearchParams(window.location.hash.slice(1)).get("main_component")??void 0),r=Y.useCallback(a=>{if(typeof window>"u")return;const c=new URLSearchParams(window.location.hash.slice(1));if(c.get("main_component")===a)return;c.set("main_component",a);const l=c.toString(),u=`${window.location.pathname}${window.location.search}`+(l.length>0?`#${l}`:"");window.history.replaceState(null,"",u)},[]),{LoginDialog:i,openLoginDialog:s}=Jto();return G.jsxs(G.Fragment,{children:[i,G.jsx(cft,{debug:t.debug,forceLatestEvalVersion:!t.workerBlobUrl&&e,defaultToFullScreen:!0,showToggleFullScreen:!1,workerBlobUrl:t.workerBlobUrl,showFilesSwitch:!0,showFileMenu:!1,enableFetchProxy:t.enableFetchProxy,initialMainComponentPath:o,onLoginRequired:s,onMainComponentPathChange:r,leftHeaderContent:G.jsxs("div",{className:"rf-flex rf-items-center rf-justify-between",children:[G.jsx(bI,{isWebEmbedded:!1,shouldLoadLatestEval:!t.workerBlobUrl&&e,onChangeShouldLoadLatestEval:a=>{n(a),globalThis.runFrameWorker=null},onLoginRequired:s}),t.scenarioSelectorContent]})})]})};Za("run-frame:ImportComponentDialog");var hpt=1,Qto=.9,Zto=.8,eno=.17,I5e=.1,L5e=.999,tno=.9999,nno=.99,ono=/[\\\/_+.#"@\[\(\{&]/,rno=/[\\\/_+.#"@\[\(\{&]/g,ino=/[\s-]/,mpt=/[\s-]/g;function O5e(t,e,n,o,r,i,s){if(i===e.length)return r===t.length?hpt:nno;var a=`${r},${i}`;if(s[a]!==void 0)return s[a];for(var c=o.charAt(i),l=n.indexOf(c,r),u=0,_,d,m,h;l>=0;)_=O5e(t,e,n,o,l+1,i+1,s),_>u&&(l===r?_*=hpt:ono.test(t.charAt(l-1))?(_*=Zto,m=t.slice(r,l-1).match(rno),m&&r>0&&(_*=Math.pow(L5e,m.length))):ino.test(t.charAt(l-1))?(_*=Qto,h=t.slice(r,l-1).match(mpt),h&&r>0&&(_*=Math.pow(L5e,h.length))):(_*=eno,r>0&&(_*=Math.pow(L5e,l-r))),t.charAt(l)!==e.charAt(i)&&(_*=tno)),(_<I5e&&n.charAt(l-1)===o.charAt(i+1)||o.charAt(i+1)===o.charAt(i)&&n.charAt(l-1)!==o.charAt(i))&&(d=O5e(t,e,n,o,l+1,i+2,s),d*I5e>_&&(_=d*I5e)),_>u&&(u=_),l=n.indexOf(c,l+1);return s[a]=u,u}function ppt(t){return t.toLowerCase().replace(mpt," ")}function sno(t,e,n){return t=n&&n.length>0?`${t+" "+n.join(" ")}`:t,O5e(t,e,ppt(t),ppt(e),0,0,{})}var ano=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Gv=ano.reduce((t,e)=>{const n=tot(`Primitive.${e}`),o=Y.forwardRef((r,i)=>{const{asChild:s,...a}=r,c=s?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),G.jsx(c,{...a,ref:i})});return o.displayName=`Primitive.${e}`,{...t,[e]:o}},{}),vI='[cmdk-group=""]',F5e='[cmdk-group-items=""]',cno='[cmdk-group-heading=""]',fpt='[cmdk-item=""]',xpt=`${fpt}:not([aria-disabled="true"])`,B5e="cmdk-item-select",rD="data-value",lno=(t,e,n)=>sno(t,e,n),gpt=Y.createContext(void 0),SI=()=>Y.useContext(gpt),ypt=Y.createContext(void 0),z5e=()=>Y.useContext(ypt),bpt=Y.createContext(void 0),Ppt=Y.forwardRef((t,e)=>{let n=iD(()=>{var oe,ie;return{search:"",value:(ie=(oe=t.value)!=null?oe:t.defaultValue)!=null?ie:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),o=iD(()=>new Set),r=iD(()=>new Map),i=iD(()=>new Map),s=iD(()=>new Set),a=vpt(t),{label:c,children:l,value:u,onValueChange:_,filter:d,shouldFilter:m,loop:h,disablePointerSelection:p=!1,vimBindings:x=!0,...f}=t,g=Jp(),y=Jp(),b=Jp(),v=Y.useRef(null),S=bno();uC(()=>{if(u!==void 0){let oe=u.trim();n.current.value=oe,M.emit()}},[u]),uC(()=>{S(6,O)},[]);let M=Y.useMemo(()=>({subscribe:oe=>(s.current.add(oe),()=>s.current.delete(oe)),snapshot:()=>n.current,setState:(oe,ie,ae)=>{var de,be,Ce,De;if(!Object.is(n.current[oe],ie)){if(n.current[oe]=ie,oe==="search")H(),A(),S(1,I);else if(oe==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let pe=document.getElementById(b);pe?pe.focus():(de=document.getElementById(g))==null||de.focus()}if(S(7,()=>{var pe;n.current.selectedItemId=(pe=z())==null?void 0:pe.id,M.emit()}),ae||S(5,O),((be=a.current)==null?void 0:be.value)!==void 0){let pe=ie??"";(De=(Ce=a.current).onValueChange)==null||De.call(Ce,pe);return}}M.emit()}},emit:()=>{s.current.forEach(oe=>oe())}}),[]),w=Y.useMemo(()=>({value:(oe,ie,ae)=>{var de;ie!==((de=i.current.get(oe))==null?void 0:de.value)&&(i.current.set(oe,{value:ie,keywords:ae}),n.current.filtered.items.set(oe,D(ie,ae)),S(2,()=>{A(),M.emit()}))},item:(oe,ie)=>(o.current.add(oe),ie&&(r.current.has(ie)?r.current.get(ie).add(oe):r.current.set(ie,new Set([oe]))),S(3,()=>{H(),A(),n.current.value||I(),M.emit()}),()=>{i.current.delete(oe),o.current.delete(oe),n.current.filtered.items.delete(oe);let ae=z();S(4,()=>{H(),ae?.getAttribute("id")===oe&&I(),M.emit()})}),group:oe=>(r.current.has(oe)||r.current.set(oe,new Set),()=>{i.current.delete(oe),r.current.delete(oe)}),filter:()=>a.current.shouldFilter,label:c||t["aria-label"],getDisablePointerSelection:()=>a.current.disablePointerSelection,listId:g,inputId:b,labelId:y,listInnerRef:v}),[]);function D(oe,ie){var ae,de;let be=(de=(ae=a.current)==null?void 0:ae.filter)!=null?de:lno;return oe?be(oe,n.current.search,ie):0}function A(){if(!n.current.search||a.current.shouldFilter===!1)return;let oe=n.current.filtered.items,ie=[];n.current.filtered.groups.forEach(de=>{let be=r.current.get(de),Ce=0;be.forEach(De=>{let pe=oe.get(De);Ce=Math.max(pe,Ce)}),ie.push([de,Ce])});let ae=v.current;V().sort((de,be)=>{var Ce,De;let pe=de.getAttribute("id"),Me=be.getAttribute("id");return((Ce=oe.get(Me))!=null?Ce:0)-((De=oe.get(pe))!=null?De:0)}).forEach(de=>{let be=de.closest(F5e);be?be.appendChild(de.parentElement===be?de:de.closest(`${F5e} > *`)):ae.appendChild(de.parentElement===ae?de:de.closest(`${F5e} > *`))}),ie.sort((de,be)=>be[1]-de[1]).forEach(de=>{var be;let Ce=(be=v.current)==null?void 0:be.querySelector(`${vI}[${rD}="${encodeURIComponent(de[0])}"]`);Ce?.parentElement.appendChild(Ce)})}function I(){let oe=V().find(ae=>ae.getAttribute("aria-disabled")!=="true"),ie=oe?.getAttribute(rD);M.setState("value",ie||void 0)}function H(){var oe,ie,ae,de;if(!n.current.search||a.current.shouldFilter===!1){n.current.filtered.count=o.current.size;return}n.current.filtered.groups=new Set;let be=0;for(let Ce of o.current){let De=(ie=(oe=i.current.get(Ce))==null?void 0:oe.value)!=null?ie:"",pe=(de=(ae=i.current.get(Ce))==null?void 0:ae.keywords)!=null?de:[],Me=D(De,pe);n.current.filtered.items.set(Ce,Me),Me>0&&be++}for(let[Ce,De]of r.current)for(let pe of De)if(n.current.filtered.items.get(pe)>0){n.current.filtered.groups.add(Ce);break}n.current.filtered.count=be}function O(){var oe,ie,ae;let de=z();de&&(((oe=de.parentElement)==null?void 0:oe.firstChild)===de&&((ae=(ie=de.closest(vI))==null?void 0:ie.querySelector(cno))==null||ae.scrollIntoView({block:"nearest"})),de.scrollIntoView({block:"nearest"}))}function z(){var oe;return(oe=v.current)==null?void 0:oe.querySelector(`${fpt}[aria-selected="true"]`)}function V(){var oe;return Array.from(((oe=v.current)==null?void 0:oe.querySelectorAll(xpt))||[])}function j(oe){let ie=V()[oe];ie&&M.setState("value",ie.getAttribute(rD))}function q(oe){var ie;let ae=z(),de=V(),be=de.findIndex(De=>De===ae),Ce=de[be+oe];(ie=a.current)!=null&&ie.loop&&(Ce=be+oe<0?de[de.length-1]:be+oe===de.length?de[0]:de[be+oe]),Ce&&M.setState("value",Ce.getAttribute(rD))}function K(oe){let ie=z(),ae=ie?.closest(vI),de;for(;ae&&!de;)ae=oe>0?gno(ae,vI):yno(ae,vI),de=ae?.querySelector(xpt);de?M.setState("value",de.getAttribute(rD)):q(oe)}let ne=()=>j(V().length-1),ce=oe=>{oe.preventDefault(),oe.metaKey?ne():oe.altKey?K(1):q(1)},ee=oe=>{oe.preventDefault(),oe.metaKey?j(0):oe.altKey?K(-1):q(-1)};return Y.createElement(Gv.div,{ref:e,tabIndex:-1,...f,"cmdk-root":"",onKeyDown:oe=>{var ie;(ie=f.onKeyDown)==null||ie.call(f,oe);let ae=oe.nativeEvent.isComposing||oe.keyCode===229;if(!(oe.defaultPrevented||ae))switch(oe.key){case"n":case"j":{x&&oe.ctrlKey&&ce(oe);break}case"ArrowDown":{ce(oe);break}case"p":case"k":{x&&oe.ctrlKey&&ee(oe);break}case"ArrowUp":{ee(oe);break}case"Home":{oe.preventDefault(),j(0);break}case"End":{oe.preventDefault(),ne();break}case"Enter":{oe.preventDefault();let de=z();if(de){let be=new Event(B5e);de.dispatchEvent(be)}}}}},Y.createElement("label",{"cmdk-label":"",htmlFor:w.inputId,id:w.labelId,style:vno},c),iq(t,oe=>Y.createElement(ypt.Provider,{value:M},Y.createElement(gpt.Provider,{value:w},oe))))}),uno=Y.forwardRef((t,e)=>{var n,o;let r=Jp(),i=Y.useRef(null),s=Y.useContext(bpt),a=SI(),c=vpt(t),l=(o=(n=c.current)==null?void 0:n.forceMount)!=null?o:s?.forceMount;uC(()=>{if(!l)return a.item(r,s?.id)},[l]);let u=Spt(r,i,[t.value,t.children,i],t.keywords),_=z5e(),d=Yv(S=>S.value&&S.value===u.current),m=Yv(S=>l||a.filter()===!1?!0:S.search?S.filtered.items.get(r)>0:!0);Y.useEffect(()=>{let S=i.current;if(!(!S||t.disabled))return S.addEventListener(B5e,h),()=>S.removeEventListener(B5e,h)},[m,t.onSelect,t.disabled]);function h(){var S,M;p(),(M=(S=c.current).onSelect)==null||M.call(S,u.current)}function p(){_.setState("value",u.current,!0)}if(!m)return null;let{disabled:x,value:f,onSelect:g,forceMount:y,keywords:b,...v}=t;return Y.createElement(Gv.div,{ref:Rx(i,e),...v,id:r,"cmdk-item":"",role:"option","aria-disabled":!!x,"aria-selected":!!d,"data-disabled":!!x,"data-selected":!!d,onPointerMove:x||a.getDisablePointerSelection()?void 0:p,onClick:x?void 0:h},t.children)}),_no=Y.forwardRef((t,e)=>{let{heading:n,children:o,forceMount:r,...i}=t,s=Jp(),a=Y.useRef(null),c=Y.useRef(null),l=Jp(),u=SI(),_=Yv(m=>r||u.filter()===!1?!0:m.search?m.filtered.groups.has(s):!0);uC(()=>u.group(s),[]),Spt(s,a,[t.value,t.heading,c]);let d=Y.useMemo(()=>({id:s,forceMount:r}),[r]);return Y.createElement(Gv.div,{ref:Rx(a,e),...i,"cmdk-group":"",role:"presentation",hidden:_?void 0:!0},n&&Y.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:l},n),iq(t,m=>Y.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?l:void 0},Y.createElement(bpt.Provider,{value:d},m))))}),dno=Y.forwardRef((t,e)=>{let{alwaysRender:n,...o}=t,r=Y.useRef(null),i=Yv(s=>!s.search);return!n&&!i?null:Y.createElement(Gv.div,{ref:Rx(r,e),...o,"cmdk-separator":"",role:"separator"})}),hno=Y.forwardRef((t,e)=>{let{onValueChange:n,...o}=t,r=t.value!=null,i=z5e(),s=Yv(l=>l.search),a=Yv(l=>l.selectedItemId),c=SI();return Y.useEffect(()=>{t.value!=null&&i.setState("search",t.value)},[t.value]),Y.createElement(Gv.input,{ref:e,...o,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":a,id:c.inputId,type:"text",value:r?t.value:s,onChange:l=>{r||i.setState("search",l.target.value),n?.(l.target.value)}})}),mno=Y.forwardRef((t,e)=>{let{children:n,label:o="Suggestions",...r}=t,i=Y.useRef(null),s=Y.useRef(null),a=Yv(l=>l.selectedItemId),c=SI();return Y.useEffect(()=>{if(s.current&&i.current){let l=s.current,u=i.current,_,d=new ResizeObserver(()=>{_=requestAnimationFrame(()=>{let m=l.offsetHeight;u.style.setProperty("--cmdk-list-height",m.toFixed(1)+"px")})});return d.observe(l),()=>{cancelAnimationFrame(_),d.unobserve(l)}}},[]),Y.createElement(Gv.div,{ref:Rx(i,e),...r,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":a,"aria-label":o,id:c.listId},iq(t,l=>Y.createElement("div",{ref:Rx(s,c.listInnerRef),"cmdk-list-sizer":""},l)))}),pno=Y.forwardRef((t,e)=>{let{open:n,onOpenChange:o,overlayClassName:r,contentClassName:i,container:s,...a}=t;return Y.createElement(Nye,{open:n,onOpenChange:o},Y.createElement(Hye,{container:s},Y.createElement(vY,{"cmdk-overlay":"",className:r}),Y.createElement(SY,{"aria-label":t.label,"cmdk-dialog":"",className:i},Y.createElement(Ppt,{ref:e,...a}))))}),fno=Y.forwardRef((t,e)=>Yv(n=>n.filtered.count===0)?Y.createElement(Gv.div,{ref:e,...t,"cmdk-empty":"",role:"presentation"}):null),xno=Y.forwardRef((t,e)=>{let{progress:n,children:o,label:r="Loading...",...i}=t;return Y.createElement(Gv.div,{ref:e,...i,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":r},iq(t,s=>Y.createElement("div",{"aria-hidden":!0},s)))}),Xx=Object.assign(Ppt,{List:mno,Item:uno,Input:hno,Group:_no,Separator:dno,Dialog:pno,Empty:fno,Loading:xno});function gno(t,e){let n=t.nextElementSibling;for(;n;){if(n.matches(e))return n;n=n.nextElementSibling}}function yno(t,e){let n=t.previousElementSibling;for(;n;){if(n.matches(e))return n;n=n.previousElementSibling}}function vpt(t){let e=Y.useRef(t);return uC(()=>{e.current=t}),e}var uC=typeof window>"u"?Y.useEffect:Y.useLayoutEffect;function iD(t){let e=Y.useRef();return e.current===void 0&&(e.current=t()),e}function Yv(t){let e=z5e(),n=()=>t(e.snapshot());return Y.useSyncExternalStore(e.subscribe,n,n)}function Spt(t,e,n,o=[]){let r=Y.useRef(),i=SI();return uC(()=>{var s;let a=(()=>{var l;for(let u of n){if(typeof u=="string")return u.trim();if(typeof u=="object"&&"current"in u)return u.current?(l=u.current.textContent)==null?void 0:l.trim():r.current}})(),c=o.map(l=>l.trim());i.value(t,a,c),(s=e.current)==null||s.setAttribute(rD,a),r.current=a}),r}var bno=()=>{let[t,e]=Y.useState(),n=iD(()=>new Map);return uC(()=>{n.current.forEach(o=>o()),n.current=new Map},[t]),(o,r)=>{n.current.set(o,r),e({})}};function Pno(t){let e=t.type;return typeof e=="function"?e(t.props):"render"in e?e.render(t.props):t}function iq({asChild:t,children:e},n){return t&&Y.isValidElement(e)?Y.cloneElement(Pno(e),{ref:e.ref},n(e.props.children)):n(e)}var vno={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const Cpt=Y.forwardRef(({className:t,...e},n)=>G.jsx(Xx,{ref:n,className:lr("rf-flex rf-h-full rf-w-full rf-flex-col rf-overflow-hidden rf-rounded-md rf-bg-white rf-text-zinc-950 dark:rf-bg-zinc-950 dark:rf-text-zinc-50",t),...e}));Cpt.displayName=Xx.displayName;const Mpt=Y.forwardRef(({className:t,...e},n)=>G.jsxs("div",{className:"rf-flex rf-items-center rf-border-b rf-px-3","cmdk-input-wrapper":"",children:[G.jsx(T2e,{className:"rf-mr-2 rf-h-4 rf-w-4 rf-shrink-0 rf-opacity-50"}),G.jsx(Xx.Input,{ref:n,className:lr("rf-flex rf-h-10 rf-w-full rf-rounded-md rf-bg-transparent rf-py-3 rf-text-sm rf-outline-none placeholder:rf-text-zinc-500 disabled:rf-cursor-not-allowed disabled:rf-opacity-50 dark:placeholder:rf-text-zinc-400",t),...e})]}));Mpt.displayName=Xx.Input.displayName;const Tpt=Y.forwardRef(({className:t,...e},n)=>G.jsx(Xx.List,{ref:n,className:lr("rf-max-h-[300px] rf-overflow-y-auto rf-overflow-x-hidden rf-py-1",t),...e}));Tpt.displayName=Xx.List.displayName;const V5e=Y.forwardRef((t,e)=>G.jsx(Xx.Empty,{ref:e,className:"rf-py-6 rf-text-center rf-text-sm",...t}));V5e.displayName=Xx.Empty.displayName;const CI=Y.forwardRef(({className:t,...e},n)=>G.jsx(Xx.Group,{ref:n,className:lr("rf-overflow-hidden rf-px-1 rf-py-0 rf-text-zinc-950 [&_[cmdk-group-heading]]:rf-px-2 [&_[cmdk-group-heading]]:rf-py-1.5 [&_[cmdk-group-heading]]:rf-text-xs [&_[cmdk-group-heading]]:rf-font-medium [&_[cmdk-group-heading]]:rf-text-zinc-500 dark:rf-text-zinc-50 dark:[&_[cmdk-group-heading]]:rf-text-zinc-400",t),...e}));CI.displayName=Xx.Group.displayName;const Sno=Y.forwardRef(({className:t,...e},n)=>G.jsx(Xx.Separator,{ref:n,className:lr("rf--mx-1 rf-h-px rf-bg-zinc-200 dark:rf-bg-zinc-800",t),...e}));Sno.displayName=Xx.Separator.displayName;const MI=Y.forwardRef(({className:t,...e},n)=>G.jsx(Xx.Item,{ref:n,className:lr("rf-relative rf-flex rf-cursor-default rf-gap-2 rf-select-none rf-items-center rf-rounded-sm rf-px-2 rf-py-1.5 rf-text-sm rf-outline-none data-[disabled=true]:rf-pointer-events-none data-[selected=true]:rf-bg-zinc-100 data-[selected=true]:rf-text-zinc-900 data-[disabled=true]:rf-opacity-50 [&_svg]:rf-pointer-events-none [&_svg]:rf-size-4 [&_svg]:rf-shrink-0 dark:data-[selected=true]:rf-bg-zinc-800 dark:data-[selected=true]:rf-text-zinc-50",t),...e}));MI.displayName=Xx.Item.displayName;function Cno(t){const e=Mno(t),n=Y.forwardRef((o,r)=>{const{children:i,...s}=o,a=Y.Children.toArray(i),c=a.find(wno);if(c){const l=c.props.children,u=a.map(_=>_===c?Y.Children.count(l)>1?Y.Children.only(null):Y.isValidElement(l)?l.props.children:null:_);return G.jsx(e,{...s,ref:r,children:Y.isValidElement(l)?Y.cloneElement(l,void 0,u):null})}return G.jsx(e,{...s,ref:r,children:i})});return n.displayName=`${t}.Slot`,n}function Mno(t){const e=Y.forwardRef((n,o)=>{const{children:r,...i}=n;if(Y.isValidElement(r)){const s=Dno(r),a=Eno(i,r.props);return r.type!==Y.Fragment&&(a.ref=o?Rx(o,s):s),Y.cloneElement(r,a)}return Y.Children.count(r)>1?Y.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var Tno=Symbol("radix.slottable");function wno(t){return Y.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Tno}function Eno(t,e){const n={...e};for(const o in e){const r=t[o],i=e[o];/^on[A-Z]/.test(o)?r&&i?n[o]=(...a)=>{const c=i(...a);return r(...a),c}:r&&(n[o]=r):o==="style"?n[o]={...r,...i}:o==="className"&&(n[o]=[r,i].filter(Boolean).join(" "))}return{...t,...n}}function Dno(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var sq="Popover",[wpt]=d4(sq,[vE]),TI=vE(),[Ano,qv]=wpt(sq),Ept=t=>{const{__scopePopover:e,children:n,open:o,defaultOpen:r,onOpenChange:i,modal:s=!1}=t,a=TI(e),c=Y.useRef(null),[l,u]=Y.useState(!1),[_,d]=DP({prop:o,defaultProp:r??!1,onChange:i,caller:sq});return G.jsx(Hj,{...a,children:G.jsx(Ano,{scope:e,contentId:Jp(),triggerRef:c,open:_,onOpenChange:d,onOpenToggle:Y.useCallback(()=>d(m=>!m),[d]),hasCustomAnchor:l,onCustomAnchorAdd:Y.useCallback(()=>u(!0),[]),onCustomAnchorRemove:Y.useCallback(()=>u(!1),[]),modal:s,children:n})})};Ept.displayName=sq;var Dpt="PopoverAnchor",Rno=Y.forwardRef((t,e)=>{const{__scopePopover:n,...o}=t,r=qv(Dpt,n),i=TI(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:a}=r;return Y.useEffect(()=>(s(),()=>a()),[s,a]),G.jsx(Ij,{...i,...o,ref:e})});Rno.displayName=Dpt;var Apt="PopoverTrigger",Rpt=Y.forwardRef((t,e)=>{const{__scopePopover:n,...o}=t,r=qv(Apt,n),i=TI(n),s=tu(e,r.triggerRef),a=G.jsx(Cc.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":Lpt(r.open),...o,ref:s,onClick:Vr(t.onClick,r.onOpenToggle)});return r.hasCustomAnchor?a:G.jsx(Ij,{asChild:!0,...i,children:a})});Rpt.displayName=Apt;var $5e="PopoverPortal",[kno,Nno]=wpt($5e,{forceMount:void 0}),kpt=t=>{const{__scopePopover:e,forceMount:n,children:o,container:r}=t,i=qv($5e,e);return G.jsx(kno,{scope:e,forceMount:n,children:G.jsx(Fg,{present:n||i.open,children:G.jsx(Lj,{asChild:!0,container:r,children:o})})})};kpt.displayName=$5e;var sD="PopoverContent",Npt=Y.forwardRef((t,e)=>{const n=Nno(sD,t.__scopePopover),{forceMount:o=n.forceMount,...r}=t,i=qv(sD,t.__scopePopover);return G.jsx(Fg,{present:o||i.open,children:i.modal?G.jsx(Ino,{...r,ref:e}):G.jsx(Lno,{...r,ref:e})})});Npt.displayName=sD;var Hno=Cno("PopoverContent.RemoveScroll"),Ino=Y.forwardRef((t,e)=>{const n=qv(sD,t.__scopePopover),o=Y.useRef(null),r=tu(e,o),i=Y.useRef(!1);return Y.useEffect(()=>{const s=o.current;if(s)return Y2e(s)},[]),G.jsx(Uj,{as:Hno,allowPinchZoom:!0,children:G.jsx(Hpt,{...t,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Vr(t.onCloseAutoFocus,s=>{s.preventDefault(),i.current||n.triggerRef.current?.focus()}),onPointerDownOutside:Vr(t.onPointerDownOutside,s=>{const a=s.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0,l=a.button===2||c;i.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:Vr(t.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),Lno=Y.forwardRef((t,e)=>{const n=qv(sD,t.__scopePopover),o=Y.useRef(!1),r=Y.useRef(!1);return G.jsx(Hpt,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{t.onCloseAutoFocus?.(i),i.defaultPrevented||(o.current||n.triggerRef.current?.focus(),i.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:i=>{t.onInteractOutside?.(i),i.defaultPrevented||(o.current=!0,i.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const s=i.target;n.triggerRef.current?.contains(s)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&r.current&&i.preventDefault()}})}),Hpt=Y.forwardRef((t,e)=>{const{__scopePopover:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:i,disableOutsidePointerEvents:s,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,..._}=t,d=qv(sD,n),m=TI(n);return D2e(),G.jsx(Sj,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:i,children:G.jsx(ZN,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:u,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>d.onOpenChange(!1),children:G.jsx(X2e,{"data-state":Lpt(d.open),role:"dialog",id:d.contentId,...m,..._,ref:e,style:{..._.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Ipt="PopoverClose",Ono=Y.forwardRef((t,e)=>{const{__scopePopover:n,...o}=t,r=qv(Ipt,n);return G.jsx(Cc.button,{type:"button",...o,ref:e,onClick:Vr(t.onClick,()=>r.onOpenChange(!1))})});Ono.displayName=Ipt;var Fno="PopoverArrow",Bno=Y.forwardRef((t,e)=>{const{__scopePopover:n,...o}=t,r=TI(n);return G.jsx(j2e,{...r,...o,ref:e})});Bno.displayName=Fno;function Lpt(t){return t?"open":"closed"}var zno=Ept,Vno=Rpt,$no=kpt,Opt=Npt;const Wno=zno,Uno=Vno,Fpt=Y.forwardRef(({className:t,align:e="center",sideOffset:n=4,...o},r)=>G.jsx($no,{children:G.jsx(Opt,{ref:r,align:e,sideOffset:n,className:lr("rf-z-50 rf-w-72 rf-rounded-md rf-border rf-border-zinc-200 rf-bg-white rf-p-4 rf-text-zinc-950 rf-shadow-md rf-outline-none 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 rf-origin-[--radix-popover-content-transform-origin] dark:rf-border-zinc-800 dark:rf-bg-zinc-950 dark:rf-text-zinc-50",t),...o})}));Fpt.displayName=Opt.displayName;function Bpt(t,e){const n=t.lastIndexOf("."),o=e.lastIndexOf("."),r=n>0?t.substring(0,n):t,i=o>0?e.substring(0,o):e;if(r!==i&&t.substring(n)===e.substring(o)){if(r.startsWith(i))return 1;if(i.startsWith(r))return-1}return t.localeCompare(e,void 0,{numeric:!0,sensitivity:"base"})}function Xno(t){const e=[],n=new Map;n.set("",{name:"",path:"",type:"folder",children:e});for(const o of t){const r=o.split("/");let i="";for(let s=0;s<r.length;s++){const a=r[s],c=i;if(i=i?`${i}/${a}`:a,!n.has(i)){const l=s===r.length-1,u={name:a,path:i,type:l?"file":"folder",children:l?void 0:[]};n.set(i,u);const _=n.get(c);_&&_.children&&_.children.push(u)}}}return e}function zpt(t,e){for(const n of t){if(n.path===e)return n;if(n.children){const o=zpt(n.children,e);if(o)return o}}return null}function jno(t,e){let n;if(e?n=zpt(t,e):n={name:"",path:"",type:"folder",children:t},!n||!n.children)return{files:[],folders:[]};const o=n.children.filter(i=>i.type==="file"),r=n.children.filter(i=>i.type==="folder");return o.sort((i,s)=>Bpt(i.name,s.name)),r.sort((i,s)=>Bpt(i.name,s.name)),{files:o,folders:r}}const Gno=t=>{const e=t.split("/").pop()||"";return e.endsWith(".py.tsx")?e.slice(0,-4):e};function W5e(t){const e=t.lastIndexOf("/");return e===-1?"/":t.substring(0,e)}function Yno({currentFile:t,files:e}){const[n,o]=Y.useState(!1),[r,i]=Y.useState(()=>{if(typeof window<"u"){const c=new URLSearchParams(window.location.search),l=new URLSearchParams(window.location.hash.slice(1)),u=c.get("file")??l.get("file");if(u&&e.includes(u)){const _=W5e(u);return _==="/"?null:_}}if(t&&e.includes(t)){const c=W5e(t);return c==="/"?null:c}return null});return Y.useEffect(()=>{if(t&&!n&&e.includes(t)){const c=W5e(t);i(c==="/"?null:c)}},[t,n,e]),{currentFolder:r,navigateToFolder:c=>{i(c),o(!0)},resetManualNavigation:()=>{o(!1)}}}const U5e=t=>t.endsWith(".tsx")||t.endsWith(".jsx")?G.jsx(RDn,{className:"rf-h-4 rf-w-4 rf-text-blue-500"}):t.endsWith(".md")||t.endsWith(".txt")?G.jsx(IDn,{className:"rf-h-4 rf-w-4 rf-text-gray-600"}):G.jsx(LDn,{className:"rf-h-4 rf-w-4 rf-text-gray-500"}),qno=t=>t.endsWith(".tsx")||tq(t)||t.endsWith(".jsx"),Jno=t=>Gno(t),Vpt=t=>t.substring(0,t.lastIndexOf("/"))||"/",$pt=({files:t,onFileChange:e,currentFile:n,fileFilter:o=qno,getDisplayName:r=Jno,placeholder:i="Select file",searchPlaceholder:s="Search for file",emptyMessage:a="No files found in this directory.",pinnedFiles:c=[],onToggleFavorite:l,recentlySavedFiles:u=[]})=>{const[_,d]=Y.useState(!1),[m,h]=Y.useState(n),{currentFolder:p,navigateToFolder:x,resetManualNavigation:f}=Yno({currentFile:m,files:t}),[g,y]=Y.useState(0),[b,v]=Y.useState(""),[S,M]=RT("runframe:recentlyViewed",[]),[w,D]=RT("runframe:showRecents",!1);Y.useEffect(()=>{const ae=de=>{(de.metaKey||de.ctrlKey)&&de.key==="k"&&(de.preventDefault(),d(be=>!be))};return window.addEventListener("keydown",ae),()=>window.removeEventListener("keydown",ae)},[]);const A=t.filter(o),I=Y.useRef(null);Y.useEffect(()=>{const ae=()=>{I.current&&(clearTimeout(I.current),I.current=null)};return h(n),n&&A.includes(n)&&(ae(),I.current=setTimeout(()=>{M(de=>{if(de[0]===n)return de;const be=de.filter(Ce=>Ce!==n);return[n,...be].slice(0,10)})},500)),ae},[n,A,M]);const H=Xno(A),{files:O,folders:z}=jno(H,p||""),j=(()=>{if(!b.trim())return{currentDirResults:[],globalResults:[]};const ae=b.toLowerCase(),be=A.map(pe=>{const Me=pe.split("/").pop()||"";return{path:pe,fileName:Me}}).filter(pe=>pe.fileName.toLowerCase().includes(ae)||pe.path.toLowerCase().includes(ae)),Ce=be.filter(pe=>p?pe.path.substring(0,pe.path.lastIndexOf("/"))===p:!pe.path.includes("/")),De=be.filter(pe=>p?pe.path.substring(0,pe.path.lastIndexOf("/"))!==p:pe.path.includes("/"));return{currentDirResults:Ce,globalResults:De}})(),q=b.trim().length>0,K=ae=>{x(ae),y(0)},ne=Y.useCallback(()=>{if(!p)return;const ae=p.lastIndexOf("/"),de=ae===-1?null:p.substring(0,ae);K(de)},[p,K]);Y.useEffect(()=>{if(!_)return;const ae=de=>{(de.metaKey||de.ctrlKey)&&de.key==="ArrowUp"&&(de.preventDefault(),ne())};return window.addEventListener("keydown",ae),()=>window.removeEventListener("keydown",ae)},[_,ne]);const ce=Y.useCallback((ae,de,be=!1)=>{if(h(ae),y(de),d(!1),e(ae),be){const Ce=ae.lastIndexOf("/"),De=Ce===-1?null:ae.substring(0,Ce);K(De)}},[e,K]);Y.useEffect(()=>{const ae=de=>{if((de.metaKey||de.ctrlKey)&&(de.key==="ArrowLeft"||de.key==="ArrowRight")){if(de.preventDefault(),!n||O.length===0)return;const be=O.findIndex(pe=>pe.path===n);if(be===-1)return;let Ce;de.key==="ArrowLeft"?Ce=be===0?O.length-1:be-1:Ce=be===O.length-1?0:be+1;const De=O[Ce];De&&ce(De.path,Ce)}};return window.addEventListener("keydown",ae),()=>window.removeEventListener("keydown",ae)},[n,O,ce]),Y.useEffect(()=>{if(O.length>0){const ae=O.findIndex(de=>de.path===n);ae>=0&&y(ae)}},[O,n]);const ee=Y.useMemo(()=>{const ae=u.filter(Ce=>A.includes(Ce)),de=S.filter(Ce=>A.includes(Ce)),be=[];ae.length>0&&be.push({path:ae[0],type:"saved"});for(const Ce of de){if(be.length>=3)break;be.some(De=>De.path===Ce)||be.push({path:Ce,type:"viewed"})}return be},[u,S,A]),oe=p??"/";oe.length>25&&""+oe.slice(-22);const ie=()=>`rf-w-full rf-min-w-[600px] ${q?"rf-max-w-[600px]":"rf-max-w-[1000px]"}`;return G.jsx("div",{className:"rf-flex rf-items-center rf-gap-1",children:G.jsxs(Wno,{open:_,onOpenChange:ae=>{d(ae),ae||(v(""),f())},children:[G.jsx(Uno,{asChild:!0,children:G.jsxs(dc,{variant:"outline",role:"combobox","aria-expanded":_,className:"rf-w-fit rf-min-w-32 rf-max-w-100 rf-justify-center rf-items-center rf-gap-1 !rf-font-normal",children:[G.jsx("span",{className:"rf-truncate rf-text-left",children:m?r(m):i}),G.jsx(MDn,{className:"rf-opacity-50 rf-flex-shrink-0"})]})}),G.jsx(Fpt,{className:lr("!rf-p-0 !rf-overflow-y-auto !rf-max-h-[80vh] !rf-z-[200]",ie()),children:G.jsxs(Cpt,{shouldFilter:!1,children:[G.jsx(Mpt,{placeholder:s,className:"rf-h-9 rf-w-full",value:b,onValueChange:v}),ee.length>0&&G.jsxs("div",{className:"rf-border-b rf-border-gray-200",children:[G.jsxs("button",{onClick:()=>D(!w),className:"rf-w-full rf-px-3 rf-py-2 rf-flex rf-items-center rf-justify-between rf-text-xs rf-text-slate-600 hover:rf-bg-slate-50 rf-bg-transparent rf-border-none rf-cursor-pointer",children:[G.jsx("span",{className:"rf-font-medium",children:"Recent Files"}),G.jsx(M2e,{className:lr("rf-h-4 rf-w-4 rf-transition-transform",!w&&"-rf-rotate-90")})]}),w&&G.jsx("div",{className:"rf-pb-1",children:ee.map((ae,de)=>G.jsxs("div",{onClick:()=>ce(ae.path,de,!0),className:lr("rf-flex rf-items-center rf-px-3 rf-py-1.5 rf-cursor-pointer hover:rf-bg-slate-100",ae.path===n&&"rf-font-medium"),children:[ae.type==="saved"?G.jsx("span",{title:"Recently saved",children:G.jsx(XDn,{className:"rf-mr-2 rf-h-4 rf-w-4 rf-text-green-500"})}):G.jsx("span",{title:"Recently viewed",children:G.jsx(ADn,{className:"rf-mr-2 rf-h-4 rf-w-4 rf-text-blue-500"})}),G.jsx("span",{className:"rf-text-sm",children:r(ae.path.split("/").pop()||"")}),G.jsx("span",{className:"rf-text-xs rf-text-muted-foreground rf-ml-2 rf-truncate rf-max-w-[40%]",children:Vpt(ae.path)}),G.jsx(T8,{className:lr("rf-ml-auto rf-h-4 rf-w-4",ae.path===n?"rf-opacity-100":"rf-opacity-0")})]},ae.path))})]}),G.jsxs("div",{className:"rf-px-3 rf-py-2 rf-bg-slate-50 rf-flex rf-items-center rf-justify-between rf-gap-2",children:[G.jsx("div",{className:"rf-flex rf-items-center rf-text-xs rf-text-slate-600 rf-min-w-0 rf-flex-1",children:G.jsxs("div",{className:"rf-flex rf-items-center rf-min-w-0",children:[G.jsx("button",{onClick:()=>K(null),className:"rf-text-blue-600 hover:rf-text-blue-800 rf-underline rf-cursor-pointer rf-bg-transparent rf-border-none rf-p-0 rf-flex-shrink-0",children:"root"}),p?.split("/").filter(Boolean).map((ae,de,be)=>{const Ce=be.slice(0,de+1).join("/");return G.jsxs("span",{className:"rf-flex rf-items-center rf-min-w-0",children:[G.jsx("span",{className:"rf-mx-1 rf-flex-shrink-0",children:"/"}),de===be.length-1?G.jsx("span",{className:"rf-text-slate-800 rf-truncate rf-max-w-[200px]",title:ae,children:ae}):G.jsx("button",{onClick:()=>K(Ce),className:"rf-text-blue-600 hover:rf-text-blue-800 rf-underline rf-cursor-pointer rf-bg-transparent rf-border-none rf-p-0 rf-truncate rf-max-w-[150px]",title:ae,children:ae})]},Ce)})]})}),G.jsx("div",{className:"rf-flex rf-items-center rf-gap-2 rf-flex-shrink-0",children:p&&G.jsxs("button",{onClick:ne,className:"rf-flex rf-items-center rf-gap-1 rf-text-slate-600 hover:rf-text-slate-800 rf-bg-transparent rf-border-none rf-p-1 rf-rounded hover:rf-bg-slate-200 rf-transition-colors",title:"Go up one level",children:[G.jsx(SDn,{className:"rf-h-3 rf-w-3"}),G.jsx("span",{className:"rf-text-xs rf-font-medium",children:"Up"})]})})]}),G.jsx(Tpt,{className:"rf-overflow-visible rf-max-h-none",children:q?G.jsx(G.Fragment,{children:j.currentDirResults.length===0&&j.globalResults.length===0?G.jsxs(V5e,{children:['No files found matching "',b,'".']}):G.jsxs(G.Fragment,{children:[j.currentDirResults.length>0&&G.jsx(CI,{children:j.currentDirResults.map((ae,de)=>G.jsxs(MI,{value:`search-current:${ae.path}`,onSelect:()=>{h(ae.path),d(!1),e(ae.path)},className:lr(ae.path===n&&"rf-font-medium","rf-group"),children:[G.jsx("span",{className:"rf-mr-2",children:U5e(ae.fileName)}),G.jsxs("div",{className:"rf-flex rf-items-center rf-w-full rf-min-w-0",children:[G.jsx("span",{className:"rf-truncate rf-flex-1",children:r(ae.fileName)}),G.jsx("span",{className:"rf-text-xs rf-text-muted-foreground rf-ml-2 rf-truncate rf-max-w-[40%]",children:p||"/"}),ae.path===n&&G.jsx(T8,{className:"rf-ml-2 rf-h-4 rf-w-4 rf-flex-shrink-0"})]})]},ae.path))}),j.globalResults.length>0&&G.jsx(CI,{children:j.globalResults.map(ae=>G.jsxs(MI,{value:`search-global:${ae.path}`,onSelect:()=>{h(ae.path),d(!1),e(ae.path)},className:lr(ae.path===n&&"rf-font-medium","rf-group"),children:[G.jsx("span",{className:"rf-mr-2",children:U5e(ae.fileName)}),G.jsxs("div",{className:"rf-flex rf-items-center rf-w-full rf-min-w-0",children:[G.jsx("span",{className:"rf-truncate rf-flex-1",children:r(ae.fileName)}),G.jsx("span",{className:"rf-text-xs rf-text-muted-foreground rf-ml-2 rf-truncate rf-max-w-[40%]",children:Vpt(ae.path)}),ae.path===n&&G.jsx(T8,{className:"rf-ml-2 rf-h-4 rf-w-4 rf-flex-shrink-0"})]})]},ae.path))})]})}):G.jsxs(G.Fragment,{children:[G.jsx(V5e,{children:a}),O.length>0&&G.jsx(CI,{children:O.map((ae,de)=>G.jsxs(MI,{value:`current:${ae.path}`,onSelect:()=>ce(ae.path,de),className:lr(ae.path===n&&"rf-font-medium","rf-group"),children:[G.jsx("span",{className:"rf-mr-2",children:U5e(ae.name)}),r(ae.name),G.jsx("div",{className:"rf-ml-auto rf-flex rf-items-center rf-gap-1",children:G.jsx(T8,{className:lr("rf-h-4 rf-w-4",ae.path===n?"rf-opacity-100":"rf-opacity-0")})})]},ae.path))}),z.length>0&&G.jsx(CI,{children:z.map(ae=>G.jsxs(MI,{value:`folder-${ae.path}`,onSelect:()=>K(ae.path),className:"rf-text-slate-600 hover:rf-text-slate-900",children:[G.jsx(ODn,{className:"rf-mr-2 rf-h-4 rf-w-4 rf-text-blue-600"}),ae.name,G.jsx(xE,{className:"rf-ml-auto rf-h-4 rf-w-4"})]},ae.path))}),O.length===0&&z.length===0&&G.jsx("div",{className:"rf-p-4 rf-text-center rf-text-slate-500 rf-text-sm",children:"No files or folders in this directory"})]})})]})})]})})},Wpt=({files:t,onFileChange:e,currentFile:n})=>G.jsx($pt,{files:t,onFileChange:e,currentFile:n,fileFilter:()=>!0,placeholder:"Select circuit",searchPlaceholder:"Search for circuit file",emptyMessage:"No circuit files found in this directory."}),Kno=t=>{fY();const[e,n]=Y.useState(()=>t.initialCircuitPath??""),[o,r]=Y.useState(null),[i,s]=Y.useState(!1),[a,c]=Y.useState({}),[l,u]=Y.useState(new Set),[_,d]=Y.useState(new Set),m=t.files,h=m.map(b=>b.filePath),p=Y.useCallback(async b=>{if(!b.fileStaticAssetUrl)throw new Error(`No fileStaticAssetUrl provided for ${b.filePath}`);const v=await fetch(b.fileStaticAssetUrl);if(!v.ok)throw new Error(`Failed to fetch ${b.filePath}: ${v.statusText}`);return await v.json()},[]),x=Y.useCallback(async b=>{if(a[b]){r(a[b]),t.onCircuitJsonPathChange?.(b);return}if(_.has(b)){console.warn(`Skipping failed file: ${b}`),r(null);return}if(!l.has(b)){u(v=>new Set(v).add(b)),s(!0),r(null);try{const v=m.find(w=>w.filePath===b);if(!v)throw new Error(`File reference not found for ${b}`);const M=await(t.onFetchFile||p)(v);c(w=>({...w,[b]:M})),r(M),t.onCircuitJsonPathChange?.(b),d(w=>{const D=new Set(w);return D.delete(b),D})}catch(v){console.error(`Failed to load circuit JSON file ${b}:`,v),d(S=>new Set(S).add(b)),r(null)}finally{u(v=>{const S=new Set(v);return S.delete(b),S}),s(!1)}}},[m,a,l,_,t.onFetchFile,t.onCircuitJsonPathChange,p]);Y.useEffect(()=>{if(h.length===0)return;let b=e;(!b||!h.includes(b))&&(b=aft(h)??h[0],n(b)),b&&h.includes(b)&&x(b)},[e]);const f=Y.useCallback(b=>{n(b)},[]),g=Y.useCallback(b=>{d(v=>{const S=new Set(v);return S.delete(b),S}),x(b)},[x]);if(h.length===0)return G.jsx("div",{className:"rf-flex rf-flex-col rf-w-full rf-h-full rf-items-center rf-justify-center",children:G.jsxs("div",{className:"rf-text-center rf-p-8",children:[G.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-gray-800 rf-mb-2",children:"No Circuit JSON Files Found"}),G.jsx("p",{className:"rf-text-sm rf-text-gray-600",children:"Please provide circuit JSON files to view."})]})});const y=_.has(e);return G.jsx(M5,{fallbackRender:({error:b})=>G.jsx("div",{className:"rf-mt-4 rf-mx-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:G.jsxs("div",{className:"rf-p-4",children:[G.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Circuit JSON Preview"}),G.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:b.message})]})}),children:y?G.jsxs("div",{className:"rf-w-full rf-h-full rf-flex rf-flex-col",children:[G.jsxs("div",{className:"rf-flex rf-items-center rf-justify-between rf-w-full rf-p-4 rf-border-b rf-border-gray-200",children:[(t.showFileMenu??!0)&&G.jsx(bI,{isWebEmbedded:!0,circuitJson:null,projectName:t.projectName}),h.length>1&&G.jsx("div",{className:"rf-absolute rf-left-1/2 rf-transform rf--translate-x-1/2 rf-flex rf-items-center rf-gap-2",children:G.jsx(Wpt,{currentFile:e,files:h,onFileChange:f})})]}),G.jsx("div",{className:"rf-flex-1 rf-flex rf-items-center rf-justify-center",children:G.jsxs("div",{className:"rf-text-center rf-p-8",children:[G.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-600 rf-mb-2",children:"Failed to Load Circuit File"}),G.jsxs("p",{className:"rf-text-sm rf-text-gray-600 rf-mb-4",children:["Could not load: ",e]}),G.jsxs("div",{className:"rf-flex rf-flex-col rf-items-center rf-gap-2",children:[G.jsx("button",{onClick:()=>g(e),className:"rf-px-4 rf-py-2 rf-bg-blue-500 rf-text-white rf-rounded rf-hover:bg-blue-600",children:"Retry"}),h.length>1&&G.jsx("p",{className:"rf-text-xs rf-text-gray-500",children:"Or select a different file from the dropdown above"})]})]})})]}):G.jsx(Bmt,{circuitJson:o,defaultToFullScreen:t.defaultToFullScreen,showToggleFullScreen:t.showToggleFullScreen,showFileMenu:!1,isWebEmbedded:!1,projectName:t.projectName,defaultActiveTab:t.tabSelected,leftHeaderContent:G.jsxs("div",{className:"rf-flex rf-items-center rf-justify-between rf-w-full",children:[(t.showFileMenu??!0)&&G.jsx(bI,{isWebEmbedded:!0,circuitJson:o,projectName:t.projectName}),h.length>1&&G.jsx("div",{className:`rf-absolute rf-left-1/2 rf-transform rf--translate-x-1/2 rf-flex rf-items-center rf-gap-2 ${i?"rf-opacity-50":""}`,children:G.jsx(Wpt,{currentFile:e,files:h,onFileChange:f})})]})})})},Qno=()=>{const t=eu(e=>e.fsMap);Y.useEffect(()=>{if(!document||!t)return;const e=Array.from(t.keys()),n=aft(e),o=t.get("package.json");try{if(o){const r=JSON.parse(o);if(r?.name){document.title=r.name;return}}}catch{}n&&(document.title=n)},[t])},Upt=(t,e,n)=>{const o=t instanceof RegExp?Xpt(t,n):t,r=e instanceof RegExp?Xpt(e,n):e,i=o!==null&&r!=null&&Zno(o,r,n);return i&&{start:i[0],end:i[1],pre:n.slice(0,i[0]),body:n.slice(i[0]+o.length,i[1]),post:n.slice(i[1]+r.length)}},Xpt=(t,e)=>{const n=e.match(t);return n?n[0]:null},Zno=(t,e,n)=>{let o,r,i,s,a,c=n.indexOf(t),l=n.indexOf(e,c+1),u=c;if(c>=0&&l>0){if(t===e)return[c,l];for(o=[],i=n.length;u>=0&&!a;){if(u===c)o.push(u),c=n.indexOf(t,u+1);else if(o.length===1){const _=o.pop();_!==void 0&&(a=[_,l])}else r=o.pop(),r!==void 0&&r<i&&(i=r,s=l),l=n.indexOf(e,u+1);u=c<l&&c>=0?c:l}o.length&&s!==void 0&&(a=[i,s])}return a},jpt="\0SLASH"+Math.random()+"\0",Gpt="\0OPEN"+Math.random()+"\0",X5e="\0CLOSE"+Math.random()+"\0",Ypt="\0COMMA"+Math.random()+"\0",qpt="\0PERIOD"+Math.random()+"\0",eoo=new RegExp(jpt,"g"),too=new RegExp(Gpt,"g"),noo=new RegExp(X5e,"g"),ooo=new RegExp(Ypt,"g"),roo=new RegExp(qpt,"g"),ioo=/\\\\/g,soo=/\\{/g,aoo=/\\}/g,coo=/\\,/g,loo=/\\./g;function j5e(t){return isNaN(t)?t.charCodeAt(0):parseInt(t,10)}function uoo(t){return t.replace(ioo,jpt).replace(soo,Gpt).replace(aoo,X5e).replace(coo,Ypt).replace(loo,qpt)}function _oo(t){return t.replace(eoo,"\\").replace(too,"{").replace(noo,"}").replace(ooo,",").replace(roo,".")}function Jpt(t){if(!t)return[""];const e=[],n=Upt("{","}",t);if(!n)return t.split(",");const{pre:o,body:r,post:i}=n,s=o.split(",");s[s.length-1]+="{"+r+"}";const a=Jpt(i);return i.length&&(s[s.length-1]+=a.shift(),s.push.apply(s,a)),e.push.apply(e,s),e}function doo(t){return t?(t.slice(0,2)==="{}"&&(t="\\{\\}"+t.slice(2)),wI(uoo(t),!0).map(_oo)):[]}function hoo(t){return"{"+t+"}"}function moo(t){return/^-?0\d/.test(t)}function poo(t,e){return t<=e}function foo(t,e){return t>=e}function wI(t,e){const n=[],o=Upt("{","}",t);if(!o)return[t];const r=o.pre,i=o.post.length?wI(o.post,!1):[""];if(/\$$/.test(o.pre))for(let s=0;s<i.length;s++){const a=r+"{"+o.body+"}"+i[s];n.push(a)}else{const s=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(o.body),a=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(o.body),c=s||a,l=o.body.indexOf(",")>=0;if(!c&&!l)return o.post.match(/,(?!,).*\}/)?(t=o.pre+"{"+o.body+X5e+o.post,wI(t)):[t];let u;if(c)u=o.body.split(/\.\./);else if(u=Jpt(o.body),u.length===1&&u[0]!==void 0&&(u=wI(u[0],!1).map(hoo),u.length===1))return i.map(d=>o.pre+u[0]+d);let _;if(c&&u[0]!==void 0&&u[1]!==void 0){const d=j5e(u[0]),m=j5e(u[1]),h=Math.max(u[0].length,u[1].length);let p=u.length===3&&u[2]!==void 0?Math.abs(j5e(u[2])):1,x=poo;m<d&&(p*=-1,x=foo);const g=u.some(moo);_=[];for(let y=d;x(y,m);y+=p){let b;if(a)b=String.fromCharCode(y),b==="\\"&&(b="");else if(b=String(y),g){const v=h-b.length;if(v>0){const S=new Array(v+1).join("0");y<0?b="-"+S+b.slice(1):b=S+b}}_.push(b)}}else{_=[];for(let d=0;d<u.length;d++)_.push.apply(_,wI(u[d],!1))}for(let d=0;d<_.length;d++)for(let m=0;m<i.length;m++){const h=r+_[d]+i[m];(!e||c||h)&&n.push(h)}}return n}const xoo=1024*64,aq=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>xoo)throw new TypeError("pattern is too long")},goo={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},EI=t=>t.replace(/[[\]\\-]/g,"\\$&"),yoo=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Kpt=t=>t.join(""),boo=(t,e)=>{const n=e;if(t.charAt(n)!=="[")throw new Error("not in a brace expression");const o=[],r=[];let i=n+1,s=!1,a=!1,c=!1,l=!1,u=n,_="";e:for(;i<t.length;){const p=t.charAt(i);if((p==="!"||p==="^")&&i===n+1){l=!0,i++;continue}if(p==="]"&&s&&!c){u=i+1;break}if(s=!0,p==="\\"&&!c){c=!0,i++;continue}if(p==="["&&!c){for(const[x,[f,g,y]]of Object.entries(goo))if(t.startsWith(x,i)){if(_)return["$.",!1,t.length-n,!0];i+=x.length,y?r.push(f):o.push(f),a=a||g;continue e}}if(c=!1,_){p>_?o.push(EI(_)+"-"+EI(p)):p===_&&o.push(EI(p)),_="",i++;continue}if(t.startsWith("-]",i+1)){o.push(EI(p+"-")),i+=2;continue}if(t.startsWith("-",i+1)){_=p,i+=2;continue}o.push(EI(p)),i++}if(u<i)return["",!1,0,!1];if(!o.length&&!r.length)return["$.",!1,t.length-n,!0];if(r.length===0&&o.length===1&&/^\\?.$/.test(o[0])&&!l){const p=o[0].length===2?o[0].slice(-1):o[0];return[yoo(p),!1,u-n,!1]}const d="["+(l?"^":"")+Kpt(o)+"]",m="["+(l?"":"^")+Kpt(r)+"]";return[o.length&&r.length?"("+d+"|"+m+")":o.length?d:m,a,u-n,!0]},DI=(t,{windowsPathsNoEscape:e=!1,magicalBraces:n=!0}={})=>n?e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"):e?t.replace(/\[([^\/\\{}])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\{}])\]/g,"$1$2").replace(/\\([^\/{}])/g,"$1"),Poo=new Set(["!","?","+","*","@"]),Qpt=t=>Poo.has(t),voo="(?!(?:^|/)\\.\\.?(?:$|/))",cq="(?!\\.)",Soo=new Set(["[","."]),Coo=new Set(["..","."]),Moo=new Set("().*{}+?[]^$\\!"),Too=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),G5e="[^/]",Zpt=G5e+"*?",eft=G5e+"+?";class x2{type;#o;#n;#r=!1;#t=[];#e;#s;#i;#l=!1;#a;#u;#_=!1;constructor(e,n,o={}){this.type=e,e&&(this.#n=!0),this.#e=n,this.#o=this.#e?this.#e.#o:this,this.#a=this.#o===this?o:this.#o.#a,this.#i=this.#o===this?[]:this.#o.#i,e==="!"&&!this.#o.#l&&this.#i.push(this),this.#s=this.#e?this.#e.#t.length:0}get hasMagic(){if(this.#n!==void 0)return this.#n;for(const e of this.#t)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#n=!0;return this.#n}toString(){return this.#u!==void 0?this.#u:this.type?this.#u=this.type+"("+this.#t.map(e=>String(e)).join("|")+")":this.#u=this.#t.map(e=>String(e)).join("")}#d(){if(this!==this.#o)throw new Error("should only call on root");if(this.#l)return this;this.toString(),this.#l=!0;let e;for(;e=this.#i.pop();){if(e.type!=="!")continue;let n=e,o=n.#e;for(;o;){for(let r=n.#s+1;!o.type&&r<o.#t.length;r++)for(const i of e.#t){if(typeof i=="string")throw new Error("string part in extglob AST??");i.copyIn(o.#t[r])}n=o,o=n.#e}}return this}push(...e){for(const n of e)if(n!==""){if(typeof n!="string"&&!(n instanceof x2&&n.#e===this))throw new Error("invalid part: "+n);this.#t.push(n)}}toJSON(){const e=this.type===null?this.#t.slice().map(n=>typeof n=="string"?n:n.toJSON()):[this.type,...this.#t.map(n=>n.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#o||this.#o.#l&&this.#e?.type==="!")&&e.push({}),e}isStart(){if(this.#o===this)return!0;if(!this.#e?.isStart())return!1;if(this.#s===0)return!0;const e=this.#e;for(let n=0;n<this.#s;n++){const o=e.#t[n];if(!(o instanceof x2&&o.type==="!"))return!1}return!0}isEnd(){if(this.#o===this||this.#e?.type==="!")return!0;if(!this.#e?.isEnd())return!1;if(!this.type)return this.#e?.isEnd();const e=this.#e?this.#e.#t.length:0;return this.#s===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){const n=new x2(this.type,e);for(const o of this.#t)n.copyIn(o);return n}static#c(e,n,o,r){let i=!1,s=!1,a=-1,c=!1;if(n.type===null){let m=o,h="";for(;m<e.length;){const p=e.charAt(m++);if(i||p==="\\"){i=!i,h+=p;continue}if(s){m===a+1?(p==="^"||p==="!")&&(c=!0):p==="]"&&!(m===a+2&&c)&&(s=!1),h+=p;continue}else if(p==="["){s=!0,a=m,c=!1,h+=p;continue}if(!r.noext&&Qpt(p)&&e.charAt(m)==="("){n.push(h),h="";const x=new x2(p,n);m=x2.#c(e,x,m,r),n.push(x);continue}h+=p}return n.push(h),m}let l=o+1,u=new x2(null,n);const _=[];let d="";for(;l<e.length;){const m=e.charAt(l++);if(i||m==="\\"){i=!i,d+=m;continue}if(s){l===a+1?(m==="^"||m==="!")&&(c=!0):m==="]"&&!(l===a+2&&c)&&(s=!1),d+=m;continue}else if(m==="["){s=!0,a=l,c=!1,d+=m;continue}if(Qpt(m)&&e.charAt(l)==="("){u.push(d),d="";const h=new x2(m,u);u.push(h),l=x2.#c(e,h,l,r);continue}if(m==="|"){u.push(d),d="",_.push(u),u=new x2(null,n);continue}if(m===")")return d===""&&n.#t.length===0&&(n.#_=!0),u.push(d),d="",n.push(..._,u),l;d+=m}return n.type=null,n.#n=void 0,n.#t=[e.substring(o-1)],l}static fromGlob(e,n={}){const o=new x2(null,void 0,n);return x2.#c(e,o,0,n),o}toMMPattern(){if(this!==this.#o)return this.#o.toMMPattern();const e=this.toString(),[n,o,r,i]=this.toRegExpSource();if(!(r||this.#n||this.#a.nocase&&!this.#a.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return o;const a=(this.#a.nocase?"i":"")+(i?"u":"");return Object.assign(new RegExp(`^${n}$`,a),{_src:n,_glob:e})}get options(){return this.#a}toRegExpSource(e){const n=e??!!this.#a.dot;if(this.#o===this&&this.#d(),!this.type){const c=this.isStart()&&this.isEnd()&&!this.#t.some(m=>typeof m!="string"),l=this.#t.map(m=>{const[h,p,x,f]=typeof m=="string"?x2.#p(m,this.#n,c):m.toRegExpSource(e);return this.#n=this.#n||x,this.#r=this.#r||f,h}).join("");let u="";if(this.isStart()&&typeof this.#t[0]=="string"&&!(this.#t.length===1&&Coo.has(this.#t[0]))){const h=Soo,p=n&&h.has(l.charAt(0))||l.startsWith("\\.")&&h.has(l.charAt(2))||l.startsWith("\\.\\.")&&h.has(l.charAt(4)),x=!n&&!e&&h.has(l.charAt(0));u=p?voo:x?cq:""}let _="";return this.isEnd()&&this.#o.#l&&this.#e?.type==="!"&&(_="(?:$|\\/)"),[u+l+_,DI(l),this.#n=!!this.#n,this.#r]}const o=this.type==="*"||this.type==="+",r=this.type==="!"?"(?:(?!(?:":"(?:";let i=this.#h(n);if(this.isStart()&&this.isEnd()&&!i&&this.type!=="!"){const c=this.toString();return this.#t=[c],this.type=null,this.#n=void 0,[c,DI(this.toString()),!1,!1]}let s=!o||e||n||!cq?"":this.#h(!0);s===i&&(s=""),s&&(i=`(?:${i})(?:${s})*?`);let a="";if(this.type==="!"&&this.#_)a=(this.isStart()&&!n?cq:"")+eft;else{const c=this.type==="!"?"))"+(this.isStart()&&!n&&!e?cq:"")+Zpt+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&s?")":this.type==="*"&&s?")?":`)${this.type}`;a=r+i+c}return[a,DI(i),this.#n=!!this.#n,this.#r]}#h(e){return this.#t.map(n=>{if(typeof n=="string")throw new Error("string type in extglob ast??");const[o,r,i,s]=n.toRegExpSource(e);return this.#r=this.#r||s,o}).filter(n=>!(this.isStart()&&this.isEnd())||!!n).join("|")}static#p(e,n,o=!1){let r=!1,i="",s=!1;for(let a=0;a<e.length;a++){const c=e.charAt(a);if(r){r=!1,i+=(Moo.has(c)?"\\":"")+c;continue}if(c==="\\"){a===e.length-1?i+="\\\\":r=!0;continue}if(c==="["){const[l,u,_,d]=boo(e,a);if(_){i+=l,s=s||u,a+=_-1,n=n||d;continue}}if(c==="*"){i+=o&&e==="*"?eft:Zpt,n=!0;continue}if(c==="?"){i+=G5e,n=!0;continue}i+=Too(c)}return[i,DI(e),!!n,s]}}const woo=(t,{windowsPathsNoEscape:e=!1,magicalBraces:n=!1}={})=>n?e?t.replace(/[?*()[\]{}]/g,"[$&]"):t.replace(/[?*()[\]\\{}]/g,"\\$&"):e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&");var aD={env:{}};const g2=(t,e,n={})=>(aq(e),!n.nocomment&&e.charAt(0)==="#"?!1:new AI(e,n).match(t)),Eoo=/^\*+([^+@!?\*\[\(]*)$/,Doo=t=>e=>!e.startsWith(".")&&e.endsWith(t),Aoo=t=>e=>e.endsWith(t),Roo=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),koo=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),Noo=/^\*+\.\*+$/,Hoo=t=>!t.startsWith(".")&&t.includes("."),Ioo=t=>t!=="."&&t!==".."&&t.includes("."),Loo=/^\.\*+$/,Ooo=t=>t!=="."&&t!==".."&&t.startsWith("."),Foo=/^\*+$/,Boo=t=>t.length!==0&&!t.startsWith("."),zoo=t=>t.length!==0&&t!=="."&&t!=="..",Voo=/^\?+([^+@!?\*\[\(]*)?$/,$oo=([t,e=""])=>{const n=tft([t]);return e?(e=e.toLowerCase(),o=>n(o)&&o.toLowerCase().endsWith(e)):n},Woo=([t,e=""])=>{const n=nft([t]);return e?(e=e.toLowerCase(),o=>n(o)&&o.toLowerCase().endsWith(e)):n},Uoo=([t,e=""])=>{const n=nft([t]);return e?o=>n(o)&&o.endsWith(e):n},Xoo=([t,e=""])=>{const n=tft([t]);return e?o=>n(o)&&o.endsWith(e):n},tft=([t])=>{const e=t.length;return n=>n.length===e&&!n.startsWith(".")},nft=([t])=>{const e=t.length;return n=>n.length===e&&n!=="."&&n!==".."},oft=typeof aD=="object"&&aD?typeof aD.env=="object"&&aD.env&&aD.env.__MINIMATCH_TESTING_PLATFORM__||aD.platform:"posix",rft={win32:{sep:"\\"},posix:{sep:"/"}},joo=oft==="win32"?rft.win32.sep:rft.posix.sep;g2.sep=joo;const O5=Symbol("globstar **");g2.GLOBSTAR=O5;const Goo="[^/]"+"*?",Yoo="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",qoo="(?:(?!(?:\\/|^)\\.).)*?",Joo=(t,e={})=>n=>g2(n,t,e);g2.filter=Joo;const F5=(t,e={})=>Object.assign({},t,e),Koo=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return g2;const e=g2;return Object.assign((o,r,i={})=>e(o,r,F5(t,i)),{Minimatch:class extends e.Minimatch{constructor(r,i={}){super(r,F5(t,i))}static defaults(r){return e.defaults(F5(t,r)).Minimatch}},AST:class extends e.AST{constructor(r,i,s={}){super(r,i,F5(t,s))}static fromGlob(r,i={}){return e.AST.fromGlob(r,F5(t,i))}},unescape:(o,r={})=>e.unescape(o,F5(t,r)),escape:(o,r={})=>e.escape(o,F5(t,r)),filter:(o,r={})=>e.filter(o,F5(t,r)),defaults:o=>e.defaults(F5(t,o)),makeRe:(o,r={})=>e.makeRe(o,F5(t,r)),braceExpand:(o,r={})=>e.braceExpand(o,F5(t,r)),match:(o,r,i={})=>e.match(o,r,F5(t,i)),sep:e.sep,GLOBSTAR:O5})};g2.defaults=Koo;const ift=(t,e={})=>(aq(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:doo(t));g2.braceExpand=ift;const Qoo=(t,e={})=>new AI(t,e).makeRe();g2.makeRe=Qoo;const Zoo=(t,e,n={})=>{const o=new AI(e,n);return t=t.filter(r=>o.match(r)),o.options.nonull&&!t.length&&t.push(e),t};g2.match=Zoo;const sft=/[?*]|[+@!]\(.*?\)|\[|\]/,ero=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");class AI{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,n={}){aq(e),n=n||{},this.options=n,this.pattern=e,this.platform=n.platform||oft,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!n.windowsPathsNoEscape||n.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!n.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!n.nonegate,this.comment=!1,this.empty=!1,this.partial=!!n.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=n.windowsNoMagicRoot!==void 0?n.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const e of this.set)for(const n of e)if(typeof n!="string")return!0;return!1}debug(...e){}make(){const e=this.pattern,n=this.options;if(!n.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],n.debug&&(this.debug=(...i)=>console.error(...i)),this.debug(this.pattern,this.globSet);const o=this.globSet.map(i=>this.slashSplit(i));this.globParts=this.preprocess(o),this.debug(this.pattern,this.globParts);let r=this.globParts.map((i,s,a)=>{if(this.isWindows&&this.windowsNoMagicRoot){const c=i[0]===""&&i[1]===""&&(i[2]==="?"||!sft.test(i[2]))&&!sft.test(i[3]),l=/^[a-z]:/i.test(i[0]);if(c)return[...i.slice(0,4),...i.slice(4).map(u=>this.parse(u))];if(l)return[i[0],...i.slice(1).map(u=>this.parse(u))]}return i.map(c=>this.parse(c))});if(this.debug(this.pattern,r),this.set=r.filter(i=>i.indexOf(!1)===-1),this.isWindows)for(let i=0;i<this.set.length;i++){const s=this.set[i];s[0]===""&&s[1]===""&&this.globParts[i][2]==="?"&&typeof s[3]=="string"&&/^[a-z]:$/i.test(s[3])&&(s[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let o=0;o<e.length;o++)for(let r=0;r<e[o].length;r++)e[o][r]==="**"&&(e[o][r]="*");const{optimizationLevel:n=1}=this.options;return n>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):n>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(n=>{let o=-1;for(;(o=n.indexOf("**",o+1))!==-1;){let r=o;for(;n[r+1]==="**";)r++;r!==o&&n.splice(o,r-o)}return n})}levelOneOptimize(e){return e.map(n=>(n=n.reduce((o,r)=>{const i=o[o.length-1];return r==="**"&&i==="**"?o:r===".."&&i&&i!==".."&&i!=="."&&i!=="**"?(o.pop(),o):(o.push(r),o)},[]),n.length===0?[""]:n))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let n=!1;do{if(n=!1,!this.preserveMultipleSlashes){for(let r=1;r<e.length-1;r++){const i=e[r];r===1&&i===""&&e[0]===""||(i==="."||i==="")&&(n=!0,e.splice(r,1),r--)}e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")&&(n=!0,e.pop())}let o=0;for(;(o=e.indexOf("..",o+1))!==-1;){const r=e[o-1];r&&r!=="."&&r!==".."&&r!=="**"&&(n=!0,e.splice(o-1,2),o-=2)}}while(n);return e.length===0?[""]:e}firstPhasePreProcess(e){let n=!1;do{n=!1;for(let o of e){let r=-1;for(;(r=o.indexOf("**",r+1))!==-1;){let s=r;for(;o[s+1]==="**";)s++;s>r&&o.splice(r+1,s-r);let a=o[r+1];const c=o[r+2],l=o[r+3];if(a!==".."||!c||c==="."||c===".."||!l||l==="."||l==="..")continue;n=!0,o.splice(r,1);const u=o.slice(0);u[r]="**",e.push(u),r--}if(!this.preserveMultipleSlashes){for(let s=1;s<o.length-1;s++){const a=o[s];s===1&&a===""&&o[0]===""||(a==="."||a==="")&&(n=!0,o.splice(s,1),s--)}o[0]==="."&&o.length===2&&(o[1]==="."||o[1]==="")&&(n=!0,o.pop())}let i=0;for(;(i=o.indexOf("..",i+1))!==-1;){const s=o[i-1];if(s&&s!=="."&&s!==".."&&s!=="**"){n=!0;const c=i===1&&o[i+1]==="**"?["."]:[];o.splice(i-1,2,...c),o.length===0&&o.push(""),i-=2}}}}while(n);return e}secondPhasePreProcess(e){for(let n=0;n<e.length-1;n++)for(let o=n+1;o<e.length;o++){const r=this.partsMatch(e[n],e[o],!this.preserveMultipleSlashes);if(r){e[n]=[],e[o]=r;break}}return e.filter(n=>n.length)}partsMatch(e,n,o=!1){let r=0,i=0,s=[],a="";for(;r<e.length&&i<n.length;)if(e[r]===n[i])s.push(a==="b"?n[i]:e[r]),r++,i++;else if(o&&e[r]==="**"&&n[i]===e[r+1])s.push(e[r]),r++;else if(o&&n[i]==="**"&&e[r]===n[i+1])s.push(n[i]),i++;else if(e[r]==="*"&&n[i]&&(this.options.dot||!n[i].startsWith("."))&&n[i]!=="**"){if(a==="b")return!1;a="a",s.push(e[r]),r++,i++}else if(n[i]==="*"&&e[r]&&(this.options.dot||!e[r].startsWith("."))&&e[r]!=="**"){if(a==="a")return!1;a="b",s.push(n[i]),r++,i++}else return!1;return e.length===n.length&&s}parseNegate(){if(this.nonegate)return;const e=this.pattern;let n=!1,o=0;for(let r=0;r<e.length&&e.charAt(r)==="!";r++)n=!n,o++;o&&(this.pattern=e.slice(o)),this.negate=n}matchOne(e,n,o=!1){const r=this.options;if(this.isWindows){const p=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),x=!p&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),f=typeof n[0]=="string"&&/^[a-z]:$/i.test(n[0]),g=!f&&n[0]===""&&n[1]===""&&n[2]==="?"&&typeof n[3]=="string"&&/^[a-z]:$/i.test(n[3]),y=x?3:p?0:void 0,b=g?3:f?0:void 0;if(typeof y=="number"&&typeof b=="number"){const[v,S]=[e[y],n[b]];v.toLowerCase()===S.toLowerCase()&&(n[b]=v,b>y?n=n.slice(b):y>b&&(e=e.slice(y)))}}const{optimizationLevel:i=1}=this.options;i>=2&&(e=this.levelTwoFileOptimize(e)),this.debug("matchOne",this,{file:e,pattern:n}),this.debug("matchOne",e.length,n.length);for(var s=0,a=0,c=e.length,l=n.length;s<c&&a<l;s++,a++){this.debug("matchOne loop");var u=n[a],_=e[s];if(this.debug(n,u,_),u===!1)return!1;if(u===O5){this.debug("GLOBSTAR",[n,u,_]);var d=s,m=a+1;if(m===l){for(this.debug("** at the end");s<c;s++)if(e[s]==="."||e[s]===".."||!r.dot&&e[s].charAt(0)===".")return!1;return!0}for(;d<c;){var h=e[d];if(this.debug(`
|
|
5786
5786
|
globstar while`,e,d,n,m,h),this.matchOne(e.slice(d),n.slice(m),o))return this.debug("globstar found match!",d,c,h),!0;if(h==="."||h===".."||!r.dot&&h.charAt(0)==="."){this.debug("dot detected!",e,d,n,m);break}this.debug("globstar swallow a segment, and continue"),d++}return!!(o&&(this.debug(`
|
|
5787
|
-
>>> no match, partial?`,e,d,n,m),d===c))}let p;if(typeof u=="string"?(p=_===u,this.debug("string match",u,_,p)):(p=u.test(_),this.debug("pattern match",u,_,p)),!p)return!1}if(s===c&&a===l)return!0;if(s===c)return o;if(a===l)return s===c-1&&e[s]==="";throw new Error("wtf?")}braceExpand(){return ift(this.pattern,this.options)}parse(e){aq(e);const n=this.options;if(e==="**")return O5;if(e==="")return"";let o,r=null;(o=e.match(
|
|
5787
|
+
>>> no match, partial?`,e,d,n,m),d===c))}let p;if(typeof u=="string"?(p=_===u,this.debug("string match",u,_,p)):(p=u.test(_),this.debug("pattern match",u,_,p)),!p)return!1}if(s===c&&a===l)return!0;if(s===c)return o;if(a===l)return s===c-1&&e[s]==="";throw new Error("wtf?")}braceExpand(){return ift(this.pattern,this.options)}parse(e){aq(e);const n=this.options;if(e==="**")return O5;if(e==="")return"";let o,r=null;(o=e.match(Foo))?r=n.dot?zoo:Boo:(o=e.match(Eoo))?r=(n.nocase?n.dot?koo:Roo:n.dot?Aoo:Doo)(o[1]):(o=e.match(Voo))?r=(n.nocase?n.dot?Woo:$oo:n.dot?Uoo:Xoo)(o):(o=e.match(Noo))?r=n.dot?Ioo:Hoo:(o=e.match(Loo))&&(r=Ooo);const i=x2.fromGlob(e,this.options).toMMPattern();return r&&typeof i=="object"&&Reflect.defineProperty(i,"test",{value:r}),i}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;const e=this.set;if(!e.length)return this.regexp=!1,this.regexp;const n=this.options,o=n.noglobstar?Goo:n.dot?Yoo:qoo,r=new Set(n.nocase?["i"]:[]);let i=e.map(c=>{const l=c.map(_=>{if(_ instanceof RegExp)for(const d of _.flags.split(""))r.add(d);return typeof _=="string"?ero(_):_===O5?O5:_._src});l.forEach((_,d)=>{const m=l[d+1],h=l[d-1];_!==O5||h===O5||(h===void 0?m!==void 0&&m!==O5?l[d+1]="(?:\\/|"+o+"\\/)?"+m:l[d]=o:m===void 0?l[d-1]=h+"(?:\\/|\\/"+o+")?":m!==O5&&(l[d-1]=h+"(?:\\/|\\/"+o+"\\/)"+m,l[d+1]=O5))});const u=l.filter(_=>_!==O5);if(this.partial&&u.length>=1){const _=[];for(let d=1;d<=u.length;d++)_.push(u.slice(0,d).join("/"));return"(?:"+_.join("|")+")"}return u.join("/")}).join("|");const[s,a]=e.length>1?["(?:",")"]:["",""];i="^"+s+i+a+"$",this.partial&&(i="^(?:\\/|"+s+i.slice(1,-1)+a+")$"),this.negate&&(i="^(?!"+i+").+$");try{this.regexp=new RegExp(i,[...r].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,n=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&n)return!0;const o=this.options;this.isWindows&&(e=e.split("\\").join("/"));const r=this.slashSplit(e);this.debug(this.pattern,"split",r);const i=this.set;this.debug(this.pattern,"set",i);let s=r[r.length-1];if(!s)for(let a=r.length-2;!s&&a>=0;a--)s=r[a];for(let a=0;a<i.length;a++){const c=i[a];let l=r;if(o.matchBase&&c.length===1&&(l=[s]),this.matchOne(l,c,n))return o.flipNegate?!0:!this.negate}return o.flipNegate?!1:this.negate}static defaults(e){return g2.defaults(e).Minimatch}}g2.AST=x2,g2.Minimatch=AI,g2.escape=woo,g2.unescape=DI;const tro=t=>(t.endsWith(".tsx")||t.endsWith(".ts")||t.endsWith(".jsx")||t.endsWith(".js")||tq(t))&&!t.endsWith(".d.ts"),nro=t=>{if(!t)return null;try{const e=JSON.parse(t);return UPt.parse(e)}catch(e){return console.warn("Failed to parse tscircuit.config.json",e),null}},oro=(t,e)=>{const o=nro(e)?.includeBoardFiles?.filter(Boolean);if(o&&o.length>0){const r=o.map(i=>new AI(i,{dot:!0}));return t.filter(i=>r.some(s=>s.match(i)))}return t.filter(tro)},Y5e=Za("run-frame:RunFrameWithApi"),rro=()=>{const e=!!eu(o=>o.error),n=e?"Dev server disconnected":"Dev server connected";return G.jsx(cpt,{children:G.jsxs(lpt,{children:[G.jsx(upt,{asChild:!0,children:G.jsx("button",{type:"button","aria-label":n,className:"rf-inline-flex rf-items-center rf-justify-center rf-p-2 rf-rounded-full rf-outline-none",children:G.jsx("span",{className:lr("rf-inline-flex rf-size-2 rf-rounded-full rf-flex-shrink-0",e?"rf-bg-red-600":"rf-bg-green-600 rf-opacity-50"),"aria-hidden":"true"})})}),G.jsx(H5e,{side:"right",children:n})]})})},aft=t=>t.find(e=>e.includes("entrypoint."))??t.find(e=>e.includes("index."))??t.find(e=>e.includes("main."))??t.find(e=>e.endsWith(".tsx")),iro=t=>t.find(e=>e.includes("manual-edits."))??t.find(e=>e.includes("manual-edit."))??t.find(e=>e.endsWith(".json")),cft=t=>{const{apiBaseUrl:e,leftHeaderContent:n}=t;Y.useEffect(()=>{t.debug&&Za.enable("run-frame*")},[t.debug]);const o=eu(O=>O.startPolling),r=eu(O=>O.stopPolling),i=eu(O=>O.setCurrentMainComponentPath),s=eu(O=>O.pushEvent),a=wZt(),c=eu(O=>O.fsMap),l=eu(O=>O.recentlySavedFiles),u=Y.useMemo(()=>Array.from(c.keys()),[c]),_=Y.useMemo(()=>{const O=c.get("tscircuit.config.json");return typeof O=="string"?O:void 0},[c]),d=Y.useMemo(()=>oro(u,_),[u,_]),m=eu(O=>O.circuitJson),[h,p]=Y.useState(()=>typeof window>"u"?t.initialMainComponentPath??"":new URLSearchParams(window.location.hash.slice(1)).get("file")??t.initialMainComponentPath??""),[x,f]=RT("runframe:favorites",[]),g=!a,y=Y.useCallback(O=>{f(z=>z.includes(O)?z.filter(V=>V!==O):[...z,O])},[f]),b=t.fileFilter??xto,v=Y.useMemo(()=>d.filter(b),[d,b]);Y.useEffect(()=>{if(h&&(v.includes(h)||d.includes(h)))return;if(h){const q=h.includes("/")?h.substring(0,h.lastIndexOf("/")):"",K=v.find(ne=>(ne.includes("/")?ne.substring(0,ne.lastIndexOf("/")):"")===q);if(K){p(K);return}}const O=window?.TSCIRCUIT_DEFAULT_MAIN_COMPONENT_PATH,z=[t.initialMainComponentPath,O].filter(q=>!!q);for(const q of z)if(v.includes(q)){p(q);return}const j=(v.length>0?v:d)[0];j&&p(j)},[v,d,t.initialMainComponentPath,h]);const S=Y.useCallback(O=>{if(typeof window>"u")return;const z=new URLSearchParams(window.location.hash.slice(1));if(z.get("file")===O)return;z.set("file",O);const V=z.toString(),j=`${window.location.pathname}${window.location.search}${V.length>0?`#${V}`:""}`;window.history.replaceState(null,"",j)},[]);Y.useEffect(()=>{h&&(S(h),t.onMainComponentPathChange?.(h),i(h))},[h,t.onMainComponentPathChange,S,i]),Qno();const{editEventsForRender:M,pushEditEvent:w,markRenderStarted:D,markRenderComplete:A}=TZt();Y.useEffect(()=>{e&&(window.TSCIRCUIT_FILESERVER_API_BASE_URL=e)},[e]),Y.useEffect(()=>(o(),()=>r()),[o,r]);const I=Y.useMemo(()=>String(h).length>0?{mainComponentPath:h}:{},[h]),H=Y.useCallback(async O=>{try{await s({event_type:"RUN_COMPLETED",initiator:"runframe",...O})}catch(z){Y5e("Failed to push RUN_COMPLETED event",z)}},[s]);return G.jsx(dpt,{fsMap:c,showFileMenu:t.showFileMenu,isLoadingFiles:g,evalVersion:t.evalVersion,forceLatestEvalVersion:t.forceLatestEvalVersion,evalWebWorkerBlobUrl:t.evalWebWorkerBlobUrl??t.workerBlobUrl,enableFetchProxy:t.enableFetchProxy,leftHeaderContent:G.jsxs("div",{className:"rf-flex rf-items-center rf-justify-between rf-w-full",children:[G.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[t.leftHeaderContent,G.jsx(rro,{})]}),t.showFilesSwitch&&G.jsx("div",{className:"rf-absolute rf-left-1/2 rf-transform rf--translate-x-1/2",children:G.jsx($pt,{currentFile:h,files:v,onFileChange:O=>{typeof c.get(O)=="string"&&p(O)},pinnedFiles:x,onToggleFavorite:y,fileFilter:b,recentlySavedFiles:l})})]}),defaultToFullScreen:t.defaultToFullScreen,showToggleFullScreen:t.showToggleFullScreen,onInitialRender:()=>{Y5e("onInitialRender / markRenderStarted"),D()},onRenderFinished:()=>{Y5e("onRenderFinished / markRenderComplete"),A()},onRunCompleted:H,editEvents:M,onEditEvent:O=>{w(O),fetch(`${Ax}/events/create`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({event_type:"USER_CREATED_MANUAL_EDIT",...O})});const z=iro(Array.from(c.keys()))??"manual-edits.json",V=c.get(z),j=JSON.parse(V??"{}");BHe({circuitJson:m,editEvents:[O],manualEditsFile:j}),fetch(`${Ax}/files/upsert`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file_path:z,text_content:JSON.stringify(j),initiator:"runframe"})})},onLoginRequired:t.onLoginRequired,...I})},sro=()=>new Promise(t=>{document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>t()):t()}),aro=()=>{const t=window.location.hash.slice(1),n=new URLSearchParams(t).get("tab")?.toLowerCase()?.trim();return n&&["pcb","schematic","cad"].includes(n)?n:"pcb"},cro=()=>{const t=document.getElementById("root");if(t)return t;const e=document.createElement("div");return e.id="root",e.style.height="100vh",document.body.appendChild(e),e},lro=async()=>{const t=Array.from(document.querySelectorAll("script[type='tscircuit-tsx']")),e=new Map;return await Promise.all(t.map(async(n,o)=>{const r=n.dataset.path||n.getAttribute("data-file-path")||`script${o?o+1:""}.tsx`;if(n.src){const s=await(await fetch(n.src)).text();e.set(r,s)}else e.set(r,n.textContent||"")})),{fsMap:e}},lft="<--INJECT_TSCIRCUIT_EVAL_WEB_WORKER_BLOB_URL-->",q5e={evalWebWorkerBlobUrl:lft.includes("<--")?void 0:lft,enableFetchProxy:"<--INJECT_ENABLE_FETCH_PROXY-->".includes("<--")?void 0:!0};(async()=>{await sro();const t=s2t.createRoot(cro()),e=window.TSCIRCUIT_RUNFRAME_STATIC_FILE_LIST,n=window.TSCIRCUIT_DEFAULT_MAIN_COMPONENT_PATH,o=window.TSCIRCUIT_PACKAGE_NAME;if(Array.isArray(e)){const r=aro();t.render(G.jsx(Kno,{files:e,initialCircuitPath:n,tabSelected:r,projectName:o}))}else if(window.TSCIRCUIT_USE_RUNFRAME_FOR_CLI)t.render(G.jsx(Kto,{...q5e}));else{const{fsMap:r}=await lro();r.size>0?t.render(G.jsx(dpt,{...q5e,fsMap:r})):t.render(G.jsx(cft,{...q5e}))}})()}));
|